arb icon indicating copy to clipboard operation
arb copied to clipboard

Incorrect macOS library naming: should be libarb.2.dylib not libarb.dylib.2

Open ilovezfs opened this issue 8 years ago • 2 comments

Detected by Homebrew CI:

Error: 1 problem in 1 formula
homebrew/science/arb:
  * Non-libraries were installed to "/usr/local/Cellar/arb/2.9.0/lib"
    Installing non-libraries to "lib" is discouraged.
    The offending files are:
      /usr/local/Cellar/arb/2.9.0/lib/libarb.dylib.2

As a workaround, I am doing this:

    if OS.mac?
      inreplace "Makefile.in" do |s|
        s.gsub! "ln -sf \"$(ARB_LIB)\" \"$(ARB_LIBNAME).$(ARB_MAJOR)\";",
                "ln -sf \"$(ARB_LIB)\" \"libarb.$(ARB_MAJOR).dylib\";"
        s.gsub! "cp -a $(shell ls $(ARB_LIBNAME)*) \"$(DESTDIR)$(PREFIX)/$(LIBDIR)\";",
                "cp -a $(shell ls libarb*) \"$(DESTDIR)$(PREFIX)/$(LIBDIR)\";"
      end
    end

Unlike .so, for .dylib it should be $major.dylib not dylib.$major

ilovezfs avatar Feb 16 '17 13:02 ilovezfs

Thanks for the bug report. If you have a fix for the makefile, you're welcome to make a PR.

fredrik-johansson avatar Feb 16 '17 13:02 fredrik-johansson

Unfortunately the workaround above just hacks it to be correct for macOS, but a proper fix will need to not break it on Linux, etc.

ilovezfs avatar Feb 16 '17 13:02 ilovezfs