Closed sylviemonet closed 3 years ago
Thanks @sylviemonet! Could you post the errors you were getting with compilation?
My gut feeling is that this is due to a change in compilation flags that occurred in #229
% cd thewalrus && python -m pip install -e .
Obtaining file:///Users/yuanyao/Desktop/thewalrus
Requirement already satisfied: dask[delayed] in /Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages (from thewalrus==0.16.0.dev0) (2021.1.1)
Requirement already satisfied: numba>=0.49.1 in /Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages (from thewalrus==0.16.0.dev0) (0.52.0)
Requirement already satisfied: scipy>=1.2.1 in /Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages (from thewalrus==0.16.0.dev0) (1.6.0)
Requirement already satisfied: sympy>=1.5.1 in /Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages (from thewalrus==0.16.0.dev0) (1.7.1)
Requirement already satisfied: repoze.lru>=0.7 in /Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages (from thewalrus==0.16.0.dev0) (0.7)
Requirement already satisfied: setuptools in /Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages (from numba>=0.49.1->thewalrus==0.16.0.dev0) (57.1.0)
Requirement already satisfied: numpy>=1.15 in /Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages (from numba>=0.49.1->thewalrus==0.16.0.dev0) (1.20.2)
Requirement already satisfied: llvmlite<0.36,>=0.35.0 in /Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages (from numba>=0.49.1->thewalrus==0.16.0.dev0) (0.35.0)
Requirement already satisfied: mpmath>=0.19 in /Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages (from sympy>=1.5.1->thewalrus==0.16.0.dev0) (1.1.0)
Requirement already satisfied: pyyaml in /Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages (from dask[delayed]->thewalrus==0.16.0.dev0) (5.4.1)
Requirement already satisfied: toolz>=0.8.2 in /Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages (from dask[delayed]->thewalrus==0.16.0.dev0) (0.11.1)
Requirement already satisfied: cloudpickle>=0.2.2 in /Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages (from dask[delayed]->thewalrus==0.16.0.dev0) (1.6.0)
Installing collected packages: thewalrus
Attempting uninstall: thewalrus
Found existing installation: thewalrus 0.16.0.dev0
Uninstalling thewalrus-0.16.0.dev0:
Successfully uninstalled thewalrus-0.16.0.dev0
Running setup.py develop for thewalrus
ERROR: Command errored out with exit status 1:
command: /Users/yuanyao/miniforge3/envs/tf24/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/yuanyao/Desktop/thewalrus/setup.py'"'"'; __file__='"'"'/Users/yuanyao/Desktop/thewalrus/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
cwd: /Users/yuanyao/Desktop/thewalrus/
Complete output (262 lines):
running develop
running build_scripts
running egg_info
running build_src
build_src
building extension "libwalrus" sources
build_src: building npy-pkg config files
creating thewalrus.egg-info
writing thewalrus.egg-info/PKG-INFO
writing dependency_links to thewalrus.egg-info/dependency_links.txt
writing requirements to thewalrus.egg-info/requires.txt
writing top-level names to thewalrus.egg-info/top_level.txt
writing manifest file 'thewalrus.egg-info/SOURCES.txt'
reading manifest file 'thewalrus.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE'
writing manifest file 'thewalrus.egg-info/SOURCES.txt'
running build_ext
customize UnixCCompiler
customize UnixCCompiler using build_ext
CCompilerOpt.cc_test_flags[999] : testing flags (-march=native)
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64
creating /var/folders/j1/rns1v3dn6mg2w4hnhvfrnv2c0000gn/T/tmpeo50re19/Users
creating /var/folders/j1/rns1v3dn6mg2w4hnhvfrnv2c0000gn/T/tmpeo50re19/Users/yuanyao
creating /var/folders/j1/rns1v3dn6mg2w4hnhvfrnv2c0000gn/T/tmpeo50re19/Users/yuanyao/miniforge3
creating /var/folders/j1/rns1v3dn6mg2w4hnhvfrnv2c0000gn/T/tmpeo50re19/Users/yuanyao/miniforge3/envs
creating /var/folders/j1/rns1v3dn6mg2w4hnhvfrnv2c0000gn/T/tmpeo50re19/Users/yuanyao/miniforge3/envs/tf24
creating /var/folders/j1/rns1v3dn6mg2w4hnhvfrnv2c0000gn/T/tmpeo50re19/Users/yuanyao/miniforge3/envs/tf24/lib
creating /var/folders/j1/rns1v3dn6mg2w4hnhvfrnv2c0000gn/T/tmpeo50re19/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8
creating /var/folders/j1/rns1v3dn6mg2w4hnhvfrnv2c0000gn/T/tmpeo50re19/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages
creating /var/folders/j1/rns1v3dn6mg2w4hnhvfrnv2c0000gn/T/tmpeo50re19/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy
creating /var/folders/j1/rns1v3dn6mg2w4hnhvfrnv2c0000gn/T/tmpeo50re19/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/distutils
creating /var/folders/j1/rns1v3dn6mg2w4hnhvfrnv2c0000gn/T/tmpeo50re19/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/distutils/checks
compile options: '-I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c'
extra options: '-march=native'
CCompilerOpt.dist_test[576] : CCompilerOpt._dist_test_spawn[711] : Command (gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c /Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/distutils/checks/test_flags.c -o /var/folders/j1/rns1v3dn6mg2w4hnhvfrnv2c0000gn/T/tmpeo50re19/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/distutils/checks/test_flags.o -MMD -MF /var/folders/j1/rns1v3dn6mg2w4hnhvfrnv2c0000gn/T/tmpeo50re19/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/distutils/checks/test_flags.o.d -march=native) failed with exit status 1 output ->
clang: error: the clang compiler does not support '-march=native'
CCompilerOpt.cc_test_flags[1003] : testing failed
CCompilerOpt.cc_test_flags[999] : testing flags (-O3)
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64
compile options: '-I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c'
extra options: '-O3'
CCompilerOpt.cc_test_flags[999] : testing flags (-Werror)
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64
compile options: '-I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c'
extra options: '-Werror'
CCompilerOpt.__init__[1674] : check requested baseline
CCompilerOpt.feature_test[1444] : testing feature 'NEON_FP16' with flags ()
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64
compile options: '-I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c'
extra options: '-Werror'
CCompilerOpt.feature_test[1444] : testing feature 'NEON' with flags ()
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64
compile options: '-I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c'
extra options: '-Werror'
CCompilerOpt.feature_test[1444] : testing feature 'NEON_VFPV4' with flags ()
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64
compile options: '-I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c'
extra options: '-Werror'
CCompilerOpt.feature_test[1444] : testing feature 'ASIMD' with flags ()
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64
compile options: '-I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c'
extra options: '-Werror'
CCompilerOpt.__init__[1683] : check requested dispatch-able features
CCompilerOpt.cc_test_flags[999] : testing flags (-march=armv8.2-a+fp16)
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64
compile options: '-I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c'
extra options: '-march=armv8.2-a+fp16'
CCompilerOpt.feature_test[1444] : testing feature 'ASIMDHP' with flags (-march=armv8.2-a+fp16)
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64
compile options: '-I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c'
extra options: '-march=armv8.2-a+fp16 -Werror'
CCompilerOpt.cc_test_flags[999] : testing flags (-march=armv8.2-a+fp16fml)
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64
compile options: '-I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c'
extra options: '-march=armv8.2-a+fp16fml'
CCompilerOpt.feature_test[1444] : testing feature 'ASIMDFHM' with flags (-march=armv8.2-a+fp16+fp16fml)
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64
compile options: '-I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c'
extra options: '-march=armv8.2-a+fp16+fp16fml -Werror'
CCompilerOpt.dist_test[576] : CCompilerOpt._dist_test_spawn[711] : Command (gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c /Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/distutils/checks/cpu_asimdfhm.c -o /var/folders/j1/rns1v3dn6mg2w4hnhvfrnv2c0000gn/T/tmpeo50re19/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/distutils/checks/cpu_asimdfhm.o -MMD -MF /var/folders/j1/rns1v3dn6mg2w4hnhvfrnv2c0000gn/T/tmpeo50re19/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/distutils/checks/cpu_asimdfhm.o.d -march=armv8.2-a+fp16+fp16fml -Werror) failed with exit status 1 output ->
/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/distutils/checks/cpu_asimdfhm.c:13:35: error: implicit declaration of function 'vfmlal_low_u32' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
int ret = (int)vget_lane_f32(vfmlal_low_u32(vlf, vlhp, vlhp), 0);
^
/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/distutils/checks/cpu_asimdfhm.c:13:35: note: did you mean 'vfmlal_low_f16'?
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.5/include/arm_neon.h:41048:18: note: 'vfmlal_low_f16' declared here
__ai float32x2_t vfmlal_low_f16(float32x2_t __p0, float16x4_t __p1, float16x4_t __p2) {
^
/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/distutils/checks/cpu_asimdfhm.c:13:21: error: initializing 'float32x2_t' (vector of 2 'float32_t' values) with an expression of incompatible type 'int'
int ret = (int)vget_lane_f32(vfmlal_low_u32(vlf, vlhp, vlhp), 0);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.5/include/arm_neon.h:7791:15: note: expanded from macro 'vget_lane_f32'
float32x2_t __s0 = __p0; \
^ ~~~~
/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/distutils/checks/cpu_asimdfhm.c:14:36: error: implicit declaration of function 'vfmlslq_high_u32' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
ret += (int)vgetq_lane_f32(vfmlslq_high_u32(vf, vhp, vhp), 0);
^
/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/distutils/checks/cpu_asimdfhm.c:14:36: note: did you mean 'vmlsl_high_u32'?
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.5/include/arm_neon.h:66866:17: note: 'vmlsl_high_u32' declared here
__ai uint64x2_t vmlsl_high_u32(uint64x2_t __p0, uint32x4_t __p1, uint32x4_t __p2) {
^
/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/distutils/checks/cpu_asimdfhm.c:14:21: error: initializing 'float32x4_t' (vector of 4 'float32_t' values) with an expression of incompatible type 'int'
ret += (int)vgetq_lane_f32(vfmlslq_high_u32(vf, vhp, vhp), 0);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/12.0.5/include/arm_neon.h:7601:15: note: expanded from macro 'vgetq_lane_f32'
float32x4_t __s0 = __p0; \
^ ~~~~
4 errors generated.
CCompilerOpt.feature_test[1458] : testing failed
CCompilerOpt.cc_test_flags[999] : testing flags (-march=armv8.2-a+dotprod)
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64
compile options: '-I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c'
extra options: '-march=armv8.2-a+dotprod'
CCompilerOpt.feature_test[1444] : testing feature 'ASIMDDP' with flags (-march=armv8.2-a+dotprod)
C compiler: gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64
compile options: '-I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c'
extra options: '-march=armv8.2-a+dotprod -Werror'
CCompilerOpt.__init__[1695] : skip features (NEON_VFPV4 NEON ASIMD NEON_FP16) since its part of baseline
CCompilerOpt.__init__[1699] : initialize targets groups
CCompilerOpt.__init__[1701] : parse target group simd_test
CCompilerOpt._parse_target_tokens[1910] : skip targets (VSX3 SSE2 SSE42 XOP (FMA3 AVX2) AVX512F VSX VSX2 AVX512_SKX FMA4) not part of baseline or dispatch-able features
CCompilerOpt._parse_policy_not_keepbase[2022] : skip baseline features (ASIMD)
CCompilerOpt.generate_dispatch_header[2236] : generate CPU dispatch header: (build/src.macosx-11.0-arm64-3.8/numpy/distutils/include/npy_cpu_dispatch_config.h)
CCompilerOpt.generate_dispatch_header[2245] : dispatch header dir build/src.macosx-11.0-arm64-3.8/numpy/distutils/include does not exist, creating it
Detected changes on compiler optimizations, force rebuilding
customize UnixCCompiler
customize UnixCCompiler using build_ext
building 'libwalrus' extension
compiling C++ sources
C compiler: g++ -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64
creating build/temp.macosx-11.0-arm64-3.8/thewalrus
compile options: '-I./thewalrus -I./include -I/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/core/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ -I/usr/include/eigen3 -I/usr/local/include/eigen3 -I/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/core/include -Ibuild/src.macosx-11.0-arm64-3.8/numpy/distutils/include -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c'
extra options: '-std=c++11 -Wall -fPIC -O3 -Xpreprocessor -fopenmp -mmacosx-version-min=10.9 -shared'
g++: ./thewalrus/libwalrus.cpp
clang: warning: argument unused during compilation: '-shared' [-Wunused-command-line-argument]
In file included from ./thewalrus/libwalrus.cpp:69:
/Users/yuanyao/miniforge3/envs/tf24/include/python3.8/Python.h:14:2: error: "Something's broken. UCHAR_MAX should be defined in limits.h."
#error "Something's broken. UCHAR_MAX should be defined in limits.h."
^
/Users/yuanyao/miniforge3/envs/tf24/include/python3.8/Python.h:18:2: error: "Python's source code assumes C's unsigned char is an 8-bit type."
#error "Python's source code assumes C's unsigned char is an 8-bit type."
^
/Users/yuanyao/miniforge3/envs/tf24/include/python3.8/Python.h:27:5: error: "Python.h requires that stdio.h define NULL."
# error "Python.h requires that stdio.h define NULL."
^
In file included from ./thewalrus/libwalrus.cpp:69:
In file included from /Users/yuanyao/miniforge3/envs/tf24/include/python3.8/Python.h:30:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:73:64: error: use of undeclared identifier 'strchr'
char* __libcpp_strchr(const char* __s, int __c) {return (char*)strchr(__s, __c);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:80:75: error: use of undeclared identifier 'strpbrk'
char* __libcpp_strpbrk(const char* __s1, const char* __s2) {return (char*)strpbrk(__s1, __s2);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:87:65: error: use of undeclared identifier 'strrchr'; did you mean 'strchr'?
char* __libcpp_strrchr(const char* __s, int __c) {return (char*)strrchr(__s, __c);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:75:13: note: 'strchr' declared here
const char* strchr(const char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:94:49: error: unknown type name 'size_t'
void* __libcpp_memchr(const void* __s, int __c, size_t __n) {return (void*)memchr(__s, __c, __n);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:96:46: error: unknown type name 'size_t'
const void* memchr(const void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:98:46: error: unknown type name 'size_t'
void* memchr( void* __s, int __c, size_t __n) {return __libcpp_memchr(__s, __c, __n);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:101:74: error: use of undeclared identifier 'strstr'; did you mean 'strchr'?
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:77:13: note: 'strchr' declared here
char* strchr( char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:101:74: error: no matching function for call to 'strchr'
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:77:13: note: candidate disabled: <no message provided>
char* strchr( char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:101:81: error: cannot initialize a parameter of type 'char *' with an lvalue of type 'const char *'
char* __libcpp_strstr(const char* __s1, const char* __s2) {return (char*)strstr(__s1, __s2);}
^~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/string.h:77:32: note: passing argument to parameter '__s' here
char* strchr( char* __s, int __c) {return __libcpp_strchr(__s, __c);}
^
In file included from ./thewalrus/libwalrus.cpp:69:
In file included from /Users/yuanyao/miniforge3/envs/tf24/include/python3.8/Python.h:34:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h:142:34: error: unknown type name 'ldiv_t'
inline _LIBCPP_INLINE_VISIBILITY ldiv_t div(long __x, long __y) _NOEXCEPT {
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h:143:12: error: no member named 'ldiv' in the global namespace
return ::ldiv(__x, __y);
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h:146:34: error: unknown type name 'lldiv_t'
inline _LIBCPP_INLINE_VISIBILITY lldiv_t div(long long __x,
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/stdlib.h:148:12: error: no member named 'lldiv' in the global namespace
return ::lldiv(__x, __y);
~~^
In file included from ./thewalrus/libwalrus.cpp:69:
In file included from /Users/yuanyao/miniforge3/envs/tf24/include/python3.8/Python.h:63:
In file included from /Users/yuanyao/miniforge3/envs/tf24/include/python3.8/pyport.h:212:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:767:93: error: no member named 'acosf' in the global namespace; did you mean 'acos'?
inline _LIBCPP_INLINE_VISIBILITY float acos(float __lcpp_x) _NOEXCEPT {return ::acosf(__lcpp_x);}
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:767:46: note: 'acos' declared here
inline _LIBCPP_INLINE_VISIBILITY float acos(float __lcpp_x) _NOEXCEPT {return ::acosf(__lcpp_x);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:768:93: error: no member named 'acosl' in the global namespace; did you mean 'acos'?
inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return ::acosl(__lcpp_x);}
~~^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:767:46: note: 'acos' declared here
inline _LIBCPP_INLINE_VISIBILITY float acos(float __lcpp_x) _NOEXCEPT {return ::acosf(__lcpp_x);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:774:38: error: call to 'acos' is ambiguous
acos(_A1 __lcpp_x) _NOEXCEPT {return ::acos((double)__lcpp_x);}
^~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:767:46: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY float acos(float __lcpp_x) _NOEXCEPT {return ::acosf(__lcpp_x);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:768:46: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long double acos(long double __lcpp_x) _NOEXCEPT {return ::acosl(__lcpp_x);}
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
########### EXT COMPILER OPTIMIZATION ###########
Platform :
Architecture: aarch64
Compiler : gcc
CPU baseline :
Requested : 'min'
Enabled : NEON NEON_FP16 NEON_VFPV4 ASIMD
Flags : none
Extra checks: none
CPU dispatch :
Requested : 'max -xop -fma4'
Enabled : ASIMDHP ASIMDDP
Generated : none
CCompilerOpt._cache_write[796] : write cache to path -> /Users/yuanyao/Desktop/thewalrus/build/temp.macosx-11.0-arm64-3.8/ccompiler_opt_cache_ext.py
/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/setuptools/dist.py:484: UserWarning: Normalizing '0.16.0-dev' to '0.16.0.dev0'
warnings.warn(tmpl.format(**locals()))
error: Command "g++ -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I/Users/yuanyao/miniforge3/envs/tf24/include -arch arm64 -I./thewalrus -I./include -I/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/core/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/ -I/usr/include/eigen3 -I/usr/local/include/eigen3 -I/Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/numpy/core/include -Ibuild/src.macosx-11.0-arm64-3.8/numpy/distutils/include -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -I/Users/yuanyao/miniforge3/envs/tf24/include/python3.8 -c ./thewalrus/libwalrus.cpp -o build/temp.macosx-11.0-arm64-3.8/thewalrus/libwalrus.o -MMD -MF build/temp.macosx-11.0-arm64-3.8/thewalrus/libwalrus.o.d -std=c++11 -Wall -fPIC -O3 -Xpreprocessor -fopenmp -mmacosx-version-min=10.9 -shared" failed with exit status 1
----------------------------------------
Rolling back uninstall of thewalrus
Moving to /Users/yuanyao/miniforge3/envs/tf24/lib/python3.8/site-packages/thewalrus.egg-link
from /private/var/folders/j1/rns1v3dn6mg2w4hnhvfrnv2c0000gn/T/pip-uninstall-c0pf8dtw/thewalrus.egg-link
ERROR: Command errored out with exit status 1: /Users/yuanyao/miniforge3/envs/tf24/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/Users/yuanyao/Desktop/thewalrus/setup.py'"'"'; __file__='"'"'/Users/yuanyao/Desktop/thewalrus/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps Check the logs for full command output.
Thanks @sylviemonet!
Hi @sylviemonet, are you using an m1 Mac?
Hi @sylviemonet, are you using an m1 Mac?
Hi @brownj85, yes.
Hey @brownj85 could you quickly give an update here on the timeline of fixing this issue with PR 273 shown above? :)
@sylviemonet we will try to fix the installation bug as soon as possible!
Hey @brownj85 could you quickly give an update here on the timeline of fixing this issue with PR 273 shown above? :)
Hey Maria, the fix is ready to merge, I just need an approval from a dev with write access!
Looks like the fix has been merged now. @sylviemonet if you can test with the latest version and let us know if the bug is solved, that would be great, thanks :slightly_smiling_face:
Hi @co9olguy and @mariaschuld and @brownj85, I got this finally!
Successfully installed thewalrus-0.16.0.dev0
Thanks for you all!
:tada:
Issue description
Description of the issue -
Try to install the library with the developer mode. However, it gives me lots of errors related to the compiler.
Expected behavior: Installation.
Actual behavior: Erros.
Additional information
I tried to replace the setup.py with the old version setup.py and it works.
Then I tracked to the PR "Refactor setup.py". Maybe there is something wrong with macOS Big Sur 11.4?