Giter VIP home page Giter VIP logo

Comments (3)

programmingkidx avatar programmingkidx commented on August 16, 2024

Here is my libhogweed without changes:
otool -L /usr/local/Cellar/nettle/2.7.1/lib/libhogweed.2.5.dylib
/usr/local/Cellar/nettle/2.7.1/lib/libhogweed.2.5.dylib:
/usr/local/lib/libhogweed.2.dylib (compatibility version 2.0.0, current version 2.5.0)
/usr/local/Cellar/nettle/2.7.1/lib/libnettle.4.dylib (compatibility version 4.0.0, current version 4.7.0)
/usr/local/lib/libgmp.10.dylib (compatibility version 13.0.0, current version 13.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)

Here is my libhogweed with changes made by dylibbundler:
/Users/user/Documents/libs/libhogweed.2.5.dylib:
@executable_path/libs/libhogweed.2.5.dylib (compatibility version 2.0.0, current version 2.5.0)
/usr/local/Cellar/nettle/2.7.1/lib/libnettle.4.dylib (compatibility version 4.0.0, current version 4.7.0)
@executable_path/libs/libgmp.10.dylib (compatibility version 13.0.0, current version 13.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.11)

My libnettle.4.dylib path is not changed also. Looking at the output of dylibbundler I saw a bunch of lines that didn't make sense to me. They are all making changes to libhogweed, but these paths are not even in the dylib:

cp -n /usr/local/Cellar/nettle/2.7.1/lib/libhogweed.2.5.dylib libs/libhogweed.2.5.dylib
chmod +w libs/libhogweed.2.5.dylib
install_name_tool -id @executable_path/libs/libhogweed.2.5.dylib libs/libhogweed.2.5.dylib

  • Fixing dependencies on libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/Cellar/pixman/0.32.6/lib/libpixman-1.0.dylib @executable_path/libs/libpixman-1.0.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/opt/pixman/lib/libpixman-1.0.dylib @executable_path/libs/libpixman-1.0.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/Cellar/jpeg/8d/lib/libjpeg.8.dylib @executable_path/libs/libjpeg.8.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/lib/libjpeg.8.dylib @executable_path/libs/libjpeg.8.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/Cellar/nettle/2.7.1/lib/libnettle.4.7.dylib @executable_path/libs/libnettle.4.7.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/lib/libnettle.4.dylib @executable_path/libs/libnettle.4.7.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/Cellar/gnutls/3.3.18/lib/libgnutls.28.dylib @executable_path/libs/libgnutls.28.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/lib/libgnutls.28.dylib @executable_path/libs/libgnutls.28.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/Cellar/glib/2.50.1/lib/libgthread-2.0.0.dylib @executable_path/libs/libgthread-2.0.0.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/lib/libgthread-2.0.0.dylib @executable_path/libs/libgthread-2.0.0.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/Cellar/glib/2.50.1/lib/libglib-2.0.0.dylib @executable_path/libs/libglib-2.0.0.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/lib/libglib-2.0.0.dylib @executable_path/libs/libglib-2.0.0.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/Cellar/gettext/0.19.8.1/lib/libintl.8.dylib @executable_path/libs/libintl.8.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/opt/gettext/lib/libintl.8.dylib @executable_path/libs/libintl.8.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/Cellar/gcc/5.2.0/lib/gcc/5/libgcc_s.1.dylib @executable_path/libs/libgcc_s.1.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/lib/gcc/5/libgcc_s.1.dylib @executable_path/libs/libgcc_s.1.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/Cellar/libtasn1/4.7/lib/libtasn1.6.dylib @executable_path/libs/libtasn1.6.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/lib/libtasn1.6.dylib @executable_path/libs/libtasn1.6.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/Cellar/nettle/2.7.1/lib/libhogweed.2.5.dylib @executable_path/libs/libhogweed.2.5.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/lib/libhogweed.2.dylib @executable_path/libs/libhogweed.2.5.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/Cellar/gmp/6.0.0a/lib/libgmp.10.dylib @executable_path/libs/libgmp.10.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/lib/libgmp.10.dylib @executable_path/libs/libgmp.10.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/Cellar/pcre/8.39/lib/libpcre.1.dylib @executable_path/libs/libpcre.1.dylib libs/libhogweed.2.5.dylib
    install_name_tool -change /usr/local/lib/libpcre.1.dylib @executable_path/libs/libpcre.1.dylib libs/libhogweed.2.5.dylib

from macdylibbundler.

programmingkidx avatar programmingkidx commented on August 16, 2024

I found the dylibbundler's file Dependency.cpp had a bug in the Dependency::mergeIfSameAs() function that would add all the symbolic links to another symbolic links Dependency object instead of writing them to the dylib object.

If you download dylibbundler's source and replace the mergeIfSameAs() function with this one in the Dependency.cpp file, libhogweed's paths will be correctly set:

// Compares the given Dependency with this one. If both refer to the same file,
// it returns true and merges both entries into one.
bool Dependency::mergeIfSameAs(Dependency& dep2)
{
    if(dep2.getOriginalFileName().compare(filename) == 0)
    {
        const int samount = getSymlinkAmount();
        for(int n=0; n<samount; n++) {
            dep2.addSymlink(getSymlink(n)); // FIXME - there may be duplicate symlinks
        }
        return true;
    }
    return false;
}

from macdylibbundler.

auriamg avatar auriamg commented on August 16, 2024

Fixed by pull request #25

from macdylibbundler.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.