Opened 7 days ago

Closed 7 days ago

#71207 closed defect (invalid)

libomp: xgboost incorrect LC_RPATH referenced in libxgboost.dylib

Reported by: Ubiquitous Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: libomp, libxgboost Cc:
Port: libomp

Description (last modified by Ubiquitous)

Upon installing libomp I noticed that there was an error related to not finding it once installed. In the installed libxgboost.dylib the rcpath references an absolute 'homebrew' directory (I don't use homebrew).

% otool -l /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/xgboost/lib/libxgboost.dylib
...
Load command 15
          cmd LC_RPATH
      cmdsize 48
         path /opt/homebrew/opt/libomp/lib (offset 12)
..

It can be fixed with:

% sudo install_name_tool -rpath /opt/homebrew/opt/libomp/lib /opt/local/lib/libomp /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/xgboost/lib/libxgboost.dylib

Now the rpath is correct:

% otool -l /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/xgboost/lib/libxgboost.dylib 
...
Load command 15
          cmd LC_RPATH
      cmdsize 40
         path /opt/local/lib/libomp (offset 12)
...

This should probably be fixed in the port as to avoid frustrations for anyone installing libomp.

Change History (5)

comment:1 Changed 7 days ago by Ubiquitous

Description: modified (diff)

comment:2 Changed 7 days ago by Ubiquitous

Description: modified (diff)
Summary: libomp: incorrect LC_RPATH referenced in libxgboost.dyliblibomp: xgboost incorrect LC_RPATH referenced in libxgboost.dylib

comment:3 Changed 7 days ago by jmroot (Joshua Root)

I don't think we have a port for an xgboost python module? What does port provides /opt/local/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/xgboost/lib/libxgboost.dylib say?

In any case, this is an issue with how libxgboost is linked, not with libomp itself.

comment:4 Changed 7 days ago by Ubiquitous

I just realized that. It seems to be an issue with the xgboost pypi module itself, I'll contact the developers.

~ Regards

comment:5 Changed 7 days ago by jmroot (Joshua Root)

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.