[Numpy-discussion] numpy : error with cc compiler

Ralf Gommers ralf.gommers@googlemail....
Wed Jun 8 16:38:02 CDT 2011


On Wed, Jun 8, 2011 at 11:21 PM, akshar bhosale <akshar.bhosale@gmail.com>wrote:

> Hi,
>
> we have RHEL 5.2 x86_64, python 2.6, intel compilers 11.0.69, intel mkl
> 10.1. We are trying to configure numpy 1.6.0 and we are getting below
> errors.
> our site.cfg is :
> -------------------------
> [mkl]
> #mkl_libs = mkl_blacs_intelmpi_ilp64, mkl_blacs_intelmpi_lp64, mkl_core,
> mkl_def, mkl_gf_ilp64, mkl_gf_lp64, mkl_gnu_thread, mkl_intel_ilp64,
> mkl_intel_lp64, mkl_intel_sp2dp, mkl_intel_thread, mkl_lapack, mkl_mc3,
> mkl_mc, mkl_p4n,  mkl_scalapack_ilp64, mkl_scalapack_lp64, mkl_sequential,
> mkl, iomp, guide, mkl_vml_def, mkl_vml_mc2, mkl_vml_mc3, mkl_vml_mc,
> mkl_vml_p4n,mkl_def, mkl_intel_lp64, mkl_intel_thread, mkl_core, mkl_mc
>
>
> mkl_libs = mkl_def, mkl_intel_lp64, mkl_intel_thread, mkl_core, mkl_mc
> lapack_libs = mkl_lapack95_lp64
>
> #lapack_libs
> =mkl_lapack,mkl_scalapack_ilp64,mkl_scalapack_lp64,mkl_lapack95_lp64
> library_dirs =
> /opt/intel/Compiler/11.0/069/mkl/lib/em64t:/opt/intel/Compiler/11.0/069/lib/intel64/
> include_dirs =
> /opt/intel/Compiler/11.0/069/mkl/include:/opt/intel/Compiler/11.0/069/include/
> -------------------------
> We are not able to understand what all flags to include with icc and ifort
> in intelccompiler.py and intel.py. Also what ll libraries to link for above
> configuration is not given. Can somebody guide for with proper guidelines so
> that installation goes smooth.
>
> ERRORS :
>
>  DeprecationWarning)
> C compiler: cc
>
> compile options: '-Inumpy/core/src/private -Inumpy/core/src -Inumpy/core
> -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath
> -Inumpy/core/include -I/home/external/unipune/gadre/Python-2.6/Include
> -I/home/external/unipune/gadre/Python-2.6 -c
> '
> cc: _configtest.c
> cc _configtest.o -o _configtest
> _configtest
> failure.
> removing: _configtest.c _configtest.o _configtest
> building data_files sources
> build_src: building npy-pkg config files
> customize IntelCCompiler
> customize IntelCCompiler using build_clib
> building 'npymath' library
> compiling C sources
> C compiler: cc
>
> creating build/temp.linux-x86_64-2.6
> creating build/temp.linux-x86_64-2.6/build
> creating build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6
> creating build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/numpy
> creating build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/numpy/core
> creating
> build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/numpy/core/src
> creating
> build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/numpy/core/src/npymath
> creating build/temp.linux-x86_64-2.6/numpy
> creating build/temp.linux-x86_64-2.6/numpy/core
> creating build/temp.linux-x86_64-2.6/numpy/core/src
> creating build/temp.linux-x86_64-2.6/numpy/core/src/npymath
> compile options: '-Inumpy/core/include
> -Ibuild/src.linux-x86_64-2.6/numpy/core/include/numpy
> -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core
> -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath
> -Inumpy/core/include -I/home/external/un
> ipune/gadre/Python-2.6/Include -I/home/external/unipune/gadre/Python-2.6
> -Ibuild/src.linux-x86_64-2.6/numpy/core/src/multiarray
> -Ibuild/src.linux-x86_64-2.6/numpy/core/src/umath -c'
> cc: numpy/core/src/npymath/halffloat.c
> cc: build/src.linux-x86_64-2.6/numpy/core/src/npymath/npy_math_complex.c
> cc: build/src.linux-x86_64-2.6/numpy/core/src/npymath/npy_math.c
> cc: build/src.linux-x86_64-2.6/numpy/core/src/npymath/ieee754.c
> ar: adding 4 object files to build/temp.linux-x86_64-2.6/libnpymath.a
> running build_ext
> customize IntelCCompiler
> customize IntelCCompiler using build_ext
> building 'numpy.core._sort' extension
> compiling C sources
> C compiler: cc
>
> compile options: '-Inumpy/core/include
> -Ibuild/src.linux-x86_64-2.6/numpy/core/include/numpy
> -Inumpy/core/src/private -Inumpy/core/src -Inumpy/core
> -Inumpy/core/src/npymath -Inumpy/core/src/multiarray -Inumpy/core/src/umath
> -Inumpy/core/include -I/home/external/un
> ipune/gadre/Python-2.6/Include -I/home/external/unipune/gadre/Python-2.6
> -Ibuild/src.linux-x86_64-2.6/numpy/core/src/multiarray
> -Ibuild/src.linux-x86_64-2.6/numpy/core/src/umath -c'
> cc: build/src.linux-x86_64-2.6/numpy/core/src/_sortmodule.c
> creating build/lib.linux-x86_64-2.6
> creating build/lib.linux-x86_64-2.6/numpy
> creating build/lib.linux-x86_64-2.6/numpy/core
> cc -shared
> build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/numpy/core/src/_sortmodule.o
> -Lbuild/temp.linux-x86_64-2.6 -lnpymath -lm -o
> build/lib.linux-x86_64-2.6/numpy/core/_sort.so
> /usr/bin/ld:
> build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/numpy/core/src/_sortmodule.o:
> relocation R_X86_64_32 against `a local symbol' can not be used when making
> a shared object; recompile with -fPIC
> build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/numpy/core/src/_sortmodule.o:
> could not read symbols: Bad value
> collect2: ld returned 1 exit status
> /usr/bin/ld:
> build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/numpy/core/src/_sortmodule.o:
> relocation R_X86_64_32 against `a local symbol' can not be used when making
> a shared object; recompile with -fPIC
> build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/numpy/core/src/_sortmodule.o:
> could not read symbols: Bad value
> collect2: ld returned 1 exit status
> error: Command "cc -shared
> build/temp.linux-x86_64-2.6/build/src.linux-x86_64-2.6/numpy/core/src/_sortmodule.o
> -Lbuild/temp.linux-x86_64-2.6 -lnpymath -lm -o
> build/lib.linux-x86_64-2.6/numpy/core/_sort.so" failed with exit status 1
>
>
The compiler is giving you some friendly advice above: recompile with -fPIC.
Did you try that?

Ralf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20110608/ccfec3bd/attachment-0001.html 


More information about the NumPy-Discussion mailing list