Homebrew / homebrew-core

🍻 Default formulae for the missing package manager for macOS (or Linux)
https://brew.sh
BSD 2-Clause "Simplified" License
13.75k stars 12.44k forks source link

Libsvm symlink broken #183421

Closed jpfeuffer closed 2 months ago

jpfeuffer commented 2 months ago

brew gist-logs <formula> link OR brew config AND brew doctor output

brew gist-logs libsvm
Error: No logs.

The installation succeeds but is just wrong.

Verification

What were you trying to do (and why)?

Make CMake find libsvm.dylib

What happened (include all command output)?

CMake fails since the libsvm.dylib symlink does not exist anymore.

What did you expect to happen?

${lib}/libsvm.dylib symlink to libsvm.4.dylib exists -> CMake configures correctly as before with any other libsvm versions.

I expected commit https://github.com/Homebrew/homebrew-core/commit/1bf1dd6893ee09497e15c93778b56762cd0922bf#diff-1c1780a294e768938584d4a187ea90c7069897b63849a915cb075019c3e60d3aR30 also to change the symlink to version 4

Step-by-step reproduction instructions (by running brew commands)

brew install libsvm
ls -la /opt/homebrew/Cellar/libsvm/3.35/lib
jpfeuffer commented 2 months ago

Thank you for the very quick fix!

poshul commented 2 months ago

I'm still seeing issues loading the library:

dyld[24610]: Library not loaded: /opt/homebrew/opt/libsvm/lib/libsvm.so.4 Referenced from: <2244588D-4F34-329A-B1C3-1E3194156103> /Users/runner/work/OpenMS/OpenMS/OpenMS/bld/doc/doxygen/parameters/DefaultParamHandlerDocumenter Reason: tried: '/opt/homebrew/opt/libsvm/lib/libsvm.so.4' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/libsvm/lib/libsvm.so.4' (no such file), '/opt/homebrew/opt/libsvm/lib/libsvm.so.4' (no such file), '/opt/homebrew/Cellar/libsvm/3.35/lib/libsvm.so.4' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/libsvm/3.35/lib/libsvm.so.4' (no such file), '/opt/homebrew/Cellar/libsvm/3.35/lib/libsvm.so.4' (no such file) Subprocess aborted

ZhongRuoyu commented 2 months ago

@poshul, please run brew update && brew reinstall libsvm, then try again.

poshul commented 2 months ago

@poshul, please run brew update && brew reinstall libsvm, then try again.

After doing that (actually since it's a new container, after running brew update && brew install libsvm), I still pull down d006681611a00c39f5d5c4f6e37cc7c5d42f269a120cc0e4aab1e98253c80f56 According to @jpfeuffer it looks like the install_name is not getting set right.

jpfeuffer commented 2 months ago

Yes, I have the feeling that the MachO install_name replacement should not have been removed in the fix: https://github.com/Homebrew/homebrew-core/commit/d5238a306cae3560c8b3e834de89e2e9497a89a3