Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 250068 - dev-cpp/cppserv fails to build with forced --as-needed
Summary: dev-cpp/cppserv fails to build with forced --as-needed
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Ilya Volynets (RETIRED)
Depends on:
Blocks: as-needed
  Show dependency tree
Reported: 2008-12-06 19:46 UTC by Diego Elio Pettenò (RETIRED)
Modified: 2009-06-13 21:44 UTC (History)
0 users

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

Build log (cppserv-0.1.117:20081204-204420.log,31.21 KB, text/plain)
2008-12-06 19:47 UTC, Diego Elio Pettenò (RETIRED)
Build log (cppserv-0.2.8:20090330-131849.log,35.26 KB, text/plain)
2009-03-30 13:39 UTC, Diego Elio Pettenò (RETIRED)
Build log for 0.2.11 (cppserv-0.2.11:20090601-191856.log,37.04 KB, text/plain)
2009-06-02 14:47 UTC, Diego Elio Pettenò (RETIRED)

Note You need to log in before you can comment on or make changes to this bug.
Description Diego Elio Pettenò (RETIRED) gentoo-dev 2008-12-06 19:46:47 UTC
Portage 2.1.6_rc1 (default/linux/x86/2008.0, gcc-4.1.2-asneeded, glibc-2.8_p20080602-r0, 2.6.27-gentoo-r4 i686)
System uname: Linux-2.6.27-gentoo-r4-i686-Quad-Core_AMD_Opteron-tm-_Processor_2350-with-glibc2.0
Timestamp of tree: Wed, 03 Dec 2008 15:36:01 +0000
ccache version 2.4 [disabled]
app-shells/bash:     3.2_p48
dev-java/java-config: 1.3.7, 2.1.6-r1
dev-lang/python:     2.5.2-r8
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r8
dev-util/cmake:      2.6.2
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.3.0-r1
sys-devel/autoconf:  2.13, 2.63
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.2
sys-devel/binutils:  2.19
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.27-r2
CFLAGS="-O2 -pipe"
CONFIG_PROTECT="/etc /opt/glftpd/etc /opt/glftpd/ftp-data /opt/openfire/resources/security/ /opt/openjms/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /var/bind /var/lib/hsqldb /var/phxd /var/qmail/alias /var/qmail/control /var/spool/torque /var/vpopmail/etc"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/eselect/postgresql /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/splash /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-O2 -pipe"
FEATURES="distlocks parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
INSTALL_MASK=" 	/usr/share/doc 	/usr/share/man 	/usr/share/info"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
USE="acl berkdb bzip2 cli cracklib crypt cups dri fortran gdbm gpm iconv ipv6 isdnlog midi mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl sysfs tcpd unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 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 auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="fbdev glint i810 intel mach64 mga neomagic nv r128 radeon savage sis tdfx trident vesa vga via vmware voodoo"
Comment 1 Diego Elio Pettenò (RETIRED) gentoo-dev 2008-12-06 19:47:06 UTC
Created attachment 174454 [details]
Build log
Comment 2 Ilya Volynets (RETIRED) gentoo-dev 2008-12-13 12:59:14 UTC
Which version of SPTK was actually installed? With which flags?
Also, can this be reproduced with -j1?
Comment 3 Ilya Volynets (RETIRED) gentoo-dev 2008-12-29 19:03:44 UTC
New cppserv release has been published, which changed dep tracking a bit.
I wasn't able to reproduce this particular problem, but I suspect it might have been fixed... If not fixed with cppserv-0.2.0, feel free to reopen.
Comment 4 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-03-30 13:38:59 UTC
Still there with 0.2.8, I'll have to check if it's parallel make, sptk installed is
Comment 5 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-03-30 13:39:11 UTC
Created attachment 186749 [details]
Build log
Comment 6 Ilya Volynets (RETIRED) gentoo-dev 2009-04-01 07:33:50 UTC
Can you also attach contents of release/env-tests/log ?
Comment 7 Ilya Volynets (RETIRED) gentoo-dev 2009-04-01 07:36:41 UTC
Also, which use flags are enabled on SPTK?
Comment 8 Ilya Volynets (RETIRED) gentoo-dev 2009-04-25 12:39:18 UTC
Grrr... Can I get that log file I requested?
Comment 9 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-04-25 12:49:51 UTC
Ehm sorry I have to run it through the tinderbox once again :/ I clear the tinderbox status weekly (to avoid running out of space), I'll try to give you the log today.
Comment 10 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-04-25 19:18:20 UTC
[ebuild   R   ] dev-cpp/sptk-  USE="-aspell -doc -examples -excel -fltk -mysql -odbc -postgres -sqlite" 0 kB

The log you're asking is empty (0-sized).
Comment 11 Ilya Volynets (RETIRED) gentoo-dev 2009-04-28 07:21:59 UTC
Hmm.. I still can't reproduce it in-house. Do you actually have so many processors available? Or is it a distcc farm?
Comment 12 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-04-28 08:15:47 UTC
I have, it's a dual quadcore.
Comment 13 Ilya Volynets (RETIRED) gentoo-dev 2009-05-08 09:19:08 UTC
I don't have any usable HW to reproduce this on :(
Can I get shell access to your tinderbox machine to fix this?
Comment 14 Ilya Volynets (RETIRED) gentoo-dev 2009-05-11 15:46:24 UTC
I modified build system to give better error reporting. If you could attach build output log from cppserv-0.2.9, it could help. And that shell access too :) ...
Comment 15 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-06-02 14:47:11 UTC
Created attachment 193296 [details]
Build log for 0.2.11

I cannot give you remote access sorry :/ (the box is not strictly secured as it is), but I still have the problem with 0.2.11.
Comment 16 Ilya Volynets (RETIRED) gentoo-dev 2009-06-06 12:20:33 UTC

g++ -lsputil3 -lpthread -O2 -pipe -Wl,-O1 env-tests/sptk-namespace-kirpich.cpp -o release/env-tests/sptk-namespace-kirpich
COMPILER=gcc ./env-tests/ "libmagic-kirpich.c" "libmagic-kirpich" "-lmagic -O2 -pipe  -Wl,-O1" "HAVE_LIBMAGIC:=1" "HAVE_LIBMAGIC:=0">release/env-tests/HAVE_LIBMAGIC.cache
gcc -lmagic -O2 -pipe -Wl,-O1 env-tests/libmagic-kirpich.c -o release/env-tests/libmagic-kirpich
/var/tmp/portage/dev-cpp/cppserv-0.2.11/temp/ccAKTReu.o: In function `main':
libmagic-kirpich.c:(.text+0x24): undefined reference to `magic_open'
libmagic-kirpich.c:(.text+0x36): undefined reference to `magic_load'
libmagic-kirpich.c:(.text+0x44): undefined reference to `magic_file'
collect2: ld returned 1 exit status
/var/tmp/portage/dev-cpp/cppserv-0.2.11/temp/ccPOJCwq.o: In function `global constructors keyed to buf':
sptk-namespace-kirpich.cpp:(.text+0x36): undefined reference to `sptk::CBuffer::CBuffer(unsigned int)'
collect2: ld returned 1 exit status
/var/tmp/portage/dev-cpp/cppserv-0.2.11/temp/ccPcORWq.o: In function `global constructors keyed to buf':
sptk-kirpich.cpp:(.text+0x36): undefined reference to `sptk::CBuffer::CBuffer(unsigned int)'
collect2: ld returned 1 exit status

Both sptk and libmagic are present, yet they don't link correctly.
Did we test non-parallel build on your system, after all? Errors above
make me doubt it's related to parallelization.

Comment 17 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-06-06 12:37:34 UTC
Good catch! I have never noticed that one in the whole log, sounds like an --as-needed issue indeed!
Comment 18 Ilya Volynets (RETIRED) gentoo-dev 2009-06-07 22:22:45 UTC
While that sounds plausible, both cases above (libmagc test and sptk namespace test) link directly to the library which defines symbols in question. I don't quite see why would --as-needed drop those libraries in such a case.
Comment 19 Diego Elio Pettenò (RETIRED) gentoo-dev 2009-06-07 22:36:22 UTC
The problem is in the order used to link; ld parameters _are_ positional, so providing the library first and then the object files makes it discard the library. See for the details.
Comment 20 Ilya Volynets (RETIRED) gentoo-dev 2009-06-13 14:59:10 UTC
Mmm... That shouldn't apply to object files - just to libraries, but yeah... I'll fix the link order
Comment 21 Ilya Volynets (RETIRED) gentoo-dev 2009-06-13 21:44:02 UTC
Should be fixed now, with 0.2.12