Opened 6 years ago

Last modified 5 years ago

#55569 assigned defect

sundials2 @2.7.0: Symbol not found: _klu_solve

Reported by: jantheron Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: sundials2

Description (last modified by ryandesign (Ryan Carsten Schmidt))

cantera fails upon importing to python27 with the following message

>>> import cantera as ct
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cantera/__init__.py", line 4, in <module>
    from ._cantera import *
ImportError: dlopen(/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/cantera/_cantera.so, 2): Symbol not found: _klu_solve
  Referenced from: /opt/local/lib/libsundials_cvodes.2.dylib
  Expected in: flat namespace
 in /opt/local/lib/libsundials_cvodes.2.dylib

Change History (4)

comment:1 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: seanfarley added; port info --maintainers cantera-devel removed
Description: modified (diff)
Keywords: cantera klu_solve python27 removed
Port: sundials2 added; cantera removed
Summary: cantera klu_solve missing symbolsundials2 @2.7.0: Symbol not found: _klu_solve

For future reference, into the Cc field, you should place the maintainer's email address or GitHub handle. You can find this information by running the command port info --maintainers [portname]. Don't literally paste that command into the Cc field. Also, remember to use WikiFormatting when writing in Trac.

Since the unknown symbol was referenced from a sundials2 library, I think this is probably a bug in the sundials2 port rather than the cantera port. The cantera source code does not contain the string klu_solve but the sundials2 source code does.

I don't know if it has any bearing on the problem, but I'm suspicious of the use of the flat namespace, which has not been recommended for over a decade. I don't yet see where in the build system the flat namespace is being requested.

I notice that the sundials libraries are being built with -undefined dynamic_lookup, which means that if there are any undefined symbols at build time, it doesn't complain about them, assuming that they will exist at runtime; in the case of klu_solve at least, that's apparently not happening. If I remove that flag from the build, then the build fails with undefined symbols errors, not unsurprisingly.

comment:2 Changed 6 years ago by jantheron

Should I file a bug for the sundials2 port in that case, or what course of action do you recommend?

comment:3 Changed 6 years ago by seanfarley (Sean Farley)

Owner: set to seanfarley
Status: newaccepted

comment:4 Changed 5 years ago by mf2k (Frank Schima)

Cc: seanfarley removed
Owner: seanfarley deleted
Status: acceptedassigned
Note: See TracTickets for help on using tickets.