Re: Build on Debian squeeze 64bit - import crypto fails

125 views
Skip to first unread message

Dima Pasechnik

unread,
Jul 23, 2012, 1:13:48 PM7/23/12
to sage-s...@googlegroups.com
Since Sage 5.0, (or 5.1?) you need to install libssl-dev and openssl

HTH,
Dmitrii

On Tuesday, 24 July 2012 00:47:34 UTC+8, Γεώργιος Κελγιάννης wrote:
On a Debian squeeze 64bit machine building sage 5.1 from source fails on package python2.7.3.p0
message is
....
*** WARNING: renaming "crypt" since importing it failed: build/lib.linux-x86_64-2.7/crypt.so: undefined symbol: crypt
......
/usr/bin/install -c -m 644 ./Misc/python.man \
                /opt/sagemath/local/share/man/man1/python2.7.1
make[2]: Leaving directory `/opt/sagemath/spkg/build/python-2.7.3.p0/src'
Testing importing of various modules...
math module imported OK
hashlib module imported OK
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ImportError: No module named crypt
crypt module failed to import
Error: One or more modules failed to import.
....

I have compiled sage succesfully in the same machine in the past (version 4.7 had compiled succesfully)

Γεώργιος Κελγιάννης

unread,
Jul 23, 2012, 2:51:58 PM7/23/12
to sage-s...@googlegroups.com
Thanks for answering,
openssl / libssl-dev are both installed from official debian stable repos (version 0.98)

Dima Pasechnik

unread,
Jul 24, 2012, 10:06:03 AM7/24/12
to sage-s...@googlegroups.com


On Tuesday, 24 July 2012 02:51:58 UTC+8, shortmanikos wrote:
Thanks for answering,
openssl / libssl-dev are both installed from official debian stable repos (version 0.98)

could you post the relevant part of the log, i.e. the place where crypt module is built?
A place starting from "building 'crypt' extension".

Something like here:

shortmanikos

unread,
Jul 24, 2012, 2:53:07 PM7/24/12
to sage-s...@googlegroups.com
Your link was very helpful, the problem was gcc was only looking in /usr/local/lib for the libcrypt.so and could not find it (it was located in /usr/lib)....

A symlink of libcrypt.so in /usr/local/lib solved the problem.

Thanks for your help!

Dima Pasechnik

unread,
Jul 25, 2012, 12:53:26 AM7/25/12
to sage-s...@googlegroups.com


On Wednesday, 25 July 2012 02:53:07 UTC+8, shortmanikos wrote:
Your link was very helpful, the problem was gcc was only looking in /usr/local/lib for the libcrypt.so and could not find it (it was located in /usr/lib)....

debian will not install anything in /usr/local.
will tell you that you apparently don't have libc6-dev installed.

I would be afraid of a dodgy libcrypt.so sitting in /usr/local for no reason...

shortmanikos

unread,
Jul 25, 2012, 6:06:44 AM7/25/12
to sage-s...@googlegroups.com
I had libc6-dev installed. Nothing was installed in /usr/local. That's why sage failed to compile - it was looking in /usr/local/ for libcrypt.so and couldn't find it.
I made a symbolic link from /usr/lib to /usr/local so that sage could find it and compile

the relevent log part was:
gcc -pthread -shared -L/opt/sagemath/local/lib -L/opt/sagemath/local/lib -fno-strict-aliasing -fwrapv -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/opt/sagemath/local/include build/temp.linux-x86_64-2.7/opt/sagemath/spkg/build/python-2.7.3.p0/src/Modules/cryptmodule.o -L/opt/sagemath/local/lib -L/usr/local/lib -L. -lpython2.7 -o build/lib.linux-x86_64-2.7/crypt.so

*** WARNING: renaming "crypt" since importing it failed: build/lib.linux-x86_64-2.7/crypt.so: undefined symbol: crypt
 
debian will not install anything in /usr/local.
Reply all
Reply to author
Forward
0 new messages