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

cannot install on macOS or ubuntu #52

Open
vinith1 opened this issue Mar 19, 2019 · 4 comments
Open

cannot install on macOS or ubuntu #52

vinith1 opened this issue Mar 19, 2019 · 4 comments

Comments

@vinith1
Copy link

vinith1 commented Mar 19, 2019

Building with 'Xcode Clang++'.
/usr/bin/xcrun -sdk macosx10.13 clang++ -c -DUSE_MEX_CMD -DMATLAB_MEX_FILE -I"/Applications/Matlab/MATLAB_R2017b.app/extern/include" -I"/Applications/Matlab/MATLAB_R2017b.app/simulink/include" -fno-common -arch x86_64 -mmacosx-version-min=10.9 -fexceptions -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -fobjc-arc -std=c++11 -stdlib=libc++ -O3 "/Users/vinith/Documents/DownloadedCodes/proxTV-master/matlab/solveTV1_condat.cpp" -o /var/folders/d3/2mszdryx5xgbh6l8cn0dlqyc0000gt/T/mex_14100380134723_1097/solveTV1_condat.o
/usr/bin/xcrun -sdk macosx10.13 clang++ -c -DUSE_MEX_CMD -DMATLAB_MEX_FILE -I"/Applications/Matlab/MATLAB_R2017b.app/extern/include" -I"/Applications/Matlab/MATLAB_R2017b.app/simulink/include" -fno-common -arch x86_64 -mmacosx-version-min=10.9 -fexceptions -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -fobjc-arc -std=c++11 -stdlib=libc++ -O3 "/Applications/Matlab/MATLAB_R2017b.app/extern/version/cpp_mexapi_version.cpp" -o /var/folders/d3/2mszdryx5xgbh6l8cn0dlqyc0000gt/T/mex_14100380134723_1097/cpp_mexapi_version.o
/usr/bin/xcrun -sdk macosx10.13 clang++ -Wl,-twolevel_namespace -undefined error -arch x86_64 -mmacosx-version-min=10.9 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk -framework Cocoa -bundle -stdlib=libc++ -O -Wl,-exported_symbols_list,"/Applications/Matlab/MATLAB_R2017b.app/extern/lib/maci64/mexFunction.map" -Wl,-exported_symbols_list,"/Applications/Matlab/MATLAB_R2017b.app/extern/lib/maci64/c_exportsmexfileversion.map" /var/folders/d3/2mszdryx5xgbh6l8cn0dlqyc0000gt/T/mex_14100380134723_1097/solveTV1_condat.o /var/folders/d3/2mszdryx5xgbh6l8cn0dlqyc0000gt/T/mex_14100380134723_1097/cpp_mexapi_version.o ".o" -lblas -llapack -lm -L"/Applications/Matlab/MATLAB_R2017b.app/bin/maci64" -lmx -lmex -lmat -o solveTV1_condat.mexmaci64
Error using mex
clang: error: no such file or directory: '
.o'

Error in install (line 68)
mex -v -cxx -lblas -llapack -lm CXXOPTIMFLAGS=-O3 solveTV1_condat.cpp "*.o"

@albarji
Copy link
Owner

albarji commented Mar 20, 2019

Well, honestly I have no idea what is going on there. I do not own a Mac, so I can't really debug into this. I know the Python interface for proxTV works under MacOS (Travis tests are passing), but I'm afraid the Matlab interface has only been tested under Ubuntu.

The error traces above seem a macOS problem. What error do you get under Ubuntu? Can you provide more information about your system?

@vinith1
Copy link
Author

vinith1 commented Mar 21, 2019

I get similar Error on Ubuntu. I am using MATLAB 2018b with gcc 7.3.0 and Ubuntu 18

The Error message is
/usr/bin/g++ -c -DMATLAB_DEFAULT_RELEASE=R2017b -DUSE_MEX_CMD -D_GNU_SOURCE -DMATLAB_MEX_FILE -I"/usr/local/MATLAB/R2018b/extern/include" -I"/usr/local/MATLAB/R2018b/simulink/include" -fexceptions -fPIC -fno-omit-frame-pointer -pthread -std=c++11 -fopenmp -O3 "/home/vinith/Desktop/proxTV-master/matlab/solveTV1_condat.cpp" -o /tmp/mex_5293994932119778_9874/solveTV1_condat.o
/usr/bin/g++ -c -DMATLAB_DEFAULT_RELEASE=R2017b -DUSE_MEX_CMD -D_GNU_SOURCE -DMATLAB_MEX_FILE -I"/usr/local/MATLAB/R2018b/extern/include" -I"/usr/local/MATLAB/R2018b/simulink/include" -fexceptions -fPIC -fno-omit-frame-pointer -pthread -std=c++11 -fopenmp -O3 "/usr/local/MATLAB/R2018b/extern/version/cpp_mexapi_version.cpp" -o /tmp/mex_5293994932119778_9874/cpp_mexapi_version.o
/usr/bin/g++ -pthread -Wl,--no-undefined -fopenmp -shared -O -Wl,--version-script,"/usr/local/MATLAB/R2018b/extern/lib/glnxa64/c_exportsmexfileversion.map" /tmp/mex_5293994932119778_9874/solveTV1_condat.o /tmp/mex_5293994932119778_9874/cpp_mexapi_version.o "*.o" -lblas -llapack -lm -Wl,--as-needed -Wl,-rpath-link,/usr/local/MATLAB/R2018b/bin/glnxa64 -L"/usr/local/MATLAB/R2018b/bin/glnxa64" -Wl,-rpath-link,/usr/local/MATLAB/R2018b/extern/bin/glnxa64 -L"/usr/local/MATLAB/R2018b/extern/bin/glnxa64" -lMatlabDataArray -lmx -lmex -lmat -lm -lstdc++ -o solveTV1_condat.mexa64
Error using mex
g++: error: *.o: No such file or directory

Error in install (line 34)
mex -v -cxx -lblas -llapack -lm CXXOPTIMFLAGS=-O3 CXXFLAGS="$CXXFLAGS -fopenmp" LDFLAGS="$LDFLAGS -fopenmp" solveTV1_condat.cpp "*.o"

@mwaldron104
Copy link

Seeing the same error on RHEL-7 using gcc 6.3.0 and MATLAB 2019a

/usr/bin/g++ -c -DMATLAB_DEFAULT_RELEASE=R2017b -DUSE_MEX_CMD -D_GNU_SOURCE -DMATLAB_MEX_FILE -I"/nas/longleaf/apps/matlab/2019a/extern/include" -I"/nas/longleaf/apps/matlab/2019a/simulink/include" -fexceptions -fPIC -fno-omit-frame-pointer -pthread -std=c++11 -fopenmp -O3 "/nas/longleaf/apps/matlab/2019a/src/proxTV-master/matlab/solveTV1_condat.cpp" -o /tmp/mex_57507958252673322_88083/solveTV1_condat.o
/usr/bin/g++ -c -DMATLAB_DEFAULT_RELEASE=R2017b -DUSE_MEX_CMD -D_GNU_SOURCE -DMATLAB_MEX_FILE -I"/nas/longleaf/apps/matlab/2019a/extern/include" -I"/nas/longleaf/apps/matlab/2019a/simulink/include" -fexceptions -fPIC -fno-omit-frame-pointer -pthread -std=c++11 -fopenmp -O3 "/nas/longleaf/apps/matlab/2019a/extern/version/cpp_mexapi_version.cpp" -o /tmp/mex_57507958252673322_88083/cpp_mexapi_version.o
/usr/bin/g++ -pthread -Wl,--no-undefined -fopenmp -shared -O -Wl,--version-script,"/nas/longleaf/apps/matlab/2019a/extern/lib/glnxa64/c_exportsmexfileversion.map" /tmp/mex_57507958252673322_88083/solveTV1_condat.o /tmp/mex_57507958252673322_88083/cpp_mexapi_version.o "*.o" -lblas -llapack -lm -Wl,--as-needed -Wl,-rpath-link,/nas/longleaf/apps/matlab/2019a/bin/glnxa64 -L"/nas/longleaf/apps/matlab/2019a/bin/glnxa64" -Wl,-rpath-link,/nas/longleaf/apps/matlab/2019a/extern/bin/glnxa64 -L"/nas/longleaf/apps/matlab/2019a/extern/bin/glnxa64" -lMatlabDataArray -lmx -lmex -lmat -lm -lstdc++ -o solveTV1_condat.mexa64
Error using mex
g++: error: *.o: No such file or directory

Error in install (line 34)
mex -v -cxx -lblas -llapack -lm CXXOPTIMFLAGS=-O3 CXXFLAGS="$CXXFLAGS -fopenmp" LDFLAGS="$LDFLAGS -fopenmp" solveTV1_condat.cpp "*.o"

@fengpinghu
Copy link

It looks the lines like this in the install.m file poses a dilema:
mex -v -cxx -lblas -llapack -lm CXXOPTIMFLAGS=-O3 CXXFLAGS="$CXXFLAGS -fopenmp" LDFLAGS="$LDFLAGS -fopenmp" solveTV1_condat.cpp "*.o"

g++ fails with "*.o" where the expanded files are in a quote and thus fail with no subh file or directory
if remove the quote, the * doesn't get expanded.
So I copied those lines and run them in bash:
mex -v -cxx -lblas -llapack -lm CXXOPTIMFLAGS=-O3 CXXFLAGS="$CXXFLAGS -fopenmp" LDFLAGS="$LDFLAGS -fopenmp" solveTV1_condat.cpp *.o
.....

Hope that help.

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

4 participants