-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
@ankane Could you please take a look?
Currently the gem seems to simply install arbitrary pre-built libs:
/opt/local/lib/ruby3.3/gems/3.3.0/gems/lightgbm-0.3.2/vendor/lib_lightgbm.arm64.dylib
/opt/local/lib/ruby3.3/gems/3.3.0/gems/lightgbm-0.3.2/vendor/lib_lightgbm.dylib
/opt/local/lib/ruby3.3/gems/3.3.0/gems/lightgbm-0.3.2/vendor/lib_lightgbm.so
/opt/local/lib/ruby3.3/gems/3.3.0/gems/lightgbm-0.3.2/vendor/lib_lightgbm.dll
This is a problematic way:
- This will fail on every arch which does not have a pre-built lib.
- This will likely not work correctly on specific OS versions even on supported archs.
- This leaves the gem broken due to hardcoded dependencies.
- It is desirable not to install unnecessary stuff: there is no reason for someone to want a Windows dll on macOS or BSD, I believe.
Instead, if the library is built from source, that gonna fix all those issues.
P. S. To the point 3, pre-built dylib has an odd hardcoded path for libomp:
Could not open /opt/homebrew/opt/libomp/lib/libomp.dylib: Error opening or reading file (referenced from /opt/local/lib/ruby3.3/gems/3.3.0/gems/lightgbm-0.3.2/vendor/lib_lightgbm.arm64.dylib)
Could not open /usr/local/opt/libomp/lib/libomp.dylib: Error opening or reading file (referenced from /opt/local/lib/ruby3.3/gems/3.3.0/gems/lightgbm-0.3.2/vendor/lib_lightgbm.dylib)
---> Found 2 broken files, matching files to ports
---> Found 1 broken port, determining rebuild order
You can always run 'port rev-upgrade' again to fix errors.
The following ports will be rebuilt: rb33-lightgbm @0.3.2
This is wrong for three reasons:
libompis a clang-specific library, so gonna fail with GCC.libompis an LLVM-specific library, so may not be available with Apple clang.- It uses an odd hardcoded path, so this will fail even when
libompis available, but the path differs.
Metadata
Metadata
Assignees
Labels
No labels