On my builds, libpython2.7.so.1.0 _is_ showing up in the metadata:
[david@surprise pyapi]$ ldd python.so | grep libpython
libpython2.7.so.1.0 => /usr/lib64/libpython2.7.so.1.0
(0x00007f9a6e3d1000)
[david@surprise pyapi]$ eu-readelf -d python.so | grep libpython
NEEDED Shared library: [libpython2.7.so.1.0]
But not here :-(
vinay@zeta-oneiric-scratch:~/projects/gcc-python-plugin$ ldd python.so | grep libpython
vinay@zeta-oneiric-scratch:~/projects/gcc-python-plugin$ eu-readelf -d python.so | grep
libpython
vinay@zeta-oneiric-scratch:~/projects/gcc-python-plugin$
I wonder why it's present for my builds, and not for yours. What
does
python-config --ldflags
show for you?
On this Fedora 15 x86_64 box I get:
[david@surprise pyapi]$ python-config --ldflags
-lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic
vinay@zeta-oneiric-scratch:~/projects/gcc-python-plugin$ python-config --ldflags
-L/usr/lib/python2.7/config -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic
-Wl,-O1 -Wl,-Bsymbolic-functions
gcc -I/usr/lib/gcc/x86_64-redhat-linux/4.6.0/plugin/include -fPIC
-O2
-Wall -Werror -g -I/usr/include/python2.7 -I/usr/include/python2.7
-fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64
-mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -lpthread -ldl -lutil -lm -lpython2.7 -Xlinker -export-dynamic
-shared gcc-python.o gcc-python-callgraph.o gcc-python-cfg.o
gcc-python-closure.o gcc-python-function.o gcc-python-gimple.o
gcc-python-location.o gcc-python-option.o gcc-python-parameter.o
gcc-python-pass.o gcc-python-pretty-printer.o gcc-python-rtl.o
gcc-python-tree.o gcc-python-variable.o autogenerated-callgraph.o
autogenerated-cfg.o autogenerated-option.o autogenerated-function.o
autogenerated-gimple.o autogenerated-location.o
autogenerated-parameter.o autogenerated-pass.o
autogenerated-pretty-printer.o autogenerated-rtl.o autogenerated-tree.o
autogenerated-variable.o -o python.so
vinay@zeta-oneiric-scratch:~/projects/gcc-python-plugin$ rm python.so
vinay@zeta-oneiric-scratch:~/projects/gcc-python-plugin$ make plugin
gcc -I/usr/lib/gcc/i686-linux-gnu/4.6.1/plugin/include -fPIC -O2 -Wall -Werror -g
-I/usr/include/python2.7 -I/usr/include/python2.7 -fno-strict-aliasing -g -O2 -DNDEBUG -g
-fwrapv -O2 -Wall -Wstrict-prototypes -L/usr/lib/python2.7/config -lpthread -ldl -lutil
-lm -lpython2.7 -Xlinker -export-dynamic -Wl,-O1 -Wl,-Bsymbolic-functions -shared
gcc-python.o gcc-python-callgraph.o gcc-python-cfg.o gcc-python-closure.o
gcc-python-function.o gcc-python-gimple.o gcc-python-location.o gcc-python-option.o
gcc-python-parameter.o gcc-python-pass.o gcc-python-pretty-printer.o gcc-python-rtl.o
gcc-python-tree.o gcc-python-variable.o autogenerated-callgraph.o autogenerated-cfg.o
autogenerated-option.o autogenerated-function.o autogenerated-gimple.o
autogenerated-location.o autogenerated-parameter.o autogenerated-pass.o
autogenerated-pretty-printer.o autogenerated-rtl.o autogenerated-tree.o
autogenerated-variable.o -o python.so
For some odd reason, the -I/usr/include/python2.7 shows up twice:
vinay@zeta-oneiric-scratch:~/projects/gcc-python-plugin$ python-config --cflags
-I/usr/include/python2.7 -I/usr/include/python2.7 -fno-strict-aliasing -g -O2 -DNDEBUG -g
-fwrapv -O2 -Wall -Wstrict-prototypes
Regards,
Vinay Sajip