cadabra2 icon indicating copy to clipboard operation
cadabra2 copied to clipboard

Issue with cadabra2.cpython-39-darwin.so path when building cadabra2 2.3.8 under MacPorts

Open Schamschula opened this issue 3 years ago • 2 comments

I'm trying to update the MacPorts Portfile for cadabra2 to version 2.3.8.

The build appears to proceed correctly, but when MacPorts checks links I see

---> Scanning binaries for linking errors Could not open /opt/local/lib/cadabra2.cpython-39-darwin.so: Error opening or reading file (referenced from /opt/local/lib/python3.9/site-packages/cdb/core/_component.cpython-39-darwin.so)

On my machine /opt/local/lib/cadabra2.cpython-39-darwin.so (default MacPorts file hierarchy) is actually located # /opt/local/lib/python3.9/site-packages/cadabra2.cpython-39-darwin.so

How do I fix this path?

Schamschula avatar Dec 18 '21 15:12 Schamschula

That cadabra2.cpython-39-darwin.so is in the right place, the problem seems to be that your machine does not look there when resolving the libraries to which _component.cpython-39-darwin.so is linked, and then attempts the default /usr/local/lib/ but of course does not find it there. For some reason this does work on Linux (although doing ldd on that _component... file fails to resolve the cadabra2 dependency).

I have pushed an attempt at a fix; can you pull again and try that? It makes ldd do the right thing on Linux, so hopefully this will also do the trick with MacPorts.

kpeeters avatar Dec 18 '21 19:12 kpeeters

That didn't work.

I've put in a workaround to link /opt/local/lib/python3.9/site-packages/cadabra2.cpython-39-darwin.so to /opt/local/lib/cadabra2.cpython-39-darwin.so.

Schamschula avatar Dec 18 '21 21:12 Schamschula