Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fails to build on macOS #51

Open
fferri opened this issue Sep 16, 2021 · 1 comment
Open

Fails to build on macOS #51

fferri opened this issue Sep 16, 2021 · 1 comment

Comments

@fferri
Copy link

fferri commented Sep 16, 2021

Contents of config.m:

% ZMQ library filename
ZMQ_COMPILED_LIB = './libzmq.a';

% ZMQ library path
ZMQ_LIB_PATH = '/usr/local/Cellar/zeromq/4.3.4/lib/';

% ZMQ headers path
ZMQ_INCLUDE_PATH = '/usr/local/Cellar/zeromq/4.3.4/include/';

Verify that the above file exists:

>> config
>> ls(strcat(ZMQ_LIB_PATH,ZMQ_COMPILED_LIB))
/usr/local/Cellar/zeromq/4.3.4/lib/./libzmq.a

(no error)

Try to build:

>> make
compile ".../matlab-zmq/src/core/version.c"
Building with 'Xcode with Clang'.
Error using mex
ld: library not found for -l./libzmq
clang: error: linker command failed with exit code 1 (use -v to see invocation)


Error in make>compile (line 213)
    mex('-largeArrayDims', '-O', flags{:}, deps{:}, file, '-output', outputfile);

Error in make>@(file)compile(zmq_compile_flags,file,fullfile(lib_path,'+zmq/+core')) (line 166)
  build_function = @(file) compile(zmq_compile_flags, file, fullfile(lib_path,'+zmq/+core'));

Error in make>build (line 167)
  cellfun(build_function, COMPILE_LIST);

Error in make (line 40)
    success = build;
@iandol
Copy link

iandol commented Jan 7, 2022

This worked for me (remove the relative path):

ZMQ_COMPILED_LIB = 'libzmq.a';

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants