Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 137877 - scilab-4.0 fails to compile because of undefined reference to `pthread_create' in libatlas.so.0
Summary: scilab-4.0 fails to compile because of undefined reference to `pthread_create...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Markus Dittrich (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-06-24 13:54 UTC by Juergen Rose
Modified: 2006-07-31 17:41 UTC (History)
1 user (show)

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


Attachments
possible pthread patch (scilab-pthread.patch,24.17 KB, patch)
2006-06-26 18:33 UTC, Markus Dittrich (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2006-06-24 13:54:21 UTC
make[1]: Leaving directory `/var/tmp/portage/scilab-4.0/work/scilab-4.0/ocaml'
linking
/var/tmp/portage/scilab-4.0/work/scilab-4.0/pvm3/lib/LINUX/libpvm3.a(lpvmgen.o): In function `pvmlogperror':
lpvmgen.c:(.text+0x9bfd): warning: `sys_errlist' is deprecated; use `strerror' or `strerror_r' instead
lpvmgen.c:(.text+0x9bf4): warning: `sys_nerr' is deprecated; use `strerror' or `strerror_r' instead
/var/tmp/portage/scilab-4.0/work/scilab-4.0/libs/system.a(scicurdir.o): In function `scigetcwd_':
scicurdir.c:(.text+0x16): warning: the `getwd' function is dangerous and should not be used.
/var/tmp/portage/scilab-4.0/work/scilab-4.0/libs/os_specific.a(link.o): In function `CreateCppShared':
link.c:(.text+0x5ad): warning: the use of `mktemp' is dangerous, better use `mkstemp'
/usr/lib/libatlas.so.0: undefined reference to `pthread_create'
/usr/lib/libatlas.so.0: undefined reference to `pthread_join'
collect2: ld returned 1 exit status

blas-atlas-3.7.11 was compiled with gcc-4.1.1 perhaps with some problems, at least 'emerge blas-atlas finished with:
/usr/share/eselect//libs/config.bash: line 63: local: `F77_/lib=': not a valid identifier
/usr/share/eselect//libs/config.bash: line 63: local: `C_/lib=': not a valid identifier
/usr/share/eselect//libs/config.bash: line 63: local: `F77_/lib_CURRENT=': not a valid identifier
/usr/share/eselect//libs/config.bash: line 63: local: `C_/lib_CURRENT=': not a valid identifier
...

Nevertheless 'blas-config -p' shows:
root@shark:/root(30)# blas-config -p

Current profiles:
F77 BLAS: /usr/lib/blas/f77-ATLAS
C BLAS: /usr/lib/blas/c-ATLAS

while 'eselect blas list' shows:
/var/lib/eselect/blas/blas.config: line 3: F77_/lib=: No such file or directory
/var/lib/eselect/blas/blas.config: line 4: C_/lib=: No such file or directory
/var/lib/eselect/blas/blas.config: line 5: F77_/lib_CURRENT=threaded-ATLAS: No such file or directory
...

root@shark:/root(33)# emerge --info
Portage 2.1.1_pre1-r2 (default-linux/x86/2006.0, gcc-4.1.1/hardened, glibc-2.4-r3, 2.6.17 i686)
=================================================================
System uname: 2.6.17 i686 Intel(R) Pentium(R) 4 CPU 3.00GHz
Gentoo Base System version 1.12.1
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [disabled]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r2
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
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-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/grass60/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/lib/mozilla/defaults/pref /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=pentium4 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks fixpackages metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ rsync://ftp.fi.muni.cz/pub/linux/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo rsync://gd.tuwien.ac.at/opsys/linux/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo ftp://ftp.tu-clausthal.de/pub/linux/gentoo http://gentoo.oregonstate.edu"
LINGUAS="de fr"
PKGDIR="/usr/portage/packages/All"
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'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X Xaw3d a52 aac acpi alsa ao aotuv apache2 apm arts asf atlas auctex audiofile automount avi berkdb bitmap-fonts blas bonobo bzip2 cairo cdda cddb cdf cdio cdparanoia cdr cgi cli corba crypt cups curl daap dbus devmap dga dlloader dri dvb dvd dvi dxr3 dynagraph eds effects elf emacs emboss encode epiphany esd evo evolution exif expat fam fame ffmpeg fftw fits flac fltk foomaticdb fortran fpx gdal gdbm geos gif gimp ginac glade glitz gml gmp gnome gnuplot gphoto2 gpm graphviz grass gs gsl gsm gstreamer gtk gtk2 guile hal hardened hddtemp hdf hdf5 hlapi icq id3 imagemagick imlib innodb ipv6 isdnlog jabber jbig john jp2 jpeg jpeg2k kde kexi lame lapack latex lcms ldap libg++ libgda libsamplerate libwww lirc lm_sensors lzo lzw mad math matroska mikmod mmx mmxext mng mod mono motif mozcalendar mozdevelop mozilla mozsvg mozxmlterm mp3 mp4live mpeg mpeg2 mplayer musicbrainz mysql mysqli nautilus ncurses netcdf network nfs nls nntp nptl nptlonly numarray numeric nvidia ocaml octave odbc ogdi ogg opengl oss pam pcre pdf pdflib perl plotutils plugin png posix postgres pppd proj python qhull qt quicktime readline real reflection reiserfs rhythmbox rle rrdcgi rrdtool samba sdl session slang slp smp sndfile snmp sox spell spl sqlite sse sse2 ssl subtitles svg t1lib tcltk tcpd tetex theora tidy tiff truetype truetype-fonts type1-fonts udev unicode v4l2 video_cards_nv vorbis win32codecs wmf xemacs xext xine xml xml2 xmlreader xmlrpc xmms xorg xpm xv xvid xvmc zlib zvbi elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux linguas_de linguas_fr userland_GNU video_cards_vesa video_cards_fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS

  Any ideas?  
     Regards  Juergen
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2006-06-24 14:51:47 UTC

*** This bug has been marked as a duplicate of 131957 ***
Comment 2 Markus Dittrich (RETIRED) gentoo-dev 2006-06-25 03:05:56 UTC
Hi Juergen,

I was under the impression that we've fixed this problem a while ago.
Please make sure that you're using a recent version of the ebuild,
which appends -lpthread to LDFLAGS in line 67. If that's doesn't help
please re-open the bug.

Thanks,
Markus
Comment 3 Juergen Rose 2006-06-25 23:58:09 UTC
Hi Markus,

In line 67 of /usr/portage/sci-mathematics/scilab/scilab-4.0.ebuild
I find:
		-e "s:@LD_LDFLAGS@:${LDFLAGS} -lpthread:" \


I have four system, which I try to keep in a similar state, an old athlon, an old at athlon-xp, a mobile-Pentium and a P4. With except of the P4 I can install scilab-4.0. 

If I perform  

find /var/tmp/portage/scilab-4.0/work/scilab-4.0/ -name Make\* -exec grep -i thread {} \; -ls

I find at all systems:

                $(link_multithread) /nodefaultlib:libc.lib
16218344    4 -rwxr-xr-x   1 root     root         1734 Oct 28  2002 /var/tmp/portage/scilab-4.0/work/scilab-4.0/pvm3/hoster/Makefile.mak
LD_LDFLAGS =  -lpthread
16225935    4 -rw-r--r--   1 root     root         2669 Jun 26 06:44 /var/tmp/portage/scilab-4.0/work/scilab-4.0/Makefile.incl.in
LD_LDFLAGS =  -lpthread
16225951    4 -rw-r--r--   1 root     root         3001 Jun 26 06:45 /var/tmp/portage/scilab-4.0/work/scilab-4.0/Makefile.incl

File size and date of course is different. So I suppose that the error on the P4
is due to the order of installing perhaps gcc, occaml and some libs, like blas-atlas

At the P4 I get:
. root@shark:/root(17)#  eselect blas list
/var/lib/eselect/blas/blas.config: line 3: F77_/lib=: No such file or directory
/var/lib/eselect/blas/blas.config: line 4: C_/lib=: No such file or directory
/var/lib/eselect/blas/blas.config: line 5: F77_/lib_CURRENT=threaded-ATLAS: No such file or directory
/var/lib/eselect/blas/blas.config: line 6: C_/lib_CURRENT=: No such file or directory
/var/lib/eselect/blas/blas.config: line 3: F77_/lib=: No such file or directory
/var/lib/eselect/blas/blas.config: line 4: C_/lib=: No such file or directory
/var/lib/eselect/blas/blas.config: line 5: F77_/lib_CURRENT=threaded-ATLAS: No such file or directory
/var/lib/eselect/blas/blas.config: line 6: C_/lib_CURRENT=: No such file or directory
/var/lib/eselect/blas/blas.config: line 3: F77_/lib=: No such file or directory
/var/lib/eselect/blas/blas.config: line 4: C_/lib=: No such file or directory
/var/lib/eselect/blas/blas.config: line 5: F77_/lib_CURRENT=threaded-ATLAS: No such file or directory
/var/lib/eselect/blas/blas.config: line 6: C_/lib_CURRENT=: No such file or directory
/var/lib/eselect/blas/blas.config: line 3: F77_/lib=: No such file or directory
/var/lib/eselect/blas/blas.config: line 4: C_/lib=: No such file or directory
/var/lib/eselect/blas/blas.config: line 5: F77_/lib_CURRENT=threaded-ATLAS: No such file or directory
/var/lib/eselect/blas/blas.config: line 6: C_/lib_CURRENT=: No such file or directory
[1]+  Done                    emacs -i $GEOMETRY $NO_DOS_CONV -name "$BASENAME" "$*"
root@shark:/root(18)# blas-config -l

Available C profiles:
[1] ATLAS
[2] threaded-ATLAS

Available F77 profiles:
[1] ATLAS
[2] threaded-ATLAS

root@shark:/root(19)# blas-config -p

Current profiles:
F77 BLAS: /usr/lib/blas/f77-ATLAS
C BLAS: /usr/lib/blas/c-ATLAS

At the old athlon I get:
root@cheetah:/usr/share/cups(78)# eselect blas list
/var/lib/eselect/blas/blas.config: line 7: C_/lib_CURRENT=: No such file or directory
/var/lib/eselect/blas/blas.config: line 8: F77_/lib_CURRENT=ATLAS: No such file or directory
/var/lib/eselect/blas/blas.config: line 7: C_/lib_CURRENT=: No such file or directory
/var/lib/eselect/blas/blas.config: line 8: F77_/lib_CURRENT=ATLAS: No such file or directory
C/C++ profiles in /usr/lib
  ATLAS                     (sci-libs/blas-atlas) *

FORTRAN 77 profiles in /usr/lib
  ATLAS                     (sci-libs/blas-atlas) *

/var/lib/eselect/blas/blas.config: line 7: C_/lib_CURRENT=: No such file or directory
/var/lib/eselect/blas/blas.config: line 8: F77_/lib_CURRENT=ATLAS: No such file or directory
/var/lib/eselect/blas/blas.config: line 7: C_/lib_CURRENT=: No such file or directory
/var/lib/eselect/blas/blas.config: line 8: F77_/lib_CURRENT=ATLAS: No such file or directory
/var/lib/eselect/blas/blas.config: line 7: C_/lib_CURRENT=: No such file or directory
/var/lib/eselect/blas/blas.config: line 8: F77_/lib_CURRENT=ATLAS: No such file or directory
/var/lib/eselect/blas/blas.config: line 7: C_/lib_CURRENT=: No such file or directory
/var/lib/eselect/blas/blas.config: line 8: F77_/lib_CURRENT=ATLAS: No such file or directory
root@cheetah:/usr/share/cups(79)# blas-config -l

Available C profiles:
[1] ATLAS

Available F77 profiles:
[1] ATLAS

root@cheetah:/usr/share/cups(80)# blas-config -p

Current profiles:
F77 BLAS: /usr/lib/blas/f77-ATLAS
C BLAS: /usr/lib/blas/c-ATLAS

At the mobile Pentium I get:
root@thinkpad:/root(2)# eselect blas list
/var/lib/eselect/blas/blas.config: line 7: C_/lib_CURRENT=: No such file or directory
/var/lib/eselect/blas/blas.config: line 8: F77_/lib_CURRENT=ATLAS: No such file or directory
/var/lib/eselect/blas/blas.config: line 7: C_/lib_CURRENT=: No such file or directory
/var/lib/eselect/blas/blas.config: line 8: F77_/lib_CURRENT=ATLAS: No such file or directory
C/C++ profiles in /usr/lib
  ATLAS                     (sci-libs/blas-atlas) *

FORTRAN 77 profiles in /usr/lib
  ATLAS                     (sci-libs/blas-atlas) *

root@thinkpad:/root(3)# blas-config -l

Available C profiles:
[1] ATLAS

Available F77 profiles:
[1] ATLAS

root@thinkpad:/root(4)# blas-config -p

Current profiles:
F77 BLAS: /usr/lib/blas/f77-ATLAS
C BLAS: /usr/lib/blas/c-ATLAS

Any hint further appreciated
    Regards Juergen
Comment 4 Markus Dittrich (RETIRED) gentoo-dev 2006-06-26 18:33:06 UTC
Created attachment 90232 [details, diff]
possible pthread patch

Hi,

Unfortunately, I am not able to reproduce this problem here hence this patch
is pretty much a shot in the dark based on a potential problem with libtool's
-nostdlib flag. In any case, please give it a shot and let me know what happens.

Thanks,
Markus
Comment 5 Markus Dittrich (RETIRED) gentoo-dev 2006-07-31 17:41:13 UTC
Hi,

To the best of my knowledge, the issue of missing pthread
symbols has been resolved in blas-atlas itself and scilab 
should compile fine now. I'll therefore close this bug.
Please re-open if these problems persist for anybody.

Thanks,
Markus