Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 52775 - Apache 2.0.49-r3 ebuild fails
Summary: Apache 2.0.49-r3 ebuild fails
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Chuck Short (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-02 07:00 UTC by Jim Sager
Modified: 2004-06-02 11:16 UTC (History)
2 users (show)

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


Attachments
config.layout (config.layout,7.57 KB, text/plain)
2004-06-02 07:03 UTC, Jim Sager
Details
config.log (config.log,11.64 KB, text/plain)
2004-06-02 07:03 UTC, Jim Sager
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jim Sager 2004-06-02 07:00:27 UTC
The apache-2.0.49-r3 ebuild fails every time I try to emerge it. (2.0.49, r1 and r2 fail as well)


Reproducible: Always
Steps to Reproduce:
1. emerge apache
2.
3.

Actual Results:  
After trying "emerge apache" I get the following: 
 
... 
Configuring Apache Portable Runtime library ... 
 
checking for APR... reconfig 
updating 
cache /var/tmp/portage/apache-2.0.49-r3/work/httpd-2.0.49/config.cache 
configuring package in srclib/apr now 
configure: WARNING: If you wanted to set the --build type, don't use --host. 
    If a cross compiler is detected then cross compile mode will be used. 
configure: loading 
cache /var/tmp/portage/apache-2.0.49-r3/work/httpd-2.0.49/config.cache 
checking build system type... (cached) i686-pc-linux-gnu 
checking host system type... (cached) i686-pc-linux-gnu 
checking target system type... (cached) i686-pc-linux-gnu 
Configuring APR library 
Platform: i686-pc-linux-gnu 
checking for working mkdir -p... (cached) yes 
APR Version: 0.9.5 
checking for chosen layout... apr 
checking for i686-pc-linux-gnu-gcc... gcc 
checking for C compiler default output file name... configure: error: C 
compiler cannot create executables 
See `config.log' for more details. 
configure failed for srclib/apr 
 
!!! ERROR: net-www/apache-2.0.49-r3 failed. 
!!! Function src_compile, Line 190, Exitcode 1 
!!! bad ./configure please submit bug report to bugs.gentoo.org. Include your 
config.layout. 
 

Expected Results:  
The software should have installed. 

emerge info produces the following: 
 
Portage 2.0.50-r7 (default-x86-2004.0, gcc-3.3.3, glibc-2.3.3_pre20040420-r0, 
2.4.26_pre6-gentoo) 
================================================================= 
System uname: 2.4.26_pre6-gentoo i686 Intel(R) Celeron(R) CPU 2.40GHz 
Gentoo Base System version 1.4.15 
ccache version 2.3 [enabled] 
Autoconf: sys-devel/autoconf-2.59-r4 
Automake: sys-devel/automake-1.8.5 
ACCEPT_KEYWORDS="x86 ~x86" 
AUTOCLEAN="yes" 
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" 
CHOST="i686-pc-linux-gnu" 
COMPILER="gcc3" 
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d" 
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoaddcvs ccache sandbox" 
GENTOO_MIRRORS="ftp://ftp.ucsb.edu/pub/mirrors/linux/gentoo/ 
ftp://gentoo.chem.wisc.edu/gentoo/" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
PORTDIR_OVERLAY="/usr/local/portage" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="X alsa apache2 apm arts avi berkdb cdr crypt cups dvd dvdr encode 
foomaticdb gdbm gif gpm gtk2 imlib jpeg kde libg++ libwww lirc mad mikmod mmx 
motif mp3 mpeg mysql ncurses nls odbc oggvorbis opengl oss pam pdflib perl png 
python qt quicktime readline samba sdl slang spell sse ssl svga tcltk tcpd 
transcode truetype x86 xinerama xml2 xmms xv zlib"
Comment 1 Jim Sager 2004-06-02 07:03:20 UTC
Created attachment 32524 [details]
config.layout
Comment 2 Jim Sager 2004-06-02 07:03:48 UTC
Created attachment 32525 [details]
config.log
Comment 3 Sven Wegener gentoo-dev 2004-06-02 07:31:26 UTC
don't know if this is related to bug 49363

which version of binutils are you using?
Comment 4 Jim Sager 2004-06-02 07:36:08 UTC
binutils-2.14.90.0.8-r1
Comment 5 Sven Wegener gentoo-dev 2004-06-02 08:31:06 UTC
Sorry, I was wrong. I had a closer look at config.log.

configure:2992: checking for C compiler default output file name
configure:2995: gcc -O2 -march=pentium4 -fomit-frame-pointer -pipe -I/usr/local/include -s -ldb4 conftest.c  >&5
/usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.3/../../../../i686-pc-linux-gnu/bin/ld: cannot find -ldb4
collect2: ld returned 1 exit status

This bug seems to appear when LDFLAGS is in the current environment and is exported.

The ebuild adds -ldb4 to LDFLAGS, but if LDFLAGS wasn't declared yet it will
become by default a private variable and will not be used by configure. If you
have LDFLAGS in your environment, the variable will be used by configure and
fail.

But the real error is that -ldb4 isn't valid, correct would be -ldb-4 but that fails also, because sys-libs/db doesn't symlinks libdb-4 to libdb-4.*

I'll add dev-portage@g.o to CC because I think that this issue migh affect
portage. In ebuild.sh in dyn_compile():

[ "${LDFLAGS-unset}"     != "unset" ] && export LDFLAGS

portage will export LDFLAGS only if it is set. I think this should be modified
to export LDFLAGS="" if LDFLAGS has not been set yet. Same applies to all
other FLAG's.
Comment 6 Jim Sager 2004-06-02 09:56:18 UTC
I had LDFLAGS="-s" in make.conf. I had this set to install one of the other packages in Gentoo. I commented out the line and was able to install Apache without any problems.
Comment 7 Chuck Short (RETIRED) gentoo-dev 2004-06-02 10:42:05 UTC
Closing bug
Comment 8 Sven Wegener gentoo-dev 2004-06-02 11:16:22 UTC
Chuck, I don't consider this bug fixed. Parts of flag-o-matic eclass and I
suppose maybe several other ebuilds besides apache rely on the fact that the
*FLAGS vars have been exported to the build environment. This is not always the
case. I think that portage should set the *FLAGS vars to sane defaults and
export them, if they're not defined in make.{conf,globals} or passed via the
use environment. Currently they're only exported if they have been set.

And the fact that -ldb4 is invalid still needs to be addressed. This WORKSFORME
is just because LDFLAGS will never be passed to configure, because it is never
exported to the environment!