Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 108266 - apache doesn't compile (maybe ebuild/patch problem)
Summary: apache doesn't compile (maybe ebuild/patch problem)
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal
Assignee: Apache Team - Bugzilla Reports
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-06 05:47 UTC by Mark
Modified: 2005-10-08 11:03 UTC (History)
0 users

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


Attachments
this is the output of ps -A f as requested (ps-Af.txt,13.48 KB, text/plain)
2005-10-07 02:28 UTC, Mark
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark 2005-10-06 05:47:47 UTC
I cannot emerge apache 2.0.54-rXX on my system:    
The tarball is being untared and configure runs.    
Then make starts but hangs immediatelly. It is no hangup, it is some kind of a 
sleep-deadlock, because ps -A shows some sleep commands running until I kill 
the ebuild and the compile messages don't change on the screen.    
I tried to kill the sleep commands but that only started them again.    
   
I reduced my CFLAGS and CXXFLAGS to nothing, that didn't change anything.   
   
Then I used the apache tarball from my distfiles directory and configured & 
compiled it with the configure-parameters that ebuild uses. That worked 
flawlessly.    
So this may be either an ebuild problem or one of the gentoo patches that are    
applied to the apache sources causes this.    
    
I have this problem only on one of three machines, this is strange.    
The hardware is ok though, I testet my memory with memtest+ and everything    
else is fine.  
  
The ebuild apr-util shows the same behaviour. Both ebuilds get stuck on a 
command like this: 
 
/usr/share/apr-0/build/libtool --silent --mode=compile i686-pc-linux-gnu-gcc  
-pthread  -march=athlon-xp -m3dnow -mfpmath=sse -O2 -pipe -fforce-addr 
-funroll-loops -maccumulate-outgoing-args -fprefetch-loop-arrays 
-Wl,-O1,-z,now  -DLINUX=2 -D_REENTRANT -D_XOPEN_SOURCE=500 -D_BSD_SOURCE 
-D_SVID_SOURCE -D_GNU_SOURCE -DAP_HAVE_DESIGNATED_INITIALIZER   
-I/usr/include/apr-0 -I. 
-I/var/tmp/portage/apache-2.0.54-r31/work/httpd-2.0.54/os/unix 
-I/var/tmp/portage/apache-2.0.54-r31/work/httpd-2.0.54/server/mpm/prefork 
-I/var/tmp/portage/apache-2.0.54-r31/work/httpd-2.0.54/modules/http 
-I/var/tmp/portage/apache-2.0.54-r31/work/httpd-2.0.54/modules/filters 
-I/var/tmp/portage/apache-2.0.54-r31/work/httpd-2.0.54/modules/proxy 
-I/var/tmp/portage/apache-2.0.54-r31/work/httpd-2.0.54/include 
-I/var/tmp/portage/apache-2.0.54-r31/work/httpd-2.0.54/modules/generators 
-I/usr/include/openssl 
-I/var/tmp/portage/apache-2.0.54-r31/work/httpd-2.0.54/modules/dav/main 
-prefer-non-pic -static -c get.c && touch get.lo 

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




Portage 2.0.51.22-r2 (default-linux/x86/2005.0, gcc-3.4.4, glibc-2.3.5-r2, 
2.6.11.11 i686) 
================================================================= 
System uname: 2.6.11.11 i686 AMD Athlon(tm) XP 1700+ 
Gentoo Base System version 1.6.13 
ccache version 2.4 [enabled] 
dev-lang/python:     2.4.2 
sys-apps/sandbox:    1.2.13 
sys-devel/autoconf:  2.13, 2.59-r7 
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1 
sys-devel/binutils:  2.16.1 
sys-devel/libtool:   1.5.20 
virtual/os-headers:  2.6.11-r2 
ACCEPT_KEYWORDS="x86 ~x86" 
AUTOCLEAN="yes" 
CBUILD="i686-pc-linux-gnu" 
CFLAGS="-march=athlon-xp -m3dnow -mfpmath=sse -O2 -pipe -fforce-addr 
-funroll-loops -maccumulate-outgoing-args -fprefetch-loop-arrays 
-Wl,-O1,-z,now" 
CHOST="i686-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3/share/config /usr/share/config /var/qmail/control" 
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" 
CXXFLAGS="-march=athlon-xp -m3dnow -mfpmath=sse -O3 -pipe -fforce-addr 
-funroll-loops -maccumulate-outgoing-args -fprefetch-loop-arrays 
-Wl,-O1,-z,now" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoconfig ccache digest distlocks sandbox sfperms strict" 
GENTOO_MIRRORS="ftp://ftp.informatik.rwth-aachen.de/pub/Linux/gentoo" 
LINGUAS="de" 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
SYNC="rsync://rsync.gentoo.org/gentoo-portage" 
USE="3dnow acl acpi aim apache2 bash-completion berkdb bzlib ck-server crypt 
curl dba fortran ftp gd gdbm gif gpm hardenedphp icq imagemagick imap jabber 
java jce jpeg jpeg2k libwww lzo maildir mime mmx msn mysql ncurses network nls 
nptl nptlonly odbc oscar pam pcre perl php png posix postgres python readline 
session sharedext slang sockets speex spell sqlite ssl sysfs tcpd tetex tiff 
unicode webdav x86 xml xml2 zlib linguas_de userland_GNU kernel_linux 
elibc_glibc" 
Unset:  ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, PORTDIR_OVERLAY
Comment 1 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-10-06 21:03:27 UTC
Can you post a `ps -A f` so we can see in more detail what processes are running
when this seems to hang?
Comment 2 Mark 2005-10-07 02:28:43 UTC
Created attachment 70057 [details]
this is the output of ps -A f as requested

The apache instances running there are from old times. They were compiled with
another computer. This is why I need to upgrade =)
Comment 3 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-10-07 18:35:12 UTC
were apr/apr-util compiled on the same machine as this is happening on, or were
they compiled elsewhere and the binaries put here?

for some reason, your libtool is using locking.

The simple workaround is to take -j2 out of MAKEOPTS.

As to why your libtool is using locking, I have no idea, and I'm not sure how to
fix that, except maybe ummerging apr and apr-utils, then starting over emerging
apr apr-util and apache.
Comment 4 Mark 2005-10-07 18:56:37 UTC
removing -j2 or changing it to -j1 does not work, I already tried (sorry, 
forgot to post that). 
apr-util was built in the same way the current apache has been built... 
(apr instead compiles fine on that machine, only apache and apr-util don't 
work) 
 
Unmerging apr-util and apache first and then emerge them is a bit risky. If 
that doesn't work, I'll have no working version - but I'll try if there's no 
other way... 
Comment 5 Mark 2005-10-07 19:31:38 UTC
unmerged apr apr-util apache, set cflags to none, set makeopts to none, emerged  
apache - nothing 
Tried several libtool versions - no change... I'm running wild... 
Comment 6 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-10-07 19:34:17 UTC
Remove everything in the /var/tmp/portage and try again

/var/tmp/portage is the temporary area used for building packages, it's possible
there's something there that is causing apache to not reconfigure itself correctly.
Comment 7 Mark 2005-10-07 19:55:36 UTC
cleaned 
up /tmp, /var/tmp, /var/tmp/portage, /var/tmp/ccache, /usr/portage/distfiles, /root/.ccache,  
- no change :-/ 
Comment 8 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-10-07 20:22:11 UTC
open /usr/lib/apr-0/build/libtool, find need_locks=yes and replace it with
need_locks=warn, and see what error messages you get.

The error message should be similiar to the following:
*** ERROR, $lockfile exists and contains:
[...]

This indicates that another process is trying to use the same
temporary object file, and libtool could not work around it because
your compiler does not support \`-c' and \`-o' together.  If you
repeat this compilation, it may succeed, by chance, but you had better
avoid parallel builds (make -j) in this platform, or get a better
compiler."


I will want the part I snipped out here. I have no idea if it will provide
useful information, but it will at least ignore the locks this time.

Comment 9 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-10-07 20:37:51 UTC
is your PORTAGE_TMPDIR on a different partition then
/usr/lib/apr-0/build/libtool ? the locking tries to do a hard link, which
doesn't work across partitions.

Reference: bug 40992

for apache, set PORTAGE_TMPDIR to the same partition as /usr and see if that
solves this
Comment 10 Mark 2005-10-07 20:44:52 UTC
yes, that solves the problem! I have /var on another partition. I   
symlinked /var/tmp to /tmp and now it compiles (with full cflags, -j2 etc etc). 
wooohoo! thx. 
Comment 11 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-10-08 11:03:47 UTC
problem solved.