zepsute (?) python-static

Adam Mikuta adammikuta w gmail.com
Pią, 9 Lut 2007, 16:15:06 CET


2007/2/9, Arkadiusz Miskiewicz <arekm w pld-linux.org>:

> -lm
(...)
> -ldl
(...)
> -pthread lub -lpthread jak kto woli

Dodałem jeszcze -lutil. Kompiluje się ale segfaultuje:

[adam w pldmachine tmp]$ gcc python.c -I/usr/include/python2.5/
-L/usr/lib/python2.5/config/ -lpython2.5 -static -lm -ldl -lpthread
-lutil
/usr/lib/gcc/i686-pld-linux/4.2.0/../../../libpython2.5.a(dynload_shlib.o):
In function `_PyImport_GetDynLoadFunc':
/home/users/builder/rpm/BUILD/Python-2.5/Python/dynload_shlib.c:130:
warning: Using 'dlopen' in statically linked applications requires at
runtime the shared libraries from the glibc version used for linking
/usr/lib/gcc/i686-pld-linux/4.2.0/../../../libpython2.5.a(posixmodule.o):
In function `posix_tmpnam':
/home/users/builder/rpm/BUILD/Python-2.5/./Modules/posixmodule.c:6718:
warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
/usr/lib/gcc/i686-pld-linux/4.2.0/../../../libpython2.5.a(posixmodule.o):
In function `posix_tempnam':
/home/users/builder/rpm/BUILD/Python-2.5/./Modules/posixmodule.c:6673:
warning: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/lib/gcc/i686-pld-linux/4.2.0/../../../libpython2.5.a(pwdmodule.o):
In function `pwd_getpwall':
/home/users/builder/rpm/BUILD/Python-2.5/./Modules/pwdmodule.c:157:
warning: Using 'getpwent' in statically linked applications requires
at runtime the shared libraries from the glibc version used for
linking
/usr/lib/gcc/i686-pld-linux/4.2.0/../../../libpython2.5.a(pwdmodule.o):
In function `pwd_getpwnam':
/home/users/builder/rpm/BUILD/Python-2.5/./Modules/pwdmodule.c:131:
warning: Using 'getpwnam' in statically linked applications requires
at runtime the shared libraries from the glibc version used for
linking
/usr/lib/gcc/i686-pld-linux/4.2.0/../../../libpython2.5.a(pwdmodule.o):
In function `pwd_getpwuid':
/home/users/builder/rpm/BUILD/Python-2.5/./Modules/pwdmodule.c:110:
warning: Using 'getpwuid' in statically linked applications requires
at runtime the shared libraries from the glibc version used for
linking
/usr/lib/gcc/i686-pld-linux/4.2.0/../../../libpython2.5.a(pwdmodule.o):
In function `pwd_getpwall':
/home/users/builder/rpm/BUILD/Python-2.5/./Modules/pwdmodule.c:156:
warning: Using 'setpwent' in statically linked applications requires
at runtime the shared libraries from the glibc version used for
linking
/home/users/builder/rpm/BUILD/Python-2.5/./Modules/pwdmodule.c:167:
warning: Using 'endpwent' in statically linked applications requires
at runtime the shared libraries from the glibc version used for
linking
[adam w pldmachine tmp]$ ./a.out
Segmentation fault
[adam w pldmachine tmp]$ gcc python.c -I/usr/include/python2.5/
-L/usr/lib/python2.5/config/ -lpython2.5
[adam w pldmachine tmp]$ ./a.out
Today is Fri Feb  9 15:43:10 2007

Czego mi tu jeszcze może brakować?

07-02-09, Jakub Bogusz <qboosh w pld-linux.org> napisał(a):

> W bibliotekach statycznych nie ma zaszytych zależności od innych
> bibliotek, trzeba je zawsze podawać przy linkowaniu.
> (...)
> Ścieżka odnosi się do pliku źródłowego, z którego bierze się obiekt
> o nierozwiązanym symbolu.

No tak. Zmyliły mnie te builderowe ścieżki...

Adam


Więcej informacji o liście dyskusyjnej pld-devel-pl