shunwang / numexpr

Automatically exported from code.google.com/p/numexpr
MIT License
0 stars 0 forks source link

undefined symbol: _gfortran_internal_malloc64 #15

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is fedora F10 x86_64.  I did put:

[DEFAULT]
libraries = gfortran

And it did link correctly:
gcc -pthread -shared build/temp.linux-x86_64-2.5/numexpr/interpreter.o -
L/usr/lib64 -lmkl_gf_lp64 -lmkl_gnu_thread -lmkl_core -liomp5 -lpthread -

But:
 sudo python setup.py install
mkl_info:
  libraries gfortran not found in /opt/intel/mkl/10.1.1.019/lib/em64t
Library gfortran was not found. Ignoring
  FOUND:
    libraries = ['mkl_gf_lp64', 'mkl_gnu_thread', 'mkl_core', 'iomp5',
'pthread']
    library_dirs = ['/opt/intel/mkl/10.1.1.019/lib/em64t']
    define_macros = [('SCIPY_MKL_H', None)]
    include_dirs = ['/opt/intel/mkl/10.1.1.019/include']

But I think the REAL problem is that /usr/lib64/libgfortran.so doesn't
contain the missing symbol:

readelf -s /usr/lib64/libgfortran.so  | grep malloc64
[silence]

What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by ndbeck...@gmail.com on 13 Feb 2009 at 3:10

GoogleCodeExporter commented 9 years ago
I can add that trying an older version:
10.0.5.025

works OK.

Original comment by ndbeck...@gmail.com on 13 Feb 2009 at 3:43

GoogleCodeExporter commented 9 years ago
So, do you have an idea on where can be found the undefined symbol for MKL 
10.1.1? 
I'd like to add some hint about that in site.cfg.

Original comment by fal...@gmail.com on 13 Feb 2009 at 4:00

GoogleCodeExporter commented 9 years ago
No, I have no clue.  I'm guessing mkl 10.1.1 isn't going to work on fedora f10.

Original comment by ndbeck...@gmail.com on 13 Feb 2009 at 4:19

GoogleCodeExporter commented 9 years ago
Hey, guess what I found?
/usr/lib64/libgfortran.so.1.0.0
 objdump -T /usr/lib64/libgfortran.so.1.0.0 | grep malloc
0000000000000000      DF *UND*  00000000000001d2  GLIBC_2.2.5 malloc
0000000000011db9 g    DF .text  000000000000002a  Base       
_gfortran_internal_malloc
00000000000a977e g    DF .text  000000000000001a  Base        _gfortran_malloc
0000000000011de3 g    DF .text  000000000000002a  Base       
_gfortran_internal_malloc64

pm -qf /usr/lib64/libgfortran.so.1.0.0
compat-libgfortran-41-4.1.2-36.x86_64

So:
1) install compat-libgfortran-41-4.1.2
2) sudo ln -s libgfortran.so.1 /usr/lib64/libgfortran-41
3) [DEFAULT]
libraries = gfortran-41

Works!

Original comment by ndbeck...@gmail.com on 13 Feb 2009 at 4:58

GoogleCodeExporter commented 9 years ago
Sounds good.  I'll try to document this in site.cfg.  I'm not really an expert 
on
gfortran libraries, so do you mind to explain a bit what's the difference 
between:

`/usr/lib64/libgfortran.so`

and 

`/usr/lib64/libgfortran.so.1.0.0`

Perhaps they come from different fortran compilers?  Just trying to 
understand...

Original comment by fal...@gmail.com on 13 Feb 2009 at 7:49

GoogleCodeExporter commented 9 years ago
The real library is libgfortran.so.1.0.0.
There would be a symlink libgfortran.so.1 -> libgfortran.so.1.0.0

Now when you do the link, you normally say -lgfortran, which would use
libgfortran.so.  Normally,
libgfortran.so -> libgfortran.so.1

libgfortran.so is only used in the link step.  libgfortran.so.1.0.0 would be 
used at
runtime.

Original comment by ndbeck...@gmail.com on 13 Feb 2009 at 11:52

GoogleCodeExporter commented 9 years ago
Comment added in r110.  Closing ticket.

Original comment by fal...@gmail.com on 29 May 2009 at 9:38

GoogleCodeExporter commented 9 years ago
Hi ndbecker2,

I am having the same issue, but could not figure out from what you said above.
When I try to install compat-libgfortran-41-4.1.2, it says a newer version is 
already
installed.

I am still getting the error "undefined symbol: _gfortran_internal_malloc64"

Original comment by alankar....@gmail.com on 30 Nov 2009 at 3:40

GoogleCodeExporter commented 9 years ago
I'm on F12 now, and I'm afraid I don't recall anything about this issue.

Original comment by ndbeck...@gmail.com on 30 Nov 2009 at 11:35