Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 682330 - dev-util/source-highlight-3.1.8 fails to check for boost::regex in EPREFIX
Summary: dev-util/source-highlight-3.1.8 fails to check for boost::regex in EPREFIX
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-02 15:29 UTC by Olivier Huber
Modified: 2019-04-09 09:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,20.48 KB, text/x-log)
2019-04-02 15:29 UTC, Olivier Huber
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Huber 2019-04-02 15:29:10 UTC
Created attachment 571584 [details]
build.log

from config.log:

configure:17081: x86_64-pc-linux-gnu-g++ -c -O2 -pipe -O2 -pipe -march=native -std=c++14  -I/usr/include conftest.cpp >&5                                                                                                                                                      
In file included from /local/tmp/huber/prefix/usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/g++-v8/cstdlib:75,                                                                                                                                                                 
                 from /usr/include/boost/config/platform/linux.hpp:15,                                                                                                                                                                                                         
                 from /usr/include/boost/config.hpp:57,                                                                                                                                                                                                                        
                 from /usr/include/boost/regex/config.hpp:44,                                                                                                                                                                                                                  
                 from /usr/include/boost/regex.hpp:28,                                                                                                                                                                                                                         
                 from conftest.cpp:37:                                                                                                                                                                                                                                         
/local/tmp/huber/prefix/usr/include/stdlib.h:133:35: error: missing binary operator before token "("                                                                                                                                                                           
 #if __HAVE_FLOAT16 && __GLIBC_USE (IEC_60559_TYPES_EXT)                                                                                                                                                                                                                       
                                   ^                                                                                                                                                                                                                                           
and more ...

$ emerge --info dev-util/source-highlight
Portage 2.3.62 (python 3.6.8-final-0, default/linux/amd64/17.0/no-multilib/prefix/kernel-3.2+, gcc-8.3.0, glibc-2.29-r1, 4.4.175-89-default x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.4.175-89-default-x86_64-Intel-R-_Core-TM-_i5-6500_CPU_@_3.20GHz-with-SuSE-42.3-x86_64
KiB Mem:     8053020 total,    521384 free
KiB Swap:    8384508 total,   2314068 free
Timestamp of repository gentoo: Tue, 02 Apr 2019 10:30:01 +0000
Head commit of repository gentoo: fbbf0180defffddc985889ba006773edcebc0271
Timestamp of repository science: Tue, 02 Apr 2019 01:43:47 +0000
Head commit of repository science: 05a38342bf34bd0501aa5b5f20febbfd997172bf

sh bash 4.4_p23
ld GNU ld (Gentoo 2.31.1 p5) 2.31.1
app-shells/bash:          4.4_p23::gentoo
dev-lang/perl:            5.28.0::gentoo
dev-lang/python:          2.7.15::gentoo, 3.6.8::gentoo, 3.7.3::gentoo
dev-util/cmake:           3.14.1::localrepo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.6-r1::gentoo
sys-apps/sandbox:         2.17::gentoo
sys-devel/autoconf:       2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.31.1-r3::gentoo, 2.32::gentoo
sys-devel/gcc:            8.2.0-r5::gentoo, 8.3.0::gentoo
sys-devel/gcc-config:     2.0::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r4::gentoo
sys-kernel/linux-headers: 5.0-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.29-r1::gentoo
Repositories:

gentoo
    location: /scratch/huber/usr_portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-max-age: 24
    sync-rsync-verify-metamanifest: no
    sync-rsync-verify-jobs: 1
    sync-rsync-extra-opts: 

localrepo
    location: /local/tmp/huber/prefix/usr/local/portage
    masters: gentoo

science
    location: /local/tmp/huber/prefix/var/db/repos/science
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/science.git
    masters: gentoo

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /local/tmp/huber/prefix/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /local/tmp/huber/prefix/etc/env.d /local/tmp/huber/prefix/etc/gentoo-release"
CXXFLAGS="-O2 -pipe -O2 -pipe -march=native"
DISTDIR="/local/tmp/huber/prefix/usr/portage/distfiles"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles force-prefix ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned sfperms strict unknown-features-warn unmerge-logs unmerge-orphans unprivileged xattr"
FFLAGS="-O2 -pipe -O2 -pipe -march=native"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf-8"
LC_ALL="en_US.utf-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
MAKEOPTS="-j3"
PKGDIR="/local/tmp/huber/prefix/usr/portage/packages"
PORTAGE_CONFIGROOT="/local/tmp/huber/prefix/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/dev/shm/"
USE="acl amd64 berkdb bzip2 caps cli crypt cxx dri fortran gdbm iconv ipv6 jpeg lapack latex libtirpc lz4 lzma metis ncurses nls nptl openmp pcre pdf png prefix python readline seccomp sqlite ssl stunnel tcpd threads tiff tools unicode utils vim-syntax webp xattr xkb zlib zstd" ABI_X86="64" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="mmx mmxext sse sse2 aes avx avx2 f16c fma3 pclmul popcnt sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LLVM_TARGETS="BPF X86 WebAssembly" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide identity j2ee java mobility nb php profiler soa visualweb webcommon websvccommon xml" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-1" POSTGRES_TARGETS="postgres9_5 postgres10" PYTHON_SINGLE_TARGET="python3_6" PYTHON_TARGETS="python2_7 python3_6 python3_7" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby24" USERLAND="GNU" VIDEO_CARDS="intel" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Fabian Groffen gentoo-dev 2019-04-02 16:18:52 UTC
hmmm, I built this today just fine (gdb, eh?), so it probably has to do with your glibc version.  Which is seriously odd, since RAP is supposed to provide that one, so you shouldn't be the only one.
Comment 2 Olivier Huber 2019-04-02 16:24:05 UTC
(In reply to Fabian Groffen from comment #1)
> hmmm, I built this today just fine (gdb, eh?), so it probably has to do with
> your glibc version.  Which is seriously odd, since RAP is supposed to
> provide that one, so you shouldn't be the only one.

For me, the main issue is that during configure, the boost from the HOST is used, rather than the PREFIX. Sorry it wasn't super clear in my report.
Comment 3 Fabian Groffen gentoo-dev 2019-04-02 16:30:19 UTC
there's -I/usr/include in your post, so yeah, it seems to pick up wrong stuff
Comment 4 Olivier Huber 2019-04-03 10:46:59 UTC
Bumping EAPI to 7 and adding 
--with-boost="${ESYSROOT}"/usr \
to the econf call enables me to build it

My understanding is that in the package provided ax_boost_base.m4, whenever no path is given to --with-boost, it looks into some hard-coded paths. If a path is provided to --with-boost, then it gets searched first. That's how BOOST_CPPFLAGS ends up being set to "/usr/include" and passed to the compiler. Actually even passing a garbage value as argument to --with-boost ends up solving the issue.

Note that in my system-wide ax_boost_base.m4 file, there is the same issue:

===
AS_IF([test "x$_AX_BOOST_BASE_boost_path" != "x"],[ 
    AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) includes in "$_AX_BOOST_BASE_boost_path/include"]) 
     AS_IF([test -d "$_AX_BOOST_BASE_boost_path/include" && test -r "$_AX_BOOST_BASE_boost_path/include"],[ 
       AC_MSG_RESULT([yes]) 
       BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path/include" 
       for _AX_BOOST_BASE_boost_path_tmp in $multiarch_libsubdir $libsubdirs; do 
            AC_MSG_CHECKING([for boostlib >= $1 ($WANT_BOOST_VERSION) lib path in "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"]) 
            AS_IF([test -d "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" && test -r "$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp" ],[ 
                    AC_MSG_RESULT([yes]) 
                    BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path/$_AX_BOOST_BASE_boost_path_tmp"; 
                    break; 
            ], 
  [AC_MSG_RESULT([no])]) 
       done],[ 
  AC_MSG_RESULT([no])]) 
],[ 
    if test X"$cross_compiling" = Xyes; then 
        search_libsubdirs=$multiarch_libsubdir 
    else 
        search_libsubdirs="$multiarch_libsubdir $libsubdirs" 
    fi 
    for _AX_BOOST_BASE_boost_path_tmp in /usr /usr/local /opt /opt/local ; do 
        if test -d "$_AX_BOOST_BASE_boost_path_tmp/include/boost" && test -r "$_AX_BOOST_BASE_boost_path_tmp/include/boost" ; then 
            for libsubdir in $search_libsubdirs ; do 
                if ls "$_AX_BOOST_BASE_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi 
            done 
            BOOST_LDFLAGS="-L$_AX_BOOST_BASE_boost_path_tmp/$libsubdir" 
            BOOST_CPPFLAGS="-I$_AX_BOOST_BASE_boost_path_tmp/include" 
            break; 
        fi 
    done 
])
===

Hence, whenever no path is given to --with-boost, "/usr /usr/local /opt /opt/local" gets searched for a include/boost , and used if successful.

Hence, all packages using autotools and depending on boost will have some potential issue, unless --with-boost is given an argument.
Comment 5 Fabian Groffen gentoo-dev 2019-04-03 10:48:30 UTC
ACK, a fix like that is indeed the way to go
Comment 6 Michael Haubenwallner (RETIRED) gentoo-dev 2019-04-03 13:41:16 UTC
(In reply to Olivier Huber from comment #4)
> Bumping EAPI to 7 and adding 
> --with-boost="${ESYSROOT}"/usr \
> to the econf call enables me to build it

Although not sure about cross compiling - which you don't seem to use,
EAPI 7 doesn't feel necessary, as this most likely should read
  --with-boost="${EPREFIX}"/usr
which should work for any EAPI, including EAPI 7.
Comment 7 Olivier Huber 2019-04-03 13:46:59 UTC
(In reply to Michael Haubenwallner from comment #6)
> (In reply to Olivier Huber from comment #4)
> > Bumping EAPI to 7 and adding 
> > --with-boost="${ESYSROOT}"/usr \
> > to the econf call enables me to build it
> 
> Although not sure about cross compiling - which you don't seem to use,
> EAPI 7 doesn't feel necessary, as this most likely should read
>   --with-boost="${EPREFIX}"/usr
> which should work for any EAPI, including EAPI 7.

I'm not crosscompiling, I just thought that this would be the more general fix, and would with non negligible probability cover the XC case :) For this particular package, I'm unsure whether supporting XC is relevant ...

I am fine with both options.
Comment 8 Larry the Git Cow gentoo-dev 2019-04-09 09:48:23 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8469a591901645a4be35330c24b9a802cc2a40d4

commit 8469a591901645a4be35330c24b9a802cc2a40d4
Author:     Fabian Groffen <grobian@gentoo.org>
AuthorDate: 2019-04-09 09:48:10 +0000
Commit:     Fabian Groffen <grobian@gentoo.org>
CommitDate: 2019-04-09 09:48:10 +0000

    dev-util/source-highlight: fix build for Prefix, thanks Olivier Huber
    
    Closes: https://bugs.gentoo.org/682330
    Signed-off-by: Fabian Groffen <grobian@gentoo.org>
    Package-Manager: Portage-2.3.62, Repoman-2.3.11

 dev-util/source-highlight/source-highlight-3.1.8.ebuild | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)