osqp / osqp-matlab

Matlab interface for OSQP
https://osqp.org/
Apache License 2.0
42 stars 25 forks source link

Failure to compile on MacBook Air M2 (and binary library for the M series is missing) #54

Open hurak opened 7 months ago

hurak commented 7 months ago

I am unable to start using OSQP within Matlab on MacBook Air M2:

1) the binaries available on the GitHub were only generated for the Intel-version of Macs (osqp_mex.mexmaci64), not the M-series Macs (osqp_mex.mexmaca64 expected).

2) I am failing to compile from source: While compiling qsqp-matlab (cloned from GitHub according to the instructions) I get the following outputs

>> make_osqp
Compiling OSQP solver...                        [done]
Compiling and linking osqpmex...ld: warning: object file (libosqp.a[2](auxil.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[3](error.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[4](lin_alg.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[5](osqp.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[6](proj.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[7](scaling.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[8](util.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[9](kkt.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[10](cs.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[11](polish.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[12](lin_sys.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[13](ctrlc.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[14](lib_handler.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[15](amd_1.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[16](amd_2.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[17](amd_aat.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[21](amd_order.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[22](amd_post_tree.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[23](amd_postorder.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[24](amd_preprocess.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[25](amd_valid.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[26](SuiteSparse_config.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[27](qdldl_interface.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[28](qdldl.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[29](pardiso_interface.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)
ld: warning: object file (libosqp.a[30](pardiso_loader.c.o)) was built for newer 'macOS' version (14.0) than being linked (11.0)

                    [done]
Copying source files for codegen...                 [done]

I am not able to interpret the warnings. My system is up-to-date (macOS Sonoma 14.3, Xcode 15.2), Matlab mex configured with Xcode:

>> mex -setup
MEX configured to use 'Xcode with Clang' for C language compilation.

With the compilation of the QSQP library itself I did not have problems. It compiled with no problems, generating (above all) libosqp.dylib library.