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
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
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
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
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