By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,035 Members | 1,408 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,035 IT Pros & Developers. It's quick & easy.

Linking problems under irix6 with embedded Python2.4

P: n/a
I have a problem with linking my CPP Code under a irix6 machine (sgi,
UNIX). In my CPP code I use some Functions which are written in
Python. So its a kind of CPP wrapper for my Python functions In my
Python Code I use threads to communicate over the network and stuff
like this. Compilation and linking are working very well under Windows
and Linux with the same code. Under the sgi, UNIX machine some errors
occur and I don't no why. Following version are used:
Python2.4
gcc version 3.0.4

For linking I'am using following statement:
g++ -v -lm -lpthread -lsocket -lnsl -ldl -DNDEBUG -g -O3 -Wall
-fno-strict-aliasing -fPIC -Xlinker
-I/work/efs/rohrache/python24/Python2.4/local/lib/python2.4/lib-dynload
DynArray.o Interface.o sim_calc.o -o simcalc
/work/efs/rohrache/python24/Python-2.4/libpython2.4.a

The linking options, I take from the makefile which Python produces
during the installation process. Following output occur.

=> ...
Reading specs from /usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.0.4/specs
Configured with: ../configure --prefix=/usr/freeware
--enable-version-spec
ific-runtime-libs --disable-shared --enable-threads --enable-haifa
Thread model: single
gcc version 3.0.4
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.0.4/collect2
-call_shared -n
o_unresolved -init __do_global_ctors -fini __do_global_dtors
-_SYSTYPE_SVR
4 -woff 131 -n32 -o simcalc /usr/lib32/mips3/crt1.o
/usr/freeware/lib/gcc-
lib/mips-sgi-irix6.5/3.0.4/crtbegin.o
-L/usr/freeware/lib/gcc-lib/mips-sgi
-irix6.5/3.0.4 -L/usr/bin
-L/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.0
..4/../../.. -lpthread -lsocket -lnsl -ldl
-I/work/efs/rohrache/python24/Py
thon2.4/local/lib/python2.4/lib-dynload DynArray.o Interface.o
sim_calc.o
/work/efs/rohrache/python24/Python-2.4/libpython2.4.a -lstdc++ -lm
-dont_w
arn_unused -lgcc -warn_unused -L/usr/lib32/mips3 -L/usr/lib32
-dont_warn_u
nused -lc -warn_unused -dont_warn_unused -lgcc -warn_unused
/usr/freeware/
lib/gcc-lib/mips-sgi-irix6.5/3.0.4/crtend.o /usr/lib32/mips3/crtn.o
(null): WARNING 1 : Unknown option:
I/work/efs/rohrache/python24/Python2.
4/local/lib/python2.4/lib-dynload (ignored).
ld32: WARNING 84 : /usr/lib32/libpthread.so is not used for resolving
any
symbol.
ld32: WARNING 84 : /usr/lib32/libsocket.so is not used for resolving
any s
ymbol.
ld32: WARNING 84 : /usr/lib32/libnsl.so is not used for resolving any
symb
ol.
ld32: WARNING 84 : /usr/lib32/libdl.so is not used for resolving any
symbo
l.
ld32: ERROR 33 : Unresolved text symbol "pthread_detach" -- 1st
referenc
ed by /work/efs/rohrache/python24/Python-2.4/libpython2.4.a(thread.o).
Use linker option -v to see when and which objects, archives
and d
sos are loaded.
ld32: INFO 152: Output file removed because of error.
collect2: ld returned 2 exit status

The warnings are no problem to eliminate, but the error message is
very strange.
I don't know how i can handle this problem. I tried alot of additional
link options but I can find no realy solution. Are there some ideas.

thank's alot.
Wolfgang
Jul 18 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.