Skip to content

Mac build problems #2

@xythobuz

Description

@xythobuz

When building and installing freealut on Mac OS X, one can only link to the dylib when it is installed into /usr/local/lib

Calling otool -L /usr/local/lib/libalut.0.dylib outputs the following:

/usr/local/lib/libalut.0.dylib:
    libalut.0.1.0.dylib (compatibility version 0.1.0, current version 0.0.0)
    /System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL (compatibility version 1.0.0, current version 1.0.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

But libalut.0.1.0.dylib should be an absolute path! This is not a problem when installing into /usr/local/lib, as the Mac lib loader always checks this path. In other paths, an error message like the following is generated, when trying to run a binary linked to freealut:

dyld: Library not loaded: libalut.0.1.0.dylib
  Reason: image not found

Right now, I'm fine with using /usr/local, but this should only be a workaround. However, I have no idea about cmake, so maybe you could fix this? 😃

For more Informations about this Problem, take a look at this guide: Creating working dylibs and maybe also this Stackoverflow Question...

And thank you for providing this! 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions