Created attachment 469556 [details] build.log.gz checking for PCRE... no configure: error: in `/var/tmp/portage/dev-libs/glib-2.50.3-r1/work/glib-2.50.3- abi_x86_64.amd64': configure: error: The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables PCRE_CFLAGS and PCRE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. It looks like glib intentionally doesn't depend on pkgconfig to avoid circular dependencies, so I guess it needs to set PCRE_*? I've included the installed libpcre info below in case that is useful. # emerge --info libpcre Portage 2.3.3 (python 3.4.5-final-0, default/linux/amd64/13.0, gcc-4.9.4, glibc-2.23-r3, 4.9.6-gentoo-r1 x86_64) ================================================================= System Settings ================================================================= System uname: Linux-4.9.6-gentoo-r1-x86_64-Intel-R-_Xeon-R-_CPU_E5-2620_v4_@_2.10GHz-with-gentoo-2.3 KiB Mem: 32892072 total, 30263420 free KiB Swap: 33554428 total, 32989156 free Timestamp of repository gentoo: Fri, 07 Apr 2017 00:00:01 +0000 sh bash 4.3_p48-r1 ld GNU ld (Gentoo 2.26.1 p1.0) 2.26.1 app-shells/bash: 4.3_p48-r1::gentoo dev-lang/perl: 5.22.3_rc4::gentoo dev-lang/python: 2.7.12::gentoo, 3.4.5::gentoo sys-apps/baselayout: 2.3::gentoo sys-apps/openrc: 0.23.2::gentoo sys-apps/sandbox: 2.10-r3::gentoo sys-devel/binutils: 2.26.1::gentoo sys-devel/gcc: 4.9.4::gentoo sys-devel/gcc-config: 1.7.3::gentoo sys-devel/make: 4.2.1::gentoo sys-kernel/linux-headers: 4.4::gentoo (virtual/os-headers) sys-libs/glibc: 2.23-r3::gentoo Repositories: gentoo location: /usr/portage sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 wthrowe-misc location: /usr/local/overlays/wthrowe-misc masters: gentoo priority: 0 wthrowe-multilib location: /usr/local/overlays/wthrowe-multilib masters: gentoo priority: 1 barnowl location: /var/lib/layman/barnowl masters: gentoo priority: 50 ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -ggdb" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe -ggdb" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--ask --quiet-build=n --autounmask-write=n --usepkg --with-bdeps=n --binpkg-respect-use=y --binpkg-changed-deps=y" FCFLAGS="-O2 -pipe" FEATURES="assume-digests binpkg-logs binpkg-multi-instance buildpkg clean-logs compress-build-logs compressdebug config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync network-sandbox news parallel-fetch preserve-libs protect-owned sandbox sfperms split-log splitdebug strict unknown-features-warn unmerge-orphans userfetch userpriv usersandbox usersync xattr" FFLAGS="-O2 -pipe" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="POSIX" LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu" MAKEOPTS="-j24" PKGDIR="/var/cache/packages" PORTAGE_CONFIGROOT="/" 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="/var/tmp" USE="acl amd64 bindist bzip2 cli cracklib crypt cxx dri fortran iconv ipv6 modules multilib ncurses nls nptl openmp pam pcre readline seccomp session ssl tcpd unicode xattr zlib" 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="kexi words flow plan sheets stage tables krita karbon braindump author" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 fma3 mmx mmxext popcnt sse sse2 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" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_4" RUBY_TARGETS="ruby21" USERLAND="GNU" VIDEO_CARDS="amdgpu fbdev intel nouveau radeon radeonsi vesa dummy v4l" 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, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON ================================================================= Package Settings ================================================================= dev-libs/libpcre-8.40-r1::gentoo was built with the following: USE="bzip2 cxx jit readline recursion-limit (unicode) zlib -libedit -pcre16 -pcre32 -static-libs" ABI_X86="64 -32 -x32"
Sounds correct that there might be oversight on this after libpcre system version started to be used instead of bundled one. I hope you'll be able to test for us a proper fix on this system of yours that seems to be in the initial install phase, or some chroot test - I hope to commit a fix try within 24 hours...
(In reply to Mart Raudsepp from comment #1) > Sounds correct that there might be oversight on this after libpcre system > version started to be used instead of bundled one. > I hope you'll be able to test for us a proper fix on this system of yours > that seems to be in the initial install phase, or some chroot test - I hope > to commit a fix try within 24 hours... Sure, I can test it. Just let me know when it's ready.
Actually I'm not sure about this anymore. There is a new circular dependency going on here, as dev-libs/glib needs libpcre, libpcre needs virtual/pkgconfig and its default provider dev-util/pkgconfig needs dev-libs/glib when !internal-glib. So I think the issue here is that, not that we are missing LIBPCRE_LIBS and whatnot for this case - there wouldn't be a library there anyways, as for installing that you needed a pkgconfig already.. How did you get to this situation btw?
Mainly as stage3 already has a working pkgconfig. It is another question how our autobuilds of stage3 are even working still after this, not ending up in some circular failure as well... but getting too late to figure this out really; I could slap a PCRE_CFLAGS and PCRE_LIBS alongside the already existing LIBFFI_* stuff in the same branch, but something more fundamental is going on here as discussed before.
"too late" - too late for me clockwise at 3am to think further before sleep, that's all. Just clarifying as on re-read myself it sounded like "it's too late to fix it, keep it broken" :D
Adding libpcre maintainers to CC to think along meanwhile
So as pointed out by radhermit on IRC, stage building uses BOOTSTRAP_USE during initial pass, so it ends up with a dev-util/pkgconfig built with internal-glib as that's in base profiles make.default BOOTSTRAP_USE. Then it has a working pkgconfig to play with and eventually builds glib and rebuilds pkgconfig without internal-glib. So if you want to use dev-util/pkgconfig as virtual/pkgconfig provider (it is the default choice as the canonical "standard" pkgconfig), but do not have yet a working pkgconfig, you'd need to bootstrap it with a temporary internal-glib USE as well. Now maybe in coordination with libpcre maintainers we can think of something - if libpcre could manage to build without pkgconfig as well, similar to how glib tries to for FFI and co, then we could add the LIBPCRE_CFLAGS/LIBS as well, as then libpcre would have removed the virtual/pkgconfig build requirement. That said, we probably should add it anyways, as theoretically there's the possibility that one removed dev-util/pkgconfig and virtual/pkgconfig, as a build time only dependency, but already has libpcre installed. Then in this situation declaring the flags manually would help out, as a libpcre is available on the system actually, just pkgconfig was removed after it got built. So, still interested in the question in comment #3 - how did you end up in a situation without pkgconfig
(In reply to Mart Raudsepp from comment #3) > How did you get to this situation btw? This machine generally installs things from binpackages, so I let depclean remove build dependencies because they aren't needed for most installs and they can be reinstalled quickly from binpackages. The dependencies of glib (including libpcre) were installed from binpackages and so only pulled in runtime dependencies, but glib was only recently stabilized so I don't have a binpackage for it yet. The setup does have a tendency to hit missing dependencies from time to time, but I figure filing bugs is useful and it is trivial to work around them if I'm in a hurry.
Please try once you can get this from your rsync or whatnot: commit cd4ccb9ea11b995ec9ecc751ab57241fbef78195 Author: Mart Raudsepp <leio@gentoo.org> Date: Tue Apr 11 04:35:10 2017 +0300 dev-libs/glib: Export PCRE_LIBS in the no-pkgconfig case We have by now started to use the system libpcre unconditionally, instead of the bundled version, but this needs pkgconfig to be found. So we need to handle this in the no-pkgconfig case as well, alongside FFI. However this suggests there is no point in this case anymore and we should just build depend on pkgconfig, as we can't get a working pkgconfig anymore without bootstrapping it via USE=internal-glib as libpcre currently needs pkgconfig as a build dependency already. Until this is still in the pondering phase, this PCRE_LIBS exporting should at least fix the cases where pkgconfig got depcleaned inbetween but libpcre exists on system. Gentoo-bug: 615092 If it works, good, but lets leave the bug open for the other concerns and I can retitle it for that then (unless you want it to be a new bug you don't report to stop receiving mails as the reporter :D)
Surprisingly, that didn't fix it, so I looked at what configure was actually checking. It turns out it was doing `test -n "$PCRE_CFLAGS"`, so I tried changing the ebuild to set PCRE_CFLAGS=" " and then it worked. I have no objection to this bug being retitled and used for further discussion.
ok, I guess that makes sense, I can't find a proper test POSIX argument to check for if variable is set or not (bash has them, but..), so I guess it just uses a non-zero length check to get around it well enough. commit 472e0c888545cd51abaf57e6e0cb941ce91afca7 Author: Mart Raudsepp <leio@gentoo.org> Date: Tue Apr 11 08:09:15 2017 +0300 dev-libs/glib: Tweak PCRE_CFLAGS for non-pkgconfig in a way that makes it happy Thanks-to: William Throwe - export PCRE_CFLAGS="" + export PCRE_CFLAGS=" " # test -n "$PCRE_CFLAGS" needs to pass
With port to meson, we necessarily have to depend on virtual/pkgconfig. The default provider now for it is dev-util/pkgconf[pkg-config], which should be used over dev-util/pkgconfig, so there are no circular problems with it anymore then, as pkgconf does not depend on glib. dev-util/pkgconfig (the one needing glib or USE=internal-glib) will be last rited at some point later this year.