Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 176755 - =dev-lang/R-2.5* fails to emerge with --as-needed
Summary: =dev-lang/R-2.5* fails to emerge with --as-needed
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo Science Related Packages
: 191287 195775 (view as bug list)
Depends on:
Blocks: as-needed
  Show dependency tree
Reported: 2007-05-02 02:27 UTC by Wei-Wei Guo
Modified: 2009-04-14 17:15 UTC (History)
4 users (show)

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


Note You need to log in before you can comment on or make changes to this bug.
Description Wei-Wei Guo 2007-05-02 02:27:13 UTC
The latest R-2.5.0 fails to emerge.

make[5]: Entering directory `/var/tmp/portage/dev-lang/R-2.5.0/work/R-2.5.0/src/library/grDevices/src'
make[5]: `Makedeps' is up to date.
make[5]: Leaving directory `/var/tmp/portage/dev-lang/R-2.5.0/work/R-2.5.0/src/library/grDevices/src'
make[5]: Entering directory `/var/tmp/portage/dev-lang/R-2.5.0/work/R-2.5.0/src/library/grDevices/src'
i686-pc-linux-gnu-gcc -I../../../../include -I../../../../include -I../../../include -I../../../../src/include -DHAVE_CONFIG_H 
-I/usr/local/include    -fpic  -march=pentium4 -O2 -pipe -std=gnu99 -c chull.c -o chull.o
i686-pc-linux-gnu-gcc -I../../../../include -I../../../../include -I../../../include -I../../../../src/include -DHAVE_CONFIG_H 
-I/usr/local/include    -fpic  -march=pentium4 -O2 -pipe -std=gnu99 -c devNull.c -o devNull.o
i686-pc-linux-gnu-gcc -I../../../../include -I../../../../include -I../../../include -I../../../../src/include -DHAVE_CONFIG_H 
-I/usr/local/include    -fpic  -march=pentium4 -O2 -pipe -std=gnu99 -c devPicTeX.c -o devPicTeX.o
i686-pc-linux-gnu-gcc -I../../../../include -I../../../../include -I../../../include -I../../../../src/include -DHAVE_CONFIG_H 
-I/usr/local/include    -fpic  -march=pentium4 -O2 -pipe -std=gnu99 -c devPS.c -o devPS.o
i686-pc-linux-gnu-gcc -I../../../../include -I../../../../include -I../../../include -I../../../../src/include -DHAVE_CONFIG_H 
-I/usr/local/include    -fpic  -march=pentium4 -O2 -pipe -std=gnu99 -c devQuartz.c -o devQuartz.o
i686-pc-linux-gnu-gcc -I../../../../include -I../../../../include -I../../../include -I../../../../src/include -DHAVE_CONFIG_H 
-I/usr/local/include    -fpic  -march=pentium4 -O2 -pipe -std=gnu99 -c init.c -o init.o
i686-pc-linux-gnu-gcc -shared -Wl,-O1 -Wl,--as-needed -o chull.o devNull.o devPicTeX.o devPS.o devQuartz.o init.o 
  -L../../../../lib -lR
mkdir -p -- ../../../../library/grDevices/libs
make[5]: Leaving directory `/var/tmp/portage/dev-lang/R-2.5.0/work/R-2.5.0/src/library/grDevices/src'
make[4]: Leaving directory `/var/tmp/portage/dev-lang/R-2.5.0/work/R-2.5.0/src/library/grDevices/src'
Warning: unable to load shared library '/var/tmp/portage/dev-lang/R-2.5.0/work/R-2.5.0/modules//':
  /var/tmp/portage/dev-lang/R-2.5.0/work/R-2.5.0/lib/ undefined symbol: _gfortran_st_write
Error in solve.default(rgb) : lapack routines cannot be loaded
Error: unable to load R code in package 'grDevices'
Execution halted
make[3]: *** [all] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-lang/R-2.5.0/work/R-2.5.0/src/library/grDevices'
make[2]: *** [R] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-lang/R-2.5.0/work/R-2.5.0/src/library'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-lang/R-2.5.0/work/R-2.5.0/src'
make: *** [R] Error 1

!!! ERROR: dev-lang/R-2.5.0 failed.
Call stack:, line 1614:   Called dyn_compile, line 971:   Called qa_call 'src_compile', line 44:   Called src_compile
  R-2.5.0.ebuild, line 83:   Called die

!!! emake failed

Reproducible: Always

Steps to Reproduce:
1.#emerge -av =dev-lang/R-2.5.0

[ebuild     U ] dev-lang/R-2.5.0 [2.4.1] USE="X jpeg nls png readline tk -blas -debug -lapack" 0 kB 

Portage (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.5-r1, 2.6.21-gentoo i686)
System uname: 2.6.21-gentoo i686 Mobile Intel(R) Pentium(R) 4 - M CPU 1.80GHz
Gentoo Base System release 1.12.10
Timestamp of tree: Mon, 30 Apr 2007 21:00:10 +0000
dev-java/java-config: 1.3.7, 2.0.31-r7
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
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-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.20-r2
CFLAGS="-march=pentium4 -O2 -pipe"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=pentium4 -O2 -pipe"
FEATURES="distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
USE="X acpi alsa apache2 bash-completion bitmap-fonts cjk cracklib crypt cups dbus dri dvd emacs fortran gdbm gif gtk iconv jpeg mmx mmxext mp3 mysql ncurses nls nptl nptlonly pam pcre pdf png readline reflection sse sse2 ssl tcpd tetex truetype truetype-fonts type1-fonts ucs2 unicode x86 xft xml xorg zlib" ALSA_CARDS="intel8x0" ALSA_PCM_PLUGINS="ioplug dmix iec958" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="zh_CN" USERLAND="GNU" VIDEO_CARDS="ati radeon"
Comment 1 Markus Dittrich (RETIRED) gentoo-dev 2007-05-02 13:46:26 UTC
Hi Wei-Wei Guo,

Thanks for your bug report. I think this is caused by your 
--as-needed LDFLAG. Could you please try without and
see if it emerges?

Comment 2 Wei-Wei Guo 2007-05-03 07:41:41 UTC
It emerges without the LDFLAG.


(In reply to comment #1)
> Hi Wei-Wei Guo,
> Thanks for your bug report. I think this is caused by your 
> --as-needed LDFLAG. Could you please try without and
> see if it emerges?
> Thanks,
> Markus  
Comment 3 Jakub Moc (RETIRED) gentoo-dev 2007-09-04 19:10:30 UTC
*** Bug 191287 has been marked as a duplicate of this bug. ***
Comment 4 Jakub Moc (RETIRED) gentoo-dev 2007-09-04 19:11:27 UTC
*R-2.5.0 (27 Apr 2007)

  27 Apr 2007; Danny van Dyk <> +R-2.5.0.ebuild:
  New version. As-needed patches have been applied upstream. This version
  can't be build in parallel anymore.

Hmmm, dunno what was applied upstream but it clearly didn't fix it.
Comment 5 Roderick B. Greening 2007-09-04 19:20:25 UTC
Is there a patch/fix documented anywhere?

If so, I can test and validate the fix.
Comment 6 Markus Dittrich (RETIRED) gentoo-dev 2007-09-05 13:37:55 UTC
R-2.5.* builds just fine for me using --as-needed. 

Does emerging R with USE='lapack' link properly? In this case I'd
be fine punting the lapack useflag alltogether and forcing R to
use a decent external lapack lib rather than one of these 
(potentially buggy) internal implementations that often are 
a maintenance nightmare anyway.

Comment 7 Priit Laes (IRC: plaes) 2007-09-05 15:38:30 UTC
I still got the same undefined symbol problem even with USE=lapack.
Comment 8 Priit Laes (IRC: plaes) 2007-09-05 16:10:16 UTC
Emerge with USE=blas atlas succeeded :)
Comment 9 Patrizio Bassi 2007-09-05 17:28:26 UTC
Hi Markus, with blas flag it works correctly here too.

can you make it mandatory?
Comment 10 Markus Dittrich (RETIRED) gentoo-dev 2007-09-06 13:17:42 UTC
I will do so as soon as ia64 keywords lapack-reference on
their arch (keep an eye on #189738).

Comment 11 Patrizio Bassi 2007-09-06 16:54:30 UTC
ok, can you put "depends on 189738" in this bug so?
Comment 12 Jakub Moc (RETIRED) gentoo-dev 2007-10-13 22:20:26 UTC
*** Bug 195775 has been marked as a duplicate of this bug. ***
Comment 13 Sébastien Fabbro (RETIRED) gentoo-dev 2008-01-17 11:48:56 UTC
fixed in >=dev-lang/R-2.6.1
Comment 14 Robert A. 2009-04-14 12:06:19 UTC
(In reply to comment #13)
> fixed in >=dev-lang/R-2.6.1

this is not true for =dev-lang/R-2.7.[12] with USE=-lapack
it compiles fine without --as-needed LDFLAGS but breaks the same way 2.5.0 did.
maybe a good way is to use USE=lapack and USE=blas atlas as suggested, but i didnt try it myself.

please reopen
Comment 15 Sébastien Fabbro (RETIRED) gentoo-dev 2009-04-14 17:15:42 UTC
(In reply to comment #14)
> (In reply to comment #13)
> > fixed in >=dev-lang/R-2.6.1
> this is not true for =dev-lang/R-2.7.[12] with USE=-lapack

works fine here on 2.8.1, which is being stabilized. please open a new bug with your info and build log if it is not the case.