Installation problem

94 views
Skip to first unread message

Steve Wilson

unread,
Apr 10, 2014, 3:33:30 PM4/10/14
to emsp...@googlegroups.com
Hi,

I'm trying to build Spring on Ubuntu 12.04 and am running into some environment problems.  It is complaining about not having any SSL hash types:

    root@otter:/apps/spring/csachse-emspring-b2bb4efbfd4c# ./bin/python bootstrap.py
    ERROR:root:code for hash md5 was not found.
    Traceback (most recent call last):
      File "/apps/spring/csachse-emspring-b2bb4efbfd4c/parts/EMAN2/Python/lib/python2.7/hashlib.py",   line 139, in <module>
        globals()[__func_name] = __get_hash(__func_name)
      File "/apps/spring/csachse-emspring-b2bb4efbfd4c/parts/EMAN2/Python/lib/python2.7/hashlib.py", line 91, in __get_builtin_constructor
        raise ValueError('unsupported hash type %s' % name)
    ValueError: unsupported hash type md5

Due to the recent heartbleed SSL vulnerability, the SSL libraries were updated on our system yesterday.  As far-fetched as it may sound, could the libssl update be related to the issue I'm having trying to build Spring today?

Running the packaged Python with Spring and attempting to import _hashlib gives this error:
    >>> import _hashlib
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    ImportError: libssl.so.6: cannot open shared object file: No such file or directory

But this works with the system Python (version 2.7.3).

Anything else I should look at?

Thanks!


Steve Wilson
Markey Center for Structural Biology
Purdue University

Carsten Sachse

unread,
Apr 10, 2014, 5:12:59 PM4/10/14
to emsp...@googlegroups.com
Hi Steve,

Could you try to prepend this line to all following python commands? 
PYTHONPATH=$PWD/lib/python2.7/site-packages LD_LIBRARY_PATH=$PWD/parts/EMAN2/lib \
./bin/python bootstrap.py

Does this help?

Best wishes,


Carsten

steve...@gmail.com

unread,
Apr 11, 2014, 1:30:27 PM4/11/14
to emsp...@googlegroups.com
Hi Carsten,

That fixed the problem... thanks!  Now I'm back to a build problem that I had before the OpenSSL libraries were updated.

When running:
    PYTHONPATH=$PWD/lib/python2.7/site-packages LD_LIBRARY_PATH=$PWD/parts/EMAN2/lib ./bin/buildout -v 2>&1 | tee build.log
I get the following error:

/apps/spring/csachse-emspring-b2bb4efbfd4c/build/MyObj/./gcc/xgcc -B/apps/spring/csachse-emspring-b2bb4efbfd4c/build/MyObj/./gcc/ -B/apps/spring/csachse-emspring-b2bb4efbfd4c/parts/gcc/x86_64-unknown-linux-gnu/bin/ -B/apps/spring/csachse-emspring-b2bb4efbfd4c/parts/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /apps/spring/csachse-emspring-b2bb4efbfd4c/parts/gcc/x86_64-unknown-linux-gnu/include -isystem /apps/spring/csachse-emspring-b2bb4efbfd4c/parts/gcc/x86_64-unknown-linux-gnu/sys-include    -O2  -g -O2 -DIN_GCC   -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include   -fpic -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector  -shared -nodefaultlibs -Wl,--soname=libgcc_s.so.1 -Wl,--version-script=libgcc.map -o ./libgcc_s.so.1.tmp -g -O2 -B./ _muldi3_s.o _negdi2_s.o _lshrdi3_s.o _ashldi3_s.o _ashrdi3_s.o _cmpdi2_s.o _ucmpdi2_s.o _clear_cache_s.o _trampoline_s.o __main_s.o _absvsi2_s.o _absvdi2_s.o _addvsi3_s.o _addvdi3_s.o _subvsi3_s.o _subvdi3_s.o _mulvsi3_s.o _mulvdi3_s.o _negvsi2_s.o _negvdi2_s.o _ctors_s.o _ffssi2_s.o _ffsdi2_s.o _clz_s.o _clzsi2_s.o _clzdi2_s.o _ctzsi2_s.o _ctzdi2_s.o _popcount_tab_s.o _popcountsi2_s.o _popcountdi2_s.o _paritysi2_s.o _paritydi2_s.o _powisf2_s.o _powidf2_s.o _powixf2_s.o _mulsc3_s.o _muldc3_s.o _mulxc3_s.o _divsc3_s.o _divdc3_s.o _divxc3_s.o _bswapsi2_s.o _bswapdi2_s.o _clrsbsi2_s.o _clrsbdi2_s.o _fixunssfsi_s.o _fixunsdfsi_s.o _fixunsxfsi_s.o _fixsfdi_s.o _fixdfdi_s.o _fixxfdi_s.o _fixunssfdi_s.o _fixunsdfdi_s.o _fixunsxfdi_s.o _floatdisf_s.o _floatdidf_s.o _floatdixf_s.o _floatundisf_s.o _floatundidf_s.o _floatundixf_s.o _divdi3_s.o _moddi3_s.o _udivdi3_s.o _umoddi3_s.o _udiv_w_sdiv_s.o _udivmoddi4_s.o addtf3_s.o divtf3_s.o multf3_s.o negtf2_s.o subtf3_s.o unordtf2_s.o fixtfsi_s.o fixunstfsi_s.o floatsitf_s.o floatunsitf_s.o fixtfdi_s.o fixunstfdi_s.o floatditf_s.o floatunditf_s.o fixtfti_s.o fixunstfti_s.o floattitf_s.o floatuntitf_s.o extendsftf2_s.o extenddftf2_s.o extendxftf2_s.o trunctfsf2_s.o trunctfdf2_s.o trunctfxf2_s.o getf2_s.o letf2_s.o eqtf2_s.o _divtc3_s.o _multc3_s.o _powitf2_s.o enable-execute-stack_s.o unwind-dw2_s.o unwind-dw2-fde-dip_s.o unwind-sjlj_s.o unwind-c_s.o emutls_s.o -lc && rm -f ./libgcc_s.so && if [ -f ./libgcc_s.so.1 ]; then mv -f ./libgcc_s.so.1 ./libgcc_s.so.1.backup; else true; fi && mv ./libgcc_s.so.1.tmp ./libgcc_s.so.1 && ln -s libgcc_s.so.1 ./libgcc_s.so
/usr/bin/ld: cannot find crti.o: No such file or directory

I even tried adding ":/usr/lib/x86_64-linux-gnu:/usr/lib32" to every "export LD_LIBRARY_PATH" in buildout_linux.cfg hoping that would help find the missing crti.o but to no avail.

Any ideas to get past this latest problem?

Thanks again!
Steve

Carsten Sachse

unread,
Apr 12, 2014, 5:43:32 AM4/12/14
to emsp...@googlegroups.com
Hi Steve,

According to the error message you attached I believe you are on the right track. 

The error resulted from building the gcc compiler. This could be an ubuntu specific. I googled the message and there appears to a similar issue here:

1. Have you checked the existence and the location of crti.o?
asking:
%whereis crti.o  
OR
%locate crti.o

I am sure you have pointed the LD_LIBRARY_PATH there. 

2. Have you added the export line to the [gcc] recipe section in the buildout.cfg?
This is where it currently crashes.

If none of the above helps could you attach the entire build.log file so I can have a closer look?

Best wishes,


Carsten

steve...@gmail.com

unread,
Apr 14, 2014, 1:31:33 PM4/14/14
to emsp...@googlegroups.com
Hi Carsten,

Thanks for your response!  I tried your suggestion #2 in several different ways but without success.  And in answer to #1, the location of crti.o is in /usr/lib/x86_64-linux-gnu.  Below is the [gcc] recipe section after my modification attempts.  The complete build.log file is attached.

[gcc]
recipe = collective.recipe.cmd
on_install = true
cmds =
    mkdir ${buildout:directory}/build
    cd ${buildout:directory}/build
    tar xjf ${buildout:directory}/fetch/gmp-4.3.2.tar.bz2
    tar xjf ${buildout:directory}/fetch/mpfr-2.4.2.tar.bz2
    tar xvf ${buildout:directory}/fetch/mpc-0.8.1.tar.gz
    tar xjf ${buildout:directory}/fetch/gcc-4.7.2.tar.bz2
    mv gmp-4.3.2 gcc-4.7.2/gmp
    mv mpfr-2.4.2 gcc-4.7.2/mpfr
    mv mpc-0.8.1 gcc-4.7.2/mpc
    mkdir ${buildout:directory}/parts/gcc
    mkdir MyObj
    cd MyObj
    mv ${buildout:directory}/build/gcc-4.7.2/gmp/configure ${buildout:directory}/build/gcc-4.7.2/gmp/configure_tmp
    sed 's/M4=m4-not-needed/M4=m4/g' ${buildout:directory}/build/gcc-4.7.2/gmp/configure_tmp > \
    ${buildout:directory}/build/gcc-4.7.2/gmp/configure
    LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu CC=/usr/bin/gcc CXX=/usr/bin/g++ ../gcc-4.7.2/configure --prefix=${buildout:directory}/parts/gcc \
    --enable-languages=c,c++,fortran --disable-libquadmath-support --disable-multilib \
    LDFLAGS=-L/usr/lib/x86_64-linux-gnu
    LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu make -j `${buildout:directory}/bin/python -c 'from multiprocessing import cpu_count; print cpu_count()'`
    LD_LIBRARY_PATH=/usr/lib/x86_64-linux-gnu make install


Thanks again!

Steve
build.log

Carsten Sachse

unread,
Apr 14, 2014, 5:11:13 PM4/14/14
to emsp...@googlegroups.com
Hi Steve,

Your modified [gcc] looks fine to me.

Now there are two more possibilities you should check.

1. Remove your previous builds and re-launch the script. 
% rm -rf build/*

2. You may need to add more library paths to build gcc for Ubuntu according to http://gcc.gnu.org/ml/gcc/2012-02/msg00314.html
export LIBRARY_PATH=/usr/lib/i386-linux-gnu/
export C_INCLUDE_PATH=/usr/include/i386-linux-gnu
export CPLUS_INCLUDE_PATH=/usr/include/i386-linux-gnu

Could you give it a try again.

Best wishes,


Carsten

steve...@gmail.com

unread,
Apr 16, 2014, 10:53:46 AM4/16/14
to emsp...@googlegroups.com
Hi Carsten,

Sorry to be so slow to respond.  I went through several more iterations (each of which takes a few hours...) and I was finally able to successfully build spring on my Ubuntu 12.04 applications server.

I added these lines to the [gcc] section of buildout.cfg:
     export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
     export C_INCLUDE_PATH=/usr/include/x86_64-linux-gnu
     export CPLUS_INCLUDE_PATH=/usr/include/x86_64-linux-gnu
     export LD_LIBRARY_PATH=${buildout:directory}/parts/gcc/lib:$LD_LIBRARY_PATH
and also added the following option to the gcc configure line:
     --build=x86_64-linux-gnu

And then found that I needed to add
     export LIBRARY_PATH=/usr/lib/x86_64-linux-gnu
to each of the other sections as well as adding
     :${buildout:directory}/parts/EMAN2/lib
to every LD_LIBRARY_PATH variable in the other sections.

I'll attach my final buildout_linux.cfg in case anyone else needs to build spring on an Ubuntu 12.04 platform.

Thanks again for your help!

Steve
buildout_linux.cfg
Reply all
Reply to author
Forward
0 new messages