zeromq / libzmq

ZeroMQ core engine in C++, implements ZMTP/3.1
https://www.zeromq.org
Mozilla Public License 2.0
9.62k stars 2.35k forks source link

macOS: Different dynamic library properties when using Autotools and CMake #4539

Closed hebasto closed 1 year ago

hebasto commented 1 year ago

Building with Autotools results in:

% ls -l src/.libs/*dylib         
-rwxr-xr-x  1 hebasto  staff  956891 Apr 13 17:39 src/.libs/libzmq.5.dylib
lrwxr-xr-x  1 hebasto  staff      14 Apr 13 17:39 src/.libs/libzmq.dylib -> libzmq.5.dylib
% otool -L src/.libs/libzmq.5.dylib 
src/.libs/libzmq.5.dylib:
    /usr/local/lib/libzmq.5.dylib (compatibility version 8.0.0, current version 8.5.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1500.65.0)

Building with CMake results in:

% ls -l build/lib/*dylib
-rwxr-xr-x  1 hebasto  staff  698891 Apr 13 17:49 build/lib/libzmq.5.2.5.dylib
lrwxr-xr-x  1 hebasto  staff      18 Apr 13 17:49 build/lib/libzmq.5.dylib -> libzmq.5.2.5.dylib
lrwxr-xr-x  1 hebasto  staff      14 Apr 13 17:49 build/lib/libzmq.dylib -> libzmq.5.dylib
% otool -L build/lib/libzmq.5.2.5.dylib 
build/lib/libzmq.5.2.5.dylib:
    @rpath/libzmq.5.dylib (compatibility version 5.0.0, current version 5.2.5)
    /opt/homebrew/opt/libsodium/lib/libsodium.23.dylib (compatibility version 27.0.0, current version 27.0.0)
    /usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 1500.65.0)
    /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)

Note the discrepancies in the "compatibility version" and "current version" values for the libzmq.5.dylib.

hebasto commented 1 year ago

Oh, it has been already reported in https://github.com/zeromq/libzmq/issues/2887.

Closing.