When attempting to compile boswars 2.5, "scons" complains that it can't find the png library or headers: >>> Source unpacked. >>> Compiling source in /var/tmp/portage/portage/games-strategy/boswars-2.5/work/boswars-2.5-src ... scons: Reading SConscript files ... build_conf_cache.py doesn't exist or out of date. Generating new build config cache ... Checking for C library png... no Did not find png library or headers, exiting! Reproducible: Always Steps to Reproduce:
reopen with the output from emerge --info and the config.log from the build directory please.
Hrm. Apparently if I run scons on my own, from the unpacked source, it works fine. But when the ebuild runs it, it fails. Here is what config.log spits out (even though running that gcc command on my own works fine). ========================= file /var/tmp/portage/portage/games-strategy/boswars-2.5/work/boswars-2.5-src/SConstruct,line 201: Configure(confdir = .sconf_temp) scons: Configure: Checking for C library png... .sconf_temp/conftest_0.c <- | | |#include "png.h" | |int |main() { | |return 0; |} | gcc -o .sconf_temp/conftest_0.o -c -fsigned-char -I/usr/local/include .sconf_temp/conftest_0.c scons: Configure: no ======================================== and here is my emerge --info ====================================================================== Portage 2.1.5_rc2 (default-linux/amd64/2007.0/no-multilib, gcc-4.2.3, glibc-2.6.1-r0, 2.6.23-rc7 x86_64) ================================================================= System uname: 2.6.23-rc7 x86_64 AMD Turion(tm) 64 Mobile Technology ML-30 Timestamp of tree: Mon, 07 Apr 2008 15:03:01 +0000 ccache version 2.4 [enabled] app-shells/bash: 3.2_p17-r1 dev-java/java-config: 1.3.7, 2.0.31-r3 dev-lang/python: 2.5.1-r5 dev-python/pycrypto: 2.0.1-r6 dev-util/ccache: 2.4 sys-apps/baselayout: 1.12.10-r4 sys-apps/sandbox: 1.2.18.1-r2 sys-devel/autoconf: 2.13, 2.61 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1, 1.10.1 sys-devel/binutils: 2.17 sys-devel/gcc-config: 1.3.12-r4 sys-devel/libtool: 1.5.26 virtual/os-headers: 2.6.11-r2 ACCEPT_KEYWORDS="amd64 ~amd64" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O3 -march=k8 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CXXFLAGS="-O3 -march=k8 -pipe -fomit-frame-pointer" FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch" LANG="en_US.utf8" LC_ALL="en_US.utf8" LDFLAGS="" PKGDIR="/usr/portage/packages" Unset: CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS =============================================================
From: /var/tmp/portage/portage/games-strategy/boswars-2.5/temp/environment There are a few references to -L/emul/linux/x86 ... but I am running a strict (no multilib) 64bit system (no 32bit emulation) ... perhaps that is the problem :| (but why on earth would it *require* 32bit emulation?) === ABI=amd64 ARCH=amd64 ASFLAGS_x86=--32 CBUILD=x86_64-pc-linux-gnu CDEFINE_amd64=__x86_64__ CDEFINE_default=__unix__ CDEFINE_x86=__i386__ CFLAGS='-O3 -march=k8 -pipe -fomit-frame-pointer' CFLAGS_default= CFLAGS_x86='-m32 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib' CHOST=x86_64-pc-linux-gnu CHOST_amd64=x86_64-pc-linux-gnu CHOST_default=x86_64-pc-linux-gnu CHOST_x86=i686-pc-linux-gnu LDFLAGS= LDFLAGS_default= LDFLAGS_x86='-m elf_i386 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib' LIBDIR_amd64=lib64 LIBDIR_default=lib LIBDIR_x86=lib32 LDFLAGS= LDFLAGS_default= LDFLAGS_x86='-m elf_i386 -L/emul/linux/x86/lib -L/emul/linux/x86/usr/lib' LIBDIR_amd64=lib64 LIBDIR_default=lib LIBDIR_x86=lib32 ===
Ok. I finally tracked the "bug" down. It won't compile with ccache enabled (FEATURES="ccache" in make.conf). With ccache, /usr/lib/ccache/bin gets placed at the beginning of PATH, and used, apparently, unsuccessfully. (If I place it at the end of PATH, it works). Any idea why it doesn't work with ccache? Bad SConstruct file, or bad scons?
Builds fine for me with ccache on stable x86. Seems like either a local issue or specific to amd64.
seems like an amd64-specific issue. Still can't reproduce it on x86.
Hrm. I re-emerged ccache and it worked. I wonder why I didn't try doing that before. Well, whatever was the problem, it's all good now. I swear I'm not crazy.