femhub build fails on openSUSE 10.2 (X86-64)

36 views
Skip to first unread message

J. S.

unread,
Aug 25, 2009, 4:48:09 PM8/25/09
to femhub
Hi,

I'm trying to build femhub on my openSUSE linux box. Following the
directions on the google code page for femhub, the build step fails
while building numpy. The error message is below. Any advice you could
send would be greatly appreciated. I thought it might be related to
LD_LIBRARY_PATH having pointers to another python install on my
machine, but the build fails even if I set LD_LIBRARY_PATH to nothing.

thanks,

J.S.
---------------------------------
Host system
uname -a:
Linux volans 2.6.18.8-0.8-default #1 SMP Mon Jan 21 06:27:30 UTC 2008
x86_64 x86_64 x86_64 GNU/Linux
****************************************************
****************************************************
GCC Version
gcc -v
Using built-in specs.
Target: x86_64-suse-linux
Configured with: ../configure --enable-threads=posix --prefix=/usr --
with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/
share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-
languages=c,c++,objc,fortran,obj-c++,java,ada --enable-
checking=release --with-gxx-include-dir=/usr/include/c++/4.1.2 --
enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib64 --
with-system-zlib --enable-shared --enable-__cxa_atexit --enable-
libstdcxx-allocator=new --program-suffix=-4.1 --enable-version-
specific-runtime-libs --without-system-libunwind --with-cpu=generic --
host=x86_64-suse-linux
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (SUSE Linux)
****************************************************
Running from numpy source directory.
Traceback (most recent call last):
File "setup.py", line 172, in <module>
setup_package()
File "setup.py", line 140, in setup_package
from numpy.distutils.core import setup
File "/indirect/hotei/jsoishi/build/src/femhub-0.9.6/spkg/build/
numpy-1.3.0.p0/src/numpy/distutils/__init__.py", line 6, in <module>
import ccompiler
File "/indirect/hotei/jsoishi/build/src/femhub-0.9.6/spkg/build/
numpy-1.3.0.p0/src/numpy/distutils/ccompiler.py", line 12, in <module>
from numpy.distutils.exec_command import exec_command
File "/indirect/hotei/jsoishi/build/src/femhub-0.9.6/spkg/build/
numpy-1.3.0.p0/src/numpy/distutils/exec_command.py", line 52, in
<module>
import shlex
File "/o/jsoishi/build/src/femhub-0.9.6/local/lib/python2.6/
shlex.py", line 12, in <module>
from collections import deque
File "/o/jsoishi/build/src/femhub-0.9.6/local/lib/python2.6/
collections.py", line 9, in <module>
from operator import itemgetter as _itemgetter
ImportError: /o/jsoishi/build/src/femhub-0.9.6/local/lib/python2.6/lib-
dynload/operator.so: undefined symbol:
_PyUnicodeUCS4_AsDefaultEncodedString
Error building numpy.

real 0m0.185s
user 0m0.108s
sys 0m0.064s
sage: An error occurred while installing numpy-1.3.0.p0
Please email sage-devel http://groups.google.com/group/sage-devel
explaining the problem and send the relevant part of
of /o/jsoishi/build/src/femhub-0.9.6/install.log. Describe your
computer, operating system, etc.
If you want to try to fix the problem, yourself *don't* just cd to
/o/jsoishi/build/src/femhub-0.9.6/spkg/build/numpy-1.3.0.p0 and type
'make'.
Instead type "/o/jsoishi/build/src/femhub-0.9.6/sage -sh"
in order to set all environment variables correctly, then cd to
/o/jsoishi/build/src/femhub-0.9.6/spkg/build/numpy-1.3.0.p0
(When you are done debugging, you can type "exit" to leave the
subshell.)
make[1]: *** [installed/numpy-1.3.0.p0] Error 1
make[1]: Leaving directory `/indirect/hotei/jsoishi/build/src/
femhub-0.9.6/spkg'

real 9m28.678s
user 6m30.296s
sys 2m40.062s

Ondrej Certik

unread,
Aug 25, 2009, 4:54:09 PM8/25/09
to fem...@googlegroups.com
Hi J.S.!

On Tue, Aug 25, 2009 at 1:48 PM, J. S.<jso...@gmail.com> wrote:
>
> Hi,
>
> I'm trying to build femhub on my openSUSE linux box. Following the
> directions on the google code page for femhub, the build step fails
> while building numpy. The error message is below. Any advice you could
> send would be greatly appreciated. I thought it might be related to
> LD_LIBRARY_PATH having pointers to another python install on my
> machine, but the build fails even if I set LD_LIBRARY_PATH to nothing.

Thanks for reporting it, it's greatly appreciated.

By looking at the error:

> ImportError: /o/jsoishi/build/src/femhub-0.9.6/local/lib/python2.6/lib-
> dynload/operator.so: undefined symbol:
> _PyUnicodeUCS4_AsDefaultEncodedString

it seems to do something with python unicode encoding. Could you
please try to build sage on your box, try the latest source version
from here:

http://sagemath.org/download-source.html

(click on some mirror), e.g. for example:

wget http://modular.fas.harvard.edu/sage/src/sage-4.1.1.tar
tar xf sage-4.1.1.tar
cd sage-4.1.1
make

if that works, it's some change we have in femhub. If it fails, I'll
talk to the Sage guys if they know how to fix it.

Thanks,
Ondrej

J. S.

unread,
Aug 26, 2009, 8:50:14 PM8/26/09
to femhub
Hi Ondrej,

Thanks for your quick reply. I tried installing sage-4.1.1 following
your instructions. Unfortunately, Sage itself fails before even
getting to numpy. However, the error looks very much the same. It is
during the build of cliquer-1.2, and the error is once again below.

thanks again for your help. I'm excited to play with femhub!

j

****************************************************
Host system
uname -a:
Linux volans 2.6.18.8-0.8-default #1 SMP Mon Jan 21 06:27:30 UTC 2008
x86_64 x86_64 x86_64 GNU/Linux
****************************************************
****************************************************
CC Version
gcc -v
Using built-in specs.
Target: x86_64-suse-linux
Configured with: ../configure --enable-threads=posix --prefix=/usr --
with-local-prefix=/usr/local --infodir=
/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --
libexecdir=/usr/lib64 --enable-languages=c,c++
,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-
include-dir=/usr/include/c++/4.1.2 --ena
ble-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib64 --with-
system-zlib --enable-shared --enable-
__cxa_atexit --enable-libstdcxx-allocator=new --program-suffix=-4.1 --
enable-version-specific-runtime-libs -
-without-system-libunwind --with-cpu=generic --host=x86_64-suse-linux
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (SUSE Linux)
****************************************************
Traceback (most recent call last):
File "/indirect/o/jsoishi/build/src/sage-4.1.1/local/bin/scons",
line 162, in <module>
import SCons.Script
File "/indirect/o/jsoishi/build/src/sage-4.1.1/local/lib/scons-1.2.0/
SCons/__init__.py", line 43, in <modu
le>
import SCons.compat
File "/indirect/o/jsoishi/build/src/sage-4.1.1/local/lib/scons-1.2.0/
SCons/compat/__init__.py", line 171,
in <module>
import shlex
File "/indirect/o/jsoishi/build/src/sage-4.1.1/local/lib/python2.6/
shlex.py", line 12, in <module>
from collections import deque
File "/indirect/o/jsoishi/build/src/sage-4.1.1/local/lib/python2.6/
collections.py", line 9, in <module>
from operator import itemgetter as _itemgetter
ImportError: /indirect/o/jsoishi/build/src/sage-4.1.1/local/lib/
python2.6/lib-dynload/operator.so: undefined
symbol: _PyUnicodeUCS4_AsDefaultEncodedString

real 0m0.107s
user 0m0.052s
sys 0m0.056s
sage: An error occurred while installing cliquer-1.2


On Aug 25, 1:54 pm, Ondrej Certik <ond...@certik.cz> wrote:
> Hi J.S.!
>
> On Tue, Aug 25, 2009 at 1:48 PM, J. S.<jsoi...@gmail.com> wrote:
>
> > Hi,
>
> > I'm trying to build femhub on my openSUSE linux box. Following the
> > directions on the google code page for femhub, the build step fails
> > while building numpy. The error message is below. Any advice you could
> > send would be greatly appreciated. I thought it might be related to
> > LD_LIBRARY_PATH having pointers to another python install on my
> > machine, but the build fails even if I set LD_LIBRARY_PATH to nothing.
>
> Thanks for reporting it, it's greatly appreciated.
>
> By looking at the error:
>
> > ImportError: /o/jsoishi/build/src/femhub-0.9.6/local/lib/python2.6/lib-
> > dynload/operator.so: undefined symbol:
> > _PyUnicodeUCS4_AsDefaultEncodedString
>
> it seems to do something with python unicode encoding. Could you
> please try to build sage on your box, try the latest source version
> from here:
>
> http://sagemath.org/download-source.html
>
> (click on some mirror), e.g. for example:
>
> wgethttp://modular.fas.harvard.edu/sage/src/sage-4.1.1.tar

Ondrej Certik

unread,
Aug 26, 2009, 11:39:36 PM8/26/09
to fem...@googlegroups.com
Hi J.,

On Wed, Aug 26, 2009 at 5:50 PM, J. S.<jso...@gmail.com> wrote:
>
> Hi Ondrej,
>
> Thanks for your quick reply. I tried installing sage-4.1.1 following
> your instructions. Unfortunately, Sage itself fails before even
> getting to numpy. However, the error looks very much the same. It is
> during the build of cliquer-1.2, and the error is once again below.
>
> thanks again for your help. I'm excited to play with femhub!

I am excited that you want to try it out. I am sorry that neither
FEMhub nor Sage works out of the box -- it should.

The problem seems to me that when you do:

from operator import itemgetter as _itemgetter

the file "/indirect/o/jsoishi/build/src/sage-4.1.1/local/lib/
python2.6/lib-dynload/operator.so" gets imported, which is correct.
However, the imports fails due to a missing symbol, which means that
this module (in the standard library) was compiled with a different
version of python than the one which is used to import it.

I bet for some reason your systemwide version of Python is being used
and it is compiled without unicode support, as I remember seeing the
same error on Mac. The solution was to force Sage/FEMhub to use it's
own python, then all should work fine.

I would need a little help from you, if it's ok --- could you please try:

./femhub -sh
python


from operator import itemgetter as _itemgetter

and see if it works? If it doesn't, could you try:

which python

to see which python is being picked up? If it works, then we need to
figure out how is it that it doesn't work when executed from the numpy
or cliquer build script.

Thanks for help,
Ondrej

Ondrej Certik

unread,
Aug 28, 2009, 6:51:42 PM8/28/09
to fem...@googlegroups.com

Let me know if you have any questions --- alternatively, if you create
an account on your computer for me, I can debug it myself, if you are
busy.

It's my upper interest so that FEMhub works out of the box everywhere.

Ondrej

J. S.

unread,
Aug 29, 2009, 1:38:18 PM8/29/09
to femhub
Hi Ondrej,

Sorry for the delay in my response. Unfortunately, my computer is
centrally administered, and I cannot get you an account on it.

However, I have identified the source of the problem, but not the
specific issue yet. You are quite right here:
> > I would need a little help from you, if it's ok --- could you please try:
>
> > ./femhub -sh
> > python
> > from operator import itemgetter as _itemgetter
>
> > and see if it works? If it doesn't, could you try:
>
> > which python

This in fact does not work, and it is because `which python` reveals
that it is not picking up the femhub python. If I move my .bashrc out
of the way, install proceeds fine. I believe the issue is related to
my appending to PATH, but not overwriting it. I haven't yet nailed
this down exactly (my bashrc is fairly long), but I'm pretty sure this
is it.

thanks for your help,

j

On Aug 28, 3:51 pm, Ondrej Certik <ond...@certik.cz> wrote:
> On Wed, Aug 26, 2009 at 8:39 PM, Ondrej Certik<ond...@certik.cz> wrote:
> > Hi J.,
>

Ondrej Certik

unread,
Aug 29, 2009, 2:06:35 PM8/29/09
to fem...@googlegroups.com
On Sat, Aug 29, 2009 at 10:38 AM, J. S.<jso...@gmail.com> wrote:
>
> Hi Ondrej,
>
> Sorry for the delay in my response. Unfortunately, my computer is
> centrally administered, and I cannot get you an account on it.
>
> However, I have identified the source of the problem, but not the
> specific issue yet. You are quite right here:
>> > I would need a little help from you, if it's ok --- could you please try:
>>
>> > ./femhub -sh
>> > python
>> > from operator import itemgetter as _itemgetter
>>
>> > and see if it works? If it doesn't, could you try:
>>
>> > which python
>
> This in fact does not work, and it is because `which python` reveals
> that it is not picking up the femhub python. If I move my .bashrc out
> of the way, install proceeds fine. I believe the issue is related to
> my appending to PATH, but not overwriting it. I haven't yet nailed
> this down exactly (my bashrc is fairly long), but I'm pretty sure this
> is it.

Awesome, so that's a progress. I think it's a bug. Did you install
your own Python? That would explain it. Here is my PATH in "femhub
-sh":

$ echo $PATH
/home/ondrej/usr/bin:/home/ondrej/ext/femhub-0.9.6-ubuntu64:/home/ondrej/ext/femhub-0.9.6-ubuntu64/local/bin:/home/ondrej/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/ondrej/ext/autolev/toolbox:/home/ondrej/ext/autolev/toolbox

so you can see that indeed even in my case, my ~/usr/bin is prepended
in the path, so had I installed some python in there, it would break
too.

I think I know where the problem is --- the FEMhub/Sage path is setup
in the file local/bin/sage-env:

PATH="$SAGE_ROOT:$SAGE_LOCAL/bin:$PATH" && export PATH

and it is prepended, so all is ok. But then when "bash" is run after
it, it reads bashrc I think and prepends the user path and it breaks.

Looking at the code, if you do:

femhub -sh f

just put anything after "-sh", it will bypass the bashrc:

"
$ femhub -sh f

Starting subshell with Sage environment variables set.
Be sure to exit when you are done and do not do anything
with other copies of Sage!

Bypassing shell configuration files ...

sage$ echo $PATH
/home/ondrej/ext/femhub-0.9.6-ubuntu64:/home/ondrej/ext/femhub-0.9.6-ubuntu64/local/bin:/home/ondrej/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/home/ondrej/ext/autolev/toolbox
"

and all is fine. Now we need to figure out what to do in the normal
spkg build --- I'll try to investigate.

Ondrej

J. S.

unread,
Aug 31, 2009, 12:54:02 PM8/31/09
to femhub
> Awesome, so that's a progress. I think it's a bug. Did you install
> your own Python? That would explain it.
Yes, in addition to my (now working) femhub, I also have the system-
wide python, and two (2.5 and 2.6) installs of python in my ~/build/
bin directory.

> and all is fine. Now we need to figure out what to do in the normal
> spkg build --- I'll try to investigate.
Cool, sounds good!

thanks for all your help,

j

Ondrej Certik

unread,
Aug 31, 2009, 2:02:37 PM8/31/09
to fem...@googlegroups.com

Awesome, I am glad it works now. I am now busy learning for my PhD
comprehensive exams, so I just created an issue for it:

http://code.google.com/p/femhub/issues/detail?id=49

and reported it to the Sage list too. I will keep it for later to debug.

Ondrej

Reply all
Reply to author
Forward
0 new messages