Lev Givon <l...@columbia.edu> writes:

> Received from Andreas Kloeckner on Thu, Jun 07, 2012 at 05:51:13PM EDT:
>> Lev Givon <l...@columbia.edu> writes:
>> 
>> > When I recently tried running the sample program on the main codepy
>> > documentation page, I noticed that I had to manually add the python
>> > library (python2.7 in my case) to the list of libraries guessed by
>> > codepy.jit.guess_toolchain in order to get the program to run. Any
>> > ideas as to why the toolchain guesser isn't finding the python library
>> > by default on my system? The python library on my system is located at
>> > /usr/lib64/libpython2.7.so.
>> >
>> > I'm using codepy 2012.1.2, cgen 2012.1, python 2.7, gcc 4.6.1, and
>> > boost 1.46.1 on 64-bit Linux.
>> 
>> Can you use
>> 
>> cmod = mod.compile(guess_toolchain(), debug=True)
>> 
>> in that program and post what command line you get? (You may have to rm
>> -rf /tmp/codepy...)
>> 
>> I get:
>> 
>> g++ -pthread -fno-strict-aliasing -g -fwrapv -O2 -Wall -g
>> -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security
>> -Werror=format-security -fPIC -pthread -shared -Wl,-O1
>> -Wl,-Bsymbolic-functions -Wl,-z,relro -Xlinker -export-dynamic -Wl,-O1
>> -Wl,-Bsymbolic-functions -DNDEBUG -I/usr/include/python2.7
>> /tmp/codepy-compiler-cache-v5-uid1000/575fd541fda8bf46c781d288179477c0/module.cpp
>> -L/usr/lib -lboost_python -lpthread -ldl -lutil -o
>> /tmp/codepy-compiler-cache-v5-uid1000/575fd541fda8bf46c781d288179477c0/module.so
>
> g++ -pthread -fno-strict-aliasing -O2 -g -frecord-gcc-switches
> -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security
> -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4
> -fPIC -O2 -g -frecord-gcc-switches -Wstrict-aliasing=2 -pipe -Wformat
> -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector
> --param=ssp-buffer-size=4 -fPIC -g -fPIC -pthread -shared
> -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id
> -Wl,--enable-new-dtags -Xlinker -export-dynamic -DNDEBUG
> -I/usr/include/python2.7 -I/usr/include/boost
> /tmp/codepy-compiler-cache-v5-uid500/a426cbcb2e2ac5ecd9dd1ee86c183635/module.cpp
> -L/usr/lib64 -lboost_python -lpthread -ldl -lutil -o
> /tmp/codepy-compiler-cache-v5-uid500/a426cbcb2e2ac5ecd9dd1ee86c183635/module.so

Ah, I think it's the '-Wl,--no-undefined'.

Can you try current git? I think I added the missing -lpythonN.N.

Andreas




_______________________________________________
PyCUDA mailing list
PyCUDA@tiker.net
http://lists.tiker.net/listinfo/pycuda

Reply via email to