Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 281165 - net-libs/xulrunner-1.9.1.2-r1 + dev-libs/openssl fails to build when PROGRAM is set in the calling shell
Summary: net-libs/xulrunner-1.9.1.2-r1 + dev-libs/openssl fails to build when PROGRAM ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Lowest trivial (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-12 03:04 UTC by Mark A Rada
Modified: 2010-03-01 21:19 UTC (History)
1 user (show)

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


Attachments
The build.log (build.log,73.00 KB, text/plain)
2009-08-12 03:05 UTC, Mark A Rada
Details
The environment log from the XULrunner build (environment,222.74 KB, text/plain)
2009-09-13 15:16 UTC, Mark A Rada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark A Rada 2009-08-12 03:04:34 UTC
Last bit of build.log (see attached)
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.1/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
gmake[3]: *** [ferrous] Error 1
gmake[3]: Leaving directory `/var/tmp/portage/net-libs/xulrunner-1.9.1.2-r1/work/mozilla-1.9.1/config'
gmake[2]: *** [libs_tier_base] Error 2
gmake[2]: Leaving directory `/var/tmp/portage/net-libs/xulrunner-1.9.1.2-r1/work/mozilla-1.9.1'
gmake[1]: *** [tier_base] Error 2
gmake[1]: Leaving directory `/var/tmp/portage/net-libs/xulrunner-1.9.1.2-r1/work/mozilla-1.9.1'
make: *** [default] Error 2


Reproducible: Always

Steps to Reproduce:
1. emerge the package

Actual Results:  
Compiler finds a problem, then gives up.

Expected Results:  
XULrunner would build

Portage 2.1.6.13 (default/linux/amd64/2008.0, gcc-4.4.1, glibc-2.10.1-r0, 2.6.30-gentoo-r4-ferrous26 x86_64)
=================================================================
System uname: Linux-2.6.30-gentoo-r4-ferrous26-x86_64-AMD_Sempron-tm-_Processor_3400+-with-gentoo-2.0.1
Timestamp of tree: Wed, 12 Aug 2009 02:15:07 +0000
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p28
dev-java/java-config: 2.1.8-r1
dev-lang/python:     2.5.4-r3, 2.6.2-r1, 3.1
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.4-r2
sys-apps/baselayout: 2.0.1
sys-apps/openrc:     0.4.3-r3
sys-apps/sandbox:    2.0
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.7.9-r1, 1.9.6-r2, 1.10.2, 1.11
sys-devel/binutils:  2.19.1-r1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=k8-sse3 -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /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 /etc/udev/rules.d"
CXXFLAGS="-march=k8-sse3 -O2 -pipe"
DISTDIR="/usr/local/portage/distfiles"
FEATURES="ccache cleanup distlocks fixpackages parallel-fetch protect-owned sandbox sfperms splitdebug strict unmerge-orphans userfetch"
GENTOO_MIRRORS=" ftp://mirrors.tera-byte.com/pub/gentoo http://gentoo.mirrors.tera-byte.com/ ftp://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ http://mirror.csclub.uwaterloo.ca/gentoo-distfiles/ ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://distro.ibiblio.org/pub/linux/distributions/gentoo/ http://gentoo.chem.wisc.edu/gentoo"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en en_CA"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_COMPRESS="gzip"
PORTAGE_COMPRESS_FLAGS="-6"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/layman/sunrise /usr/local/portage/layman/verlihub /usr/local/portage/layman/haskell /usr/local/portage/layman/oss-overlay"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="3dnow 3dnowext alsa amd64 bash-completion berkdb bzip2 cli cracklib crypt cups dri fortran gdbm iconv ipv6 isdnlog kde mmx mmxext mudflap multilib ncurses nls nptl nptlonly openmp pam pch pcre perl pppd python qt4 readline reflection session spl sse sse2 sse3 ssl sysfs tcpd test unicode vim-syntax xcb xorg zlib zsh-completion" 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" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES=" actions alias authz_host autoindex cache deflate dir dbd headers ident rewrite setenvif unique_id version env file_cache filter ident include log_config mime mime_magic negotiation proxy vhost_alias proxy proxy_http " APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="evdev mouse keyboard" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_CA" USERLAND="GNU" VIDEO_CARDS="radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Mark A Rada 2009-08-12 03:05:00 UTC
Created attachment 200984 [details]
The build.log
Comment 2 Jory A. Pratt gentoo-dev 2009-08-17 23:51:42 UTC
This looks more like a bug in your toolchain rather then xulrunner. Please rebuild gcc and run fix_libtool_files.sh
Comment 3 Mark A Rada 2009-08-19 02:27:10 UTC
(In reply to comment #2)
> This looks more like a bug in your toolchain rather then xulrunner. Please
> rebuild gcc and run fix_libtool_files.sh
> 

Ok, I gave it a try and it did not work. I tried a revdep-rebuild and apparently NSS needs to be fixed, but it also will not compile. I tried to emerge -e system, but it failed at openssl. I, too, now suspect something else is wrong. 

Please advise further.
Comment 4 Jory A. Pratt gentoo-dev 2009-08-27 13:26:22 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > This looks more like a bug in your toolchain rather then xulrunner. Please
> > rebuild gcc and run fix_libtool_files.sh
> > 
> 
> Ok, I gave it a try and it did not work. I tried a revdep-rebuild and
> apparently NSS needs to be fixed, but it also will not compile. I tried to
> emerge -e system, but it failed at openssl. I, too, now suspect something else
> is wrong. 
> 
> Please advise further.
> 

Post you rbuild error for openssl if you would please.
Comment 5 Mark A Rada 2009-08-28 04:16:04 UTC
(In reply to comment #4)
> Post you rbuild error for openssl if you would please.
> 

ack -march=k8-sse3 -O2 -pipe  -c -o prime.o prime.c
x86_64-pc-linux-gnu-gcc -DMONOLITH -I.. -I../include  -fPIC -DOPENSSL_PIC -DZLIB -DOPENSSL_THREADS -D_REENTRANT -DDSO_DLFCN -DHAVE_DLFCN_H -DL_ENDIAN -DTERMIO -Wall -DMD32_REG_T=int -DOPENSSL_BN_ASM_MONT -DSHA1_ASM -DSHA256_ASM -DSHA512_ASM -DMD5_ASM -DAES_ASM -march=k8-sse3 -O2 -pipe -Wa,--noexecstack -march=k8-sse3 -O2 -pipe  -c -o cms.o cms.c
make[1]: Circular ferrous <- ferrous dependency dropped.
make[1]: *** No rule to make target `shell.o', needed by `ferrous'.  Stop.
make[1]: Leaving directory `/var/tmp/portage/dev-libs/openssl-0.9.8k-r1/work/openssl-0.9.8k/apps'
make: *** [build_apps] Error 1
 * 
 * ERROR: dev-libs/openssl-0.9.8k-r1 failed.
 * Call stack:
 *               ebuild.sh, line   49:  Called src_compile
 *             environment, line 2624:  Called die
 * The specific snippet of code:
 *       emake -j1 all rehash || die "make all failed"
 *  The die message:
 *   make all failed
 * 
 * If you need support, post the topmost build error, and the call stack if relevant.
 * A complete build log is located at '/var/tmp/portage/dev-libs/openssl-0.9.8k-r1/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/dev-libs/openssl-0.9.8k-r1/temp/environment'.
 * 

I can get the same error when I try to build a stock openssl (same version, no patches applied), but the problem actually seems to show up first when I try to `make depend':

making depend in apps...
make[1]: Entering directory `/root/openssl-0.9.8k/apps'
gcc: ferrous: No such file or directory
gcc: shell.c: No such file or directory
make[1]: Leaving directory `/root/openssl-0.9.8k/apps'


There is no shell.c file in the entire openssl archive for
versions 0.9.8k, I've also checked 0.9.8j, it isn't there
either...so the plot thickens...halp! :(
Comment 6 Jory A. Pratt gentoo-dev 2009-09-11 20:25:00 UTC
Wranglers please deside who should take this bug. It is a toolchain issue, has nothing to do with mozilla.
Comment 7 Peter Alfredsen (RETIRED) gentoo-dev 2009-09-13 13:07:47 UTC
This looks like something is polluting the builds. Could you post :
/var/tmp/portage/net-libs/xulrunner-1.9.1.2-r1/temp/environment

Comment 8 Mark A Rada 2009-09-13 15:16:45 UTC
Created attachment 203945 [details]
The environment log from the XULrunner build
Comment 9 Peter Alfredsen (RETIRED) gentoo-dev 2009-09-13 20:47:48 UTC
I can reproduce:
(export PROGRAM="ferrous shell"; ebuild /usr/portage/net-libs/xulrunner/xulrunner-1.9.1.3.ebuild clean install )
Results in the same error. Xulrunner and openssl should probably filter PROGRAM out because it leaks into their build scripts, but nevertherless you should find out where PROGRAM="ferrous shell" is set and if possible try to unset it.
Comment 10 Mark A Rada 2009-09-14 00:51:19 UTC
(In reply to comment #9)
> I can reproduce:
> (export PROGRAM="ferrous shell"; ebuild
> /usr/portage/net-libs/xulrunner/xulrunner-1.9.1.3.ebuild clean install )
> Results in the same error. Xulrunner and openssl should probably filter PROGRAM
> out because it leaks into their build scripts, but nevertherless you should
> find out where PROGRAM="ferrous shell" is set and if possible try to unset it.
> 

I know where that came from, I'm the cause of my own troubles!
I set that variable as part of my .zshrc. I tried removing it and this fixes the problem xulrunner. Thank you.
Comment 11 Jory A. Pratt gentoo-dev 2009-09-14 00:57:13 UTC
Mark as you have resolved your problems I am gonna closed invalid, if for any reason you feel the need to reopen this please feel free to.
Comment 12 Mark A Rada 2009-09-14 01:10:58 UTC
(In reply to comment #11)
> Mark as you have resolved your problems I am gonna closed invalid, if for any
> reason you feel the need to reopen this please feel free to.
> 

Quoting comment #9: 
>Xulrunner and openssl should probably filter PROGRAM out because it leaks into >their build scripts. 

Is this not something that needs to be fixed? Someone else will probably make this mistake themselves in the future.

Comment 13 Jory A. Pratt gentoo-dev 2009-09-16 00:00:28 UTC
(In reply to comment #12)
> (In reply to comment #11)
> > Mark as you have resolved your problems I am gonna closed invalid, if for any
> > reason you feel the need to reopen this please feel free to.
> > 
> 
> Quoting comment #9: 
> >Xulrunner and openssl should probably filter PROGRAM out because it leaks into >their build scripts. 
> 
> Is this not something that needs to be fixed? Someone else will probably make
> this mistake themselves in the future.
> 

The problem with filtering in anything mozilla based is that certain options can be passed via PROGRAM that will not break the build system, it will actually enhance the build. There are not well documented and not well known. This is one reason we do not check for/unset in the ebuild.
Comment 14 Mark A Rada 2009-09-16 02:22:12 UTC
(In reply to comment #13)
> 
> The problem with filtering in anything mozilla based is that certain options
> can be passed via PROGRAM that will not break the build system, it will
> actually enhance the build. There are not well documented and not well known.
> This is one reason we do not check for/unset in the ebuild.
> 

Hmm, ok, but I think this can be resolved in a way that is both safe and usable.

Perhaps a message noting that extra environment variables (e.g. PROGRAM) can break the ebuild? Perhaps a USE flag that turns on/off filtering of extra variables like PROGRAM?

This also applies to openssl, do you know if PROGRAM can be useful for that or if that ebuild can safely filter out PROGRAM?
Comment 15 Jory A. Pratt gentoo-dev 2009-09-16 02:43:15 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > 
> > The problem with filtering in anything mozilla based is that certain options
> > can be passed via PROGRAM that will not break the build system, it will
> > actually enhance the build. There are not well documented and not well known.
> > This is one reason we do not check for/unset in the ebuild.
> > 
> 
> Hmm, ok, but I think this can be resolved in a way that is both safe and
> usable.
> 
> Perhaps a message noting that extra environment variables (e.g. PROGRAM) can
> break the ebuild? Perhaps a USE flag that turns on/off filtering of extra
> variables like PROGRAM?
> 
> This also applies to openssl, do you know if PROGRAM can be useful for that or
> if that ebuild can safely filter out PROGRAM?
> 

I see with a simple grep that it uses

apps/Makefile:PROGRAM= openssl

whatelse it will allow to be passed via PROGRAM I could not answer. I do not manager and never really review the source.
Comment 16 Mark A Rada 2010-03-01 21:19:25 UTC
I noticed a warning the other day post-install letting me know about this issue, which is enough to give me a hint at what I'm doing wrong, but further improvement in the future would be nice. I consider this bug closed now.