-
Notifications
You must be signed in to change notification settings - Fork 138
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
macOS Failure to run setup.py #28
Comments
Looks like ambiguity due to Here is a stackoverflow I got googling the error |
Hey, I think this issue is related to the Python Setup script defaulting to use I managed to compile for OSX by modifying import os
os.environ["CC"] = "g++-10"
os.environ["CXX"] = "g++-10" You will likely need to Hope this helps! |
Looks like this in-fact was the problem, because I had the same issue and this is how I solved it: |
I tried this with the latest ubuntu version and unfortunately have no success with it. Did it in project.h, ImageProcessing.h and Image.h |
change all __max to __maxx works for me on mac m3 Sonoma 14.1 |
Similar to others I am having issues running setup.py on Mac
Below is my error log.
Compiling pyflow.pyx because it changed. [1/1] Cythonizing pyflow.pyx /usr/local/lib/python3.7/site-packages/Cython/Compiler/Main.py:369: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /Users/brettfazio/Documents/School/CAP5415/pyflow/pyflow.pyx tree = Parsing.p_module(s, pxd, full_module_name) running build_ext building 'pyflow' extension creating build creating build/temp.macosx-10.15-x86_64-3.7 creating build/temp.macosx-10.15-x86_64-3.7/src clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/lib/python3.7/site-packages/numpy/core/include -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c pyflow.cpp -o build/temp.macosx-10.15-x86_64-3.7/pyflow.o In file included from pyflow.cpp:649: In file included from /usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/arrayobject.h:4: In file included from /usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/ndarrayobject.h:12: In file included from /usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832: /usr/local/lib/python3.7/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-W#warnings] #warning "Using deprecated NumPy API, disable it with " \ ^ 1 warning generated. clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/lib/python3.7/site-packages/numpy/core/include -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/Stochastic.cpp -o build/temp.macosx-10.15-x86_64-3.7/src/Stochastic.o clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/lib/python3.7/site-packages/numpy/core/include -I/usr/local/include -I/usr/local/opt/[email protected]/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c src/GaussianPyramid.cpp -o build/temp.macosx-10.15-x86_64-3.7/src/GaussianPyramid.o In file included from src/GaussianPyramid.cpp:4: In file included from src/GaussianPyramid.h:7: In file included from src/Image.h:9: src/ImageProcessing.h:154:20: warning: unused variable 'l' [-Wunused-variable] int xx,yy,m,n,u,v,l,offset; ^ src/ImageProcessing.h:344:14: warning: unused variable 'offset' [-Wunused-variable] int i,j,l,k,offset,ii; ^ src/ImageProcessing.h:415:2: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete] delete pBuffer; ^ [] src/ImageProcessing.h:395:18: note: allocated with 'new[]' here double* pBuffer=new double[nChannels]; ^ src/ImageProcessing.h:425:28: warning: unused variable 'offset' [-Wunused-variable] int i,j,u,v,k,ii,jj,wsize,offset; ^ In file included from src/GaussianPyramid.cpp:4: In file included from src/GaussianPyramid.h:7: In file included from src/Image.h:14: src/Stochastic.h:157:10: error: reference to '__max' is ambiguous result=__max(result,pData[i]); ^ src/project.h:47:4: note: candidate found by name lookup is '__max' T1 __max(T1 a, T2 b) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:163:32: note: candidate found by name lookup is 'std::__max' enum align_val_t { __zero = 0, __max = (size_t)-1 }; ^ In file included from src/GaussianPyramid.cpp:4: In file included from src/GaussianPyramid.h:7: In file included from src/Image.h:14: src/Stochastic.h:405:7: error: reference to '__max' is ambiguous u=__max(__min(u,NumPoints-1),0); ^ src/project.h:47:4: note: candidate found by name lookup is '__max' T1 __max(T1 a, T2 b) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:163:32: note: candidate found by name lookup is 'std::__max' enum align_val_t { __zero = 0, __max = (size_t)-1 }; ^ In file included from src/GaussianPyramid.cpp:4: In file included from src/GaussianPyramid.h:7: src/Image.h:62:8: error: reference to '__max' is ambiguous Max=__max(Max,pData[i]); ^ src/project.h:47:4: note: candidate found by name lookup is '__max' T1 __max(T1 a, T2 b) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:163:32: note: candidate found by name lookup is 'std::__max' enum align_val_t { __zero = 0, __max = (size_t)-1 }; ^ In file included from src/GaussianPyramid.cpp:4: In file included from src/GaussianPyramid.h:7: src/Image.h:1339:16: error: reference to '__max' is ambiguous int hfsize = (__max(hfilter.width(),hfilter.height())-1)/2; ^ src/project.h:47:4: note: candidate found by name lookup is '__max' T1 __max(T1 a, T2 b) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:163:32: note: candidate found by name lookup is 'std::__max' enum align_val_t { __zero = 0, __max = (size_t)-1 }; ^ In file included from src/GaussianPyramid.cpp:4: In file included from src/GaussianPyramid.h:7: src/Image.h:1339:16: error: type name requires a specifier or qualifier int hfsize = (__max(hfilter.width(),hfilter.height())-1)/2; ^ src/Image.h:1339:16: error: expected ')' src/Image.h:1339:15: note: to match this '(' int hfsize = (__max(hfilter.width(),hfilter.height())-1)/2; ^ src/Image.h:1340:16: error: reference to '__max' is ambiguous int vfsize = (__max(vfilter.width(),vfilter.height())-1)/2; ^ src/project.h:47:4: note: candidate found by name lookup is '__max' T1 __max(T1 a, T2 b) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:163:32: note: candidate found by name lookup is 'std::__max' enum align_val_t { __zero = 0, __max = (size_t)-1 }; ^ In file included from src/GaussianPyramid.cpp:4: In file included from src/GaussianPyramid.h:7: src/Image.h:1340:16: error: type name requires a specifier or qualifier int vfsize = (__max(vfilter.width(),vfilter.height())-1)/2; ^ src/Image.h:1340:16: error: expected ')' src/Image.h:1340:15: note: to match this '(' int vfsize = (__max(vfilter.width(),vfilter.height())-1)/2; ^ src/Image.h:1351:6: warning: explicitly assigning value of variable of type 'int' to itself [-Wself-assign] i = i; ~ ^ ~ src/Image.h:1428:16: error: reference to '__max' is ambiguous int hfsize = (__max(hfilter.width(),hfilter.height())-1)/2; ^ src/project.h:47:4: note: candidate found by name lookup is '__max' T1 __max(T1 a, T2 b) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:163:32: note: candidate found by name lookup is 'std::__max' enum align_val_t { __zero = 0, __max = (size_t)-1 }; ^ In file included from src/GaussianPyramid.cpp:4: In file included from src/GaussianPyramid.h:7: src/Image.h:1428:16: error: type name requires a specifier or qualifier int hfsize = (__max(hfilter.width(),hfilter.height())-1)/2; ^ src/Image.h:1428:16: error: expected ')' src/Image.h:1428:15: note: to match this '(' int hfsize = (__max(hfilter.width(),hfilter.height())-1)/2; ^ src/Image.h:1429:16: error: reference to '__max' is ambiguous int vfsize = (__max(vfilter.width(),vfilter.height())-1)/2; ^ src/project.h:47:4: note: candidate found by name lookup is '__max' T1 __max(T1 a, T2 b) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:163:32: note: candidate found by name lookup is 'std::__max' enum align_val_t { __zero = 0, __max = (size_t)-1 }; ^ In file included from src/GaussianPyramid.cpp:4: In file included from src/GaussianPyramid.h:7: src/Image.h:1429:16: error: type name requires a specifier or qualifier int vfsize = (__max(vfilter.width(),vfilter.height())-1)/2; ^ src/Image.h:1429:16: error: expected ')' src/Image.h:1429:15: note: to match this '(' int vfsize = (__max(vfilter.width(),vfilter.height())-1)/2; ^ src/Image.h:1495:16: error: reference to '__max' is ambiguous data[i] = __max(data[i],pData[of... ^ src/project.h:47:4: note: candidate found by name lookup is '__max' T1 __max(T1 a, T2 b) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:163:32: note: candidate found by name lookup is 'std::__max' enum align_val_t { __zero = 0, __max = (size_t)-1 }; ^ In file included from src/GaussianPyramid.cpp:4: In file included from src/GaussianPyramid.h:7: src/Image.h:1613:17: warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare] for(int k=0;k<firstNChannels;k++) ~^~~~~~~~~~~~~~~ src/Image.h:1933:20: error: reference to '__max' is ambiguous pData[i] = __min(__max(pData[i],0),ImgMax); ^ src/project.h:47:4: note: candidate found by name lookup is '__max' T1 __max(T1 a, T2 b) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:163:32: note: candidate found by name lookup is 'std::__max' enum align_val_t { __zero = 0, __max = (size_t)-1 }; ^ In file included from src/GaussianPyramid.cpp:4: In file included from src/GaussianPyramid.h:7: src/Image.h:2288:15: error: reference to '__max' is ambiguous x0 = __min(__max(x0,0),imWidth-1); ^ src/project.h:47:4: note: candidate found by name lookup is '__max' T1 __max(T1 a, T2 b) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:163:32: note: candidate found by name lookup is 'std::__max' enum align_val_t { __zero = 0, __max = (size_t)-1 }; ^ In file included from src/GaussianPyramid.cpp:4: In file included from src/GaussianPyramid.h:7: src/Image.h:2289:15: error: reference to '__max' is ambiguous x1 = __min(__max(x1,0),imWidth-1); ^ src/project.h:47:4: note: candidate found by name lookup is '__max' T1 __max(T1 a, T2 b) ^ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/new:163:32: note: candidate found by name lookup is 'std::__max' enum align_val_t { __zero = 0, __max = (size_t)-1 }; ^ fatal error: too many errors emitted, stopping now [-ferror-limit=] 6 warnings and 20 errors generated. error: command 'clang' failed with exit status 1
The text was updated successfully, but these errors were encountered: