I managed to get rid of part of messages using the rpath and rpath-link, however mex still complains on some missing libraries.
ld: warning: libmwboost_chrono.so.1.56.0, needed by libmwboost_log.so.1.56.0, not found (try using -rpath or -rpath-link)
ld: warning: libicudata.so.59, needed by libmwboost_log.so.1.56.0, not found (try using -rpath or -rpath-link)
ld: warning: cannot find entry symbol _start; not setting start address
bin/glnxa64/libmwservices.so: undefined reference to `mwboost::chrono::steady_clock::now()'
bin/glnxa64/libicuuc.so.59: undefined reference to `icudt59_dat'
bin/glnxa64/libmwmvm.so: undefined reference to `mwboost::chrono::system_clock::now()'
Another observation, when trying using my own Makefiles I had to be extremely careful where to place -lmex -lex .... They have to placed between the include dirs and the lib dirs. This happens only on linux. On macos I had no problem.
Compiling mex on linux machines used to be pretty straightforward but that has definitely changed.


