norm icon indicating copy to clipboard operation
norm copied to clipboard

norm 1.5.9 python binding failure

Open urluberluneuf opened this issue 2 years ago • 4 comments

On ubuntu 20.04 with python 2.7.18: I get this:

import pynorm Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/dist-packages/pynorm/init.py", line 6, in from pynorm.instance import Instance File "/usr/local/lib/python2.7/dist-packages/pynorm/instance.py", line 17, in import pynorm.constants as c File "/usr/local/lib/python2.7/dist-packages/pynorm/constants.py", line 10, in from pynorm.core import libnorm File "/usr/local/lib/python2.7/dist-packages/pynorm/core.py", line 510, in libnorm = get_libnorm() File "/usr/local/lib/python2.7/dist-packages/pynorm/core.py", line 504, in get_libnorm libnorm.NormCountCompletedObjects.restype = ctypes.c_uint32 File "/usr/lib/python2.7/ctypes/init.py", line 379, in getattr func = self.getitem(name) File "/usr/lib/python2.7/ctypes/init.py", line 384, in getitem func = self._FuncPtr((name_or_ordinal, self)) AttributeError: /home/titi/Documents/NORM/norm-1.5.9/build/libnorm.so: undefined symbol: NormCountCompletedObjects

config.log

urluberluneuf avatar Mar 18 '22 12:03 urluberluneuf

I found the problem: the function does not exist ! in the core.py file, the lines 504 and 505 need to be commented.

urluberluneuf avatar Mar 19 '22 11:03 urluberluneuf

In the 1.5.9 release, the function is commented out in normApi.cpp. That particular function is in a section of "experimentall" API calls and is one mainly used for debugging purposes. In fact, I'm not sure it's really relevant anymore.

So there is a mismatch between the Python binding code that still references that function and the C/C++ API code where it is commented out. I will make sure this is addressed in a new release. In the current code on Github, the function is part of the API and library which is why I haven't noticed the issue. I'm sorry that detail was not caught when the 1.5.9 release package was build.

On Sat, Mar 19, 2022 at 7:04 AM urluberluneuf @.***> wrote:

Closed #52 https://github.com/USNavalResearchLaboratory/norm/issues/52.

— Reply to this email directly, view it on GitHub https://github.com/USNavalResearchLaboratory/norm/issues/52#event-6269800024, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABU46GITFVAWVGEOQ3ITQELVAWYE3ANCNFSM5RBX36GA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you are subscribed to this thread.Message ID: @.*** .com>

-- Brian Adamson @.***>

bebopagogo avatar Mar 19 '22 13:03 bebopagogo

I made a mistake closing this issue: I may have found a way to circumvent the problem, the problem exists anyway !

urluberluneuf avatar Mar 19 '22 16:03 urluberluneuf

This has been addressed in the recent commit that addressed other Python binding issues.

bebopagogo avatar May 30 '22 14:05 bebopagogo