Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 272251 - sci-visualization/opendx-4.3.2-r1 fails to build: checking whether -lstdc++ is needed... failed even with lstdc++
Summary: sci-visualization/opendx-4.3.2-r1 fails to build: checking whether -lstdc++ i...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Science Related Packages
URL:
Whiteboard:
Keywords:
: 273298 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-06-02 12:07 UTC by David Radice
Modified: 2009-10-09 04:09 UTC (History)
2 users (show)

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


Attachments
Building logfile. (build.log,27.65 KB, text/plain)
2009-06-02 12:08 UTC, David Radice
Details
config.log.gz (config.log.gz,49.46 KB, application/octet-stream)
2009-06-02 12:53 UTC, David Radice
Details
opendx-4.3.2-gcc43.patch (opendx-4.3.2-gcc43.patch,9.59 KB, patch)
2009-06-02 15:39 UTC, David Radice
Details | Diff
opendx-4.3.2-gcc43.patch (opendx-4.3.2-gcc43.patch,5.32 KB, text/plain)
2009-06-03 08:04 UTC, David Radice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Radice 2009-06-02 12:07:34 UTC
The building fails at the configuration stage.

Reproducible: Always

Steps to Reproduce:
1. emerge opendx
2.
3.

Actual Results:  
the second third and fourth args to select are pointers to fd_set
checking for unistd.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for sys/socket.h... (cached) yes
the third arg to getsockname is pointer to socklen_t
checking whether -lstdc++ is needed... failed even with lstdc++

Expected Results:  
OpenDX should be compiled and installed.

davide@macbook ~ $ emerge --info
Portage 2.1.6.11 (default/linux/amd64/2008.0/desktop, gcc-4.3.2, glibc-2.8_p20080602-r1, 2.6.27-gentoo-r8 x86_64)
=================================================================
System uname: Linux-2.6.27-gentoo-r8-x86_64-Intel-R-_Core-TM-2_CPU_T7200_@_2.00GHz-with-glibc2.2.5
Timestamp of tree: Mon, 01 Jun 2009 09:00:01 +0000
app-shells/bash:     3.2_p39
dev-lang/python:     2.5.4-r2
dev-util/cmake:      2.6.4
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.5, 1.7.9-r1, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.27-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=core2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/init.d /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /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="-O2 -march=core2 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--with-bdeps=y"
FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"
FFLAGS="-O2 -march=core2 -pipe"
GENTOO_MIRRORS="ftp://ftp.spline.inf.fu-berlin.de/mirrors/gentoo/ http://ftp.uni-erlangen.de/pub/mirrors/gentoo http://mirror.netcologne.de/gentoo/ ftp://mirror.cambrium.nl/pub/os/linux/gentoo/ http://gentoo.mirror.dkm.cz/pub/gentoo/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en it"
PKGDIR="/usr/portage/packages"
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/mine /usr/local/portage/layman/science /usr/local/portage/layman/sunrise"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa amd64 bash-completion berkdb bzip2 cairo cdr cli cracklib crypt cups dbus dri dvd dvdr dvdread emboss encode fam ffmpeg firefox fortran ftp gdbm gif gphoto2 gpm gtk hal iconv imagemagick ipv6 isdnlog jpeg lapack latex ldap libnotify lirc mad midi mikmod mmx mp3 mpeg msn mudflap multilib ncurses nptl nptlonly ogg opengl openmp pam pcre pdf perl png ppds pppd python quicktime readline reflection sdl session spell spl sqlite sse sse2 ssl ssse3 startup-notification svg sysfs tcpd tiff truetype unicode usb v4l2 vim-syntax vorbis xcomposite xml xorg xscreensaver xv xvid zlib" 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 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 synaptics" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en it" LIRC_DEVICES="macmini" NETBEANS_MODULES="apisupport cnd groovy gsf harness ide j2ee java php nb visualweb websvccommon" USERLAND="GNU" VIDEO_CARDS="i810 intel vesa"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, LC_ALL, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 David Radice 2009-06-02 12:08:53 UTC
Created attachment 193284 [details]
Building logfile.
Comment 2 David Radice 2009-06-02 12:33:19 UTC
I should mention that opendx-4.4.4-r2 works fine.
Comment 3 Rafał Mużyło 2009-06-02 12:36:53 UTC
Could you start with attaching config.log ?

As I don't see a publicly available source link
(one with the form doesn't count, due to the form),
could you attach the macro it uses for that failing check too ?
Comment 4 David Radice 2009-06-02 12:53:51 UTC
Created attachment 193286 [details]
config.log.gz
Comment 5 David Radice 2009-06-02 12:55:05 UTC
Here is the macro it uses for the failing test:

dnl
dnl  Determine whether the stdc++ libraries are needed to compile successfully.
dnl  -------------------------------------------------------------
AC_DEFUN(DX_NEEDS_STDCXX,
[
    AC_MSG_CHECKING(whether -lstdc++ is needed)
    tmpLIBS=$LIBS
    AC_CACHE_VAL(ac_cv_requires_lstdcxx,
    [
	AC_LANG_PUSH([C++])
	AC_LINK_IFELSE([AC_LANG_PROGRAM([[
		#include <iostream.h>
	    ]], [[
		cout << "foo";
	    ]])],[ac_cv_requires_lstdcxx="no"],[
		LIBS="$LIBS -lstdc++"
		AC_LINK_IFELSE([AC_LANG_PROGRAM([[
			#include <iostream.h>
		    ]],
		    [[
			cout << "foo";
		    ]])],
		    [ac_cv_requires_lstdcxx="yes"],
		    [
			AC_MSG_RESULT(failed even with lstdc++)
			exit 1
		    ]
		)
	    
	])
	AC_LANG_POP([])
    ])
    AC_MSG_RESULT(${ac_cv_requires_lstdcxx})
])
Comment 6 Sebastian Luther (few) 2009-06-02 13:09:29 UTC
The interessting part of the config.log is:

configure:39260: x86_64-pc-linux-gnu-g++ -o conftest  -march=core2 -pipe -fno-strength-reduce   -Wl,-O1  conftest.cpp -lnsl -lXpm -ltiff -ldl -lXm -lXp -lGLU -lGL -lm -lXext -lXt -lX11 -lSM -lICE -lpthread   -lstdc++ >&5
conftest.cpp:262:25: error: iostream.h: No such file or directory
conftest.cpp: In function 'int main()':
conftest.cpp:268: error: 'cout' was not declared in this scope
Comment 7 David Radice 2009-06-02 13:24:30 UTC
I don't have iostream.h installed (whell I have the one from the boost libraries but it's not what this program is looking for): it is possible that this bug is related with the gcc-4.3?
Comment 8 Justin Lecher (RETIRED) gentoo-dev 2009-06-02 13:28:43 UTC
(In reply to comment #7)
> I don't have iostream.h installed (whell I have the one from the boost
> libraries but it's not what this program is looking for): it is possible that
> this bug is related with the gcc-4.3?
> 

it is and here is how to fix it:

http://gcc.gnu.org/gcc-4.3/porting_to.html

Do you want contribute the patch?
Comment 9 David Radice 2009-06-02 13:49:47 UTC
I see that there is an gcc-4.3 patch for opendx-4.3. If it's just a matter of backporting it and fixing the autoconf macros than I think that I should be able to handle it and do it in a week or so (I am supposed to be working on my thesis right now :D). 

If it turns out that opendx needs a big patch with the possibility of me breaking something while doing it than I will report it here and leave it to someone else...
Comment 10 David Radice 2009-06-02 15:39:37 UTC
Created attachment 193304 [details, diff]
opendx-4.3.2-gcc43.patch

It took me less then what I fought: I just "ported" (I just applied it) the opendx-4.4.4-gcc43.patch and fixed that test in the acinclude.ac. 

With this patch opendx now builds fine here and it *seems* to work: I just tried a couple of examples and as I have no previous experience with opendx (was actually trying it for the first time when I hit this bug) and as there seems not to be any testsuite I cannot be sure that everything is ok: the patch by itself is inoffensive, but there could be some other nasty gcc-4.3 related bug.
Comment 11 David Radice 2009-06-03 08:04:48 UTC
Created attachment 193374 [details]
opendx-4.3.2-gcc43.patch

Maybe I rushed too much with the previous patch: I have rebuilt opendx again and this time I had to do some more patching (I don't really know why it worked fine in the first place: I emerged it twice without any USE or lib change and the second time it stopped working), I also cleaned the initial patch a bit and tested it with USE=+*.
Comment 12 Sebastian Luther (few) 2009-06-09 07:55:58 UTC
*** Bug 273298 has been marked as a duplicate of this bug. ***
Comment 13 Sébastien Fabbro (RETIRED) gentoo-dev 2009-10-09 04:09:20 UTC
opendx-4.4.4-r2 now in main tree. thanks