alanross / AlvaAR

World tracking for WebAR. A Javascript library for Augmented Reality to run SLAM in the browser.
GNU General Public License v3.0
349 stars 73 forks source link

Errors during libs build #20

Open Phillip-Thomas opened 11 months ago

Phillip-Thomas commented 11 months ago

Hi Alan,

I have been struggling to succesfully build the dependencies and thus the slam wasm for a while now. I am hoping you can point me in the right direction of the correct emscripten version to use or point out anything else I am missing. The logs below are only for Eigen, but I get similar fails in all dependency builds

I am on:

macOS: Monterey 12.6.7 node: 16.20.0 python: 3.7

and while Ive tried a few emsdk versions, including latest this was the last attempts versioning:

emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 2.0.34 (0d24418f0eac4828f096ee070dae8472d427edaa) clang version 14.0.0 (https://github.com/llvm/llvm-project 3d39612b3dd3f6b67ee63da305d30606abbe7287) Target: wasm32-unknown-emscripten Thread model: posix InstalledDir: /Users/p.thomas/emsdk/upstream/bin

Console out:

`Compiling with DEFAULT settings
Step 1/1 -------------------------------- Start building: EIGEN 
configure: cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/Users/p.thomas/realityBLU/emsdk/node/16.20.0_64bit/bin/node .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17 -DCMAKE_TOOLCHAIN_FILE=/Users/p.thomas/RealityBLU/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake "-DCMAKE_CXX_FLAGS=-O3 -std=c++17" "-DCMAKE_C_FLAGS=-O3 -std=c++17" -DCMAKE_INSTALL_PREFIX=/Users/p.thomas/realityBLU/AlvaAR/src/libs/build/eigen/ -DBUILD_SHARED_LIBS=OFF
-- Performing Test EIGEN_COMPILER_SUPPORT_CPP11
-- Performing Test EIGEN_COMPILER_SUPPORT_CPP11 - Success
-- Performing Test COMPILER_SUPPORT_std=cpp03
-- Performing Test COMPILER_SUPPORT_std=cpp03 - Success
-- Performing Test standard_math_library_linked_to_automatically
-- Performing Test standard_math_library_linked_to_automatically - Success
-- Standard libraries to link to explicitly: none
-- Performing Test COMPILER_SUPPORT_WERROR
-- Performing Test COMPILER_SUPPORT_WERROR - Success
-- Performing Test COMPILER_SUPPORT_pedantic
-- Performing Test COMPILER_SUPPORT_pedantic - Success
-- Performing Test COMPILER_SUPPORT_Wall
-- Performing Test COMPILER_SUPPORT_Wall - Success
-- Performing Test COMPILER_SUPPORT_Wextra
-- Performing Test COMPILER_SUPPORT_Wextra - Success
-- Performing Test COMPILER_SUPPORT_Wundef
-- Performing Test COMPILER_SUPPORT_Wundef - Success
-- Performing Test COMPILER_SUPPORT_Wcastalign
-- Performing Test COMPILER_SUPPORT_Wcastalign - Success
-- Performing Test COMPILER_SUPPORT_Wcharsubscripts
-- Performing Test COMPILER_SUPPORT_Wcharsubscripts - Success
-- Performing Test COMPILER_SUPPORT_Wnonvirtualdtor
-- Performing Test COMPILER_SUPPORT_Wnonvirtualdtor - Success
-- Performing Test COMPILER_SUPPORT_Wunusedlocaltypedefs
-- Performing Test COMPILER_SUPPORT_Wunusedlocaltypedefs - Success
-- Performing Test COMPILER_SUPPORT_Wpointerarith
-- Performing Test COMPILER_SUPPORT_Wpointerarith - Success
-- Performing Test COMPILER_SUPPORT_Wwritestrings
-- Performing Test COMPILER_SUPPORT_Wwritestrings - Success
-- Performing Test COMPILER_SUPPORT_Wformatsecurity
-- Performing Test COMPILER_SUPPORT_Wformatsecurity - Success
-- Performing Test COMPILER_SUPPORT_Wshorten64to32
-- Performing Test COMPILER_SUPPORT_Wshorten64to32 - Success
-- Performing Test COMPILER_SUPPORT_Wlogicalop
-- Performing Test COMPILER_SUPPORT_Wlogicalop - Failed
-- Performing Test COMPILER_SUPPORT_Wenumconversion
-- Performing Test COMPILER_SUPPORT_Wenumconversion - Success
-- Performing Test COMPILER_SUPPORT_Wcpp11extensions
-- Performing Test COMPILER_SUPPORT_Wcpp11extensions - Success
-- Performing Test COMPILER_SUPPORT_Wdoublepromotion
-- Performing Test COMPILER_SUPPORT_Wdoublepromotion - Success
-- Performing Test COMPILER_SUPPORT_Wshadow
-- Performing Test COMPILER_SUPPORT_Wshadow - Success
-- Performing Test COMPILER_SUPPORT_Wnopsabi
-- Performing Test COMPILER_SUPPORT_Wnopsabi - Success
-- Performing Test COMPILER_SUPPORT_Wnovariadicmacros
-- Performing Test COMPILER_SUPPORT_Wnovariadicmacros - Success
-- Performing Test COMPILER_SUPPORT_Wnolonglong
-- Performing Test COMPILER_SUPPORT_Wnolonglong - Success
-- Performing Test COMPILER_SUPPORT_fnochecknew
-- Performing Test COMPILER_SUPPORT_fnochecknew - Success
-- Performing Test COMPILER_SUPPORT_fnocommon
-- Performing Test COMPILER_SUPPORT_fnocommon - Success
-- Performing Test COMPILER_SUPPORT_fstrictaliasing
-- Performing Test COMPILER_SUPPORT_fstrictaliasing - Success
-- Performing Test COMPILER_SUPPORT_wd981
-- Performing Test COMPILER_SUPPORT_wd981 - Failed
-- Performing Test COMPILER_SUPPORT_wd2304
-- Performing Test COMPILER_SUPPORT_wd2304 - Failed
-- Performing Test COMPILER_SUPPORT_STRICTANSI
-- Performing Test COMPILER_SUPPORT_STRICTANSI - Failed
-- Performing Test COMPILER_SUPPORT_Qunusedarguments
-- Performing Test COMPILER_SUPPORT_Qunusedarguments - Success
-- Performing Test COMPILER_SUPPORT_ansi
-- Performing Test COMPILER_SUPPORT_ansi - Success
-- Performing Test COMPILER_SUPPORT_OPENMP
-- Performing Test COMPILER_SUPPORT_OPENMP - Success
-- Found unsuitable Qt version "" from NOTFOUND
-- Looking for a Fortran compiler
-- Looking for a Fortran compiler - NOTFOUND
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - no
-- Could NOT find CHOLMOD (missing: CHOLMOD_INCLUDES CHOLMOD_LIBRARIES) 
-- Could NOT find UMFPACK (missing: UMFPACK_INCLUDES UMFPACK_LIBRARIES) 
-- Could NOT find KLU (missing: KLU_INCLUDES KLU_LIBRARIES) 
-- Could NOT find SuperLU (missing: SUPERLU_INCLUDES SUPERLU_LIBRARIES SUPERLU_VERSION_OK) (Required is at least version "4.0")
-- A version of Pastix has been found but pastix_nompi.h does not exist in the include directory. Because Eigen tests require a version without MPI, we disable the Pastix backend.
-- Could NOT find SPQR (missing: SPQR_INCLUDES SPQR_LIBRARIES) 
-- Found unsuitable Qt version "" from NOTFOUND
-- Performing Test COMPILER_SUPPORT_FASTMATH
-- Performing Test COMPILER_SUPPORT_FASTMATH - Success
-- Could NOT find Boost (missing: Boost_INCLUDE_DIR) (Required is at least version "1.53.0")
-- Could NOT find Threads (missing: Threads_FOUND) 
-- Could NOT find GoogleHash (missing: GOOGLEHASH_INCLUDES GOOGLEHASH_COMPILE) 
-- Could NOT find Adolc (missing: ADOLC_INCLUDES ADOLC_LIBRARIES) 
-- Could NOT find MPFR (missing: MPFR_INCLUDES MPFR_LIBRARIES MPFR_VERSION_OK) (Required is at least version "1.0.0")
-- Could NOT find PkgConfig (missing: PKG_CONFIG_EXECUTABLE) 
-- Could NOT find CUDA (missing: CUDA_TOOLKIT_ROOT_DIR CUDA_NVCC_EXECUTABLE CUDA_INCLUDE_DIRS CUDA_CUDART_LIBRARY) (Required is at least version "7.0")
-- Found unsuitable Qt version "" from NOTFOUND
-- Qt4 not found, so disabling the mandelbrot and opengl demos
CMake Error: File /Users/p.thomas/realityBLU/AlvaAR/src/libs/eigen/scripts/buildtests.in does not exist.
CMake Error at scripts/CMakeLists.txt:2 (configure_file):
  configure_file Problem configuring file

-- Could NOT find CHOLMOD (missing: CHOLMOD_INCLUDES CHOLMOD_LIBRARIES) 
-- Could NOT find UMFPACK (missing: UMFPACK_INCLUDES UMFPACK_LIBRARIES) 
-- Could NOT find KLU (missing: KLU_INCLUDES KLU_LIBRARIES) 
-- Could NOT find SuperLU (missing: SUPERLU_INCLUDES SUPERLU_LIBRARIES SUPERLU_VERSION_OK) (Required is at least version "4.0")
-- A version of Pastix has been found but pastix_nompi.h does not exist in the include directory. Because Eigen tests require a version without MPI, we disable the Pastix backend.
-- ************************************************************
-- ***    Eigen's unit tests configuration summary          ***
-- ************************************************************
-- 
-- Build type:        Release
-- Build site:        humanCron-3.local
-- Build string:      emscripten-1-clang++-2.0.34-32bit
-- Enabled backends:  
-- Disabled backends: CHOLMOD,  UMFPACK,  KLU,  SuperLU,  PaStiX,  METIS,  SPQR,  Qt4 support,  Boost.Multiprecision,  GoogleHash,  Adolc,  MPFR C++,  fftw,  OpenGL, 
-- Default order:     Column-major
-- Maximal matrix/vector size: 320
-- SSE2:              Using architecture defaults
-- SSE3:              Using architecture defaults
-- SSSE3:             Using architecture defaults
-- SSE4.1:            Using architecture defaults
-- SSE4.2:            Using architecture defaults
-- AVX:               Using architecture defaults
-- AVX2:              Using architecture defaults
-- FMA:               Using architecture defaults
-- AVX512:            Using architecture defaults
-- AVX512DQ:          Using architecture defaults
-- Altivec:           Using architecture defaults
-- VSX:               Using architecture defaults
-- MIPS MSA:          Using architecture defaults
-- ARM NEON:          Using architecture defaults
-- ARMv8 NEON:        Using architecture defaults
-- S390X ZVECTOR:     Using architecture defaults
-- C++11:             OFF
-- SYCL:              OFF
-- CUDA:              OFF
-- HIP:               OFF
-- 
CXX:               /Users/p.thomas/RealityBLU/emsdk/upstream/emscripten/em++
 CXX_FLAGS:         -O3 -std=c++17 -std=c++03 -pedantic -Wall -Wextra -Wundef -Wcast-align -Wchar-subscripts -Wnon-virtual-dtor -Wunused-local-typedefs -Wpointer-arith -Wwrite-strings -Wformat-security -Wshorten-64-to-32 -Wenum-conversion -Wc++11-extensions -Wdouble-promotion -Wshadow -Wno-psabi -Wno-variadic-macros -Wno-long-long -fno-check-new -fno-common -fstrict-aliasing -Qunused-arguments -ansi
 Sparse lib flags:   

-- ************************************************************
-- 
-- Configured Eigen 3.4.0
-- 
-- Available targets (use: make TARGET):
-- ---------+--------------------------------------------------------------
-- Target   |   Description
-- ---------+--------------------------------------------------------------
-- install  | Install Eigen. Headers will be installed to:
--          |     <CMAKE_INSTALL_PREFIX>/<INCLUDE_INSTALL_DIR>
--          |   Using the following values:
--          |     CMAKE_INSTALL_PREFIX: /Users/p.thomas/realityBLU/AlvaAR/src/libs/build/eigen
--          |     INCLUDE_INSTALL_DIR:  include/eigen3
--          |   Change the install location of Eigen headers using:
--          |     cmake . -DCMAKE_INSTALL_PREFIX=yourprefix
--          |   Or:
--          |     cmake . -DINCLUDE_INSTALL_DIR=yourdir
-- doc      | Generate the API documentation, requires Doxygen & LaTeX
-- check    | Build and run the unit-tests. Read this page:
--          |   http://eigen.tuxfamily.org/index.php?title=Tests
-- blas     | Build BLAS library (not the same thing as Eigen)
-- uninstall| Remove files installed by the install target
-- ---------+--------------------------------------------------------------
-- 
-- Configuring incomplete, errors occurred!
See also "/Users/p.thomas/realityBLU/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeOutput.log".
See also "/Users/p.thomas/realityBLU/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeError.log".
emcmake: error: 'cmake -DCMAKE_CROSSCOMPILING_EMULATOR=/Users/p.thomas/realityBLU/emsdk/node/16.20.0_64bit/bin/node .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=17 -DCMAKE_TOOLCHAIN_FILE=/Users/p.thomas/RealityBLU/emsdk/upstream/emscripten/cmake/Modules/Platform/Emscripten.cmake "-DCMAKE_CXX_FLAGS=-O3 -std=c++17" "-DCMAKE_C_FLAGS=-O3 -std=c++17" -DCMAKE_INSTALL_PREFIX=/Users/p.thomas/realityBLU/AlvaAR/src/libs/build/eigen/ -DBUILD_SHARED_LIBS=OFF' failed (returned 1)
make: make -j install
make: *** No rule to make target `install'.  Stop.
emmake: error: 'make -j install' failed (returned 2)
Step 1/1 -------------------------------- Complete `

CMakeError.log

`Performing C++ SOURCE FILE Test COMPILER_SUPPORT_Wlogicalop failed with the following output:
Change Dir: /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-nTW1Vd

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_e33f8/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_e33f8.dir/build.make CMakeFiles/cmTC_e33f8.dir/build
gmake[1]: Entering directory '/Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-nTW1Vd'
Building CXX object CMakeFiles/cmTC_e33f8.dir/src.cxx.o
/Users/p.thomas/emsdk/upstream/emscripten/em++ -DCOMPILER_SUPPORT_Wlogicalop  -O3 -std=c++17 -std=c++03 -pedantic -Wall -Wextra -Wundef -Wcast-align -Wchar-subscripts -Wnon-virtual-dtor -Wunused-local-typedefs -Wpointer-arith -Wwrite-strings -Wformat-security -Wshorten-64-to-32 -Werror   -Wlogical-op -MD -MT CMakeFiles/cmTC_e33f8.dir/src.cxx.o -MF CMakeFiles/cmTC_e33f8.dir/src.cxx.o.d -o CMakeFiles/cmTC_e33f8.dir/src.cxx.o -c /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-nTW1Vd/src.cxx
error: unknown warning option '-Wlogical-op'; did you mean '-Wlong-long'? [-Werror,-Wunknown-warning-option]
em++: error: '/Users/p.thomas/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=34 -D_LIBCPP_ABI_VERSION=2 -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/Users/p.thomas/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -DCOMPILER_SUPPORT_Wlogicalop -O3 -std=c++17 -std=c++03 -pedantic -Wall -Wextra -Wundef -Wcast-align -Wchar-subscripts -Wnon-virtual-dtor -Wunused-local-typedefs -Wpointer-arith -Wwrite-strings -Wformat-security -Wshorten-64-to-32 -Werror -Wlogical-op -MD -MT CMakeFiles/cmTC_e33f8.dir/src.cxx.o -MF CMakeFiles/cmTC_e33f8.dir/src.cxx.o.d -c /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-nTW1Vd/src.cxx -o CMakeFiles/cmTC_e33f8.dir/src.cxx.o' failed (returned 1)
gmake[1]: *** [CMakeFiles/cmTC_e33f8.dir/build.make:79: CMakeFiles/cmTC_e33f8.dir/src.cxx.o] Error 1
gmake[1]: Leaving directory '/Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-nTW1Vd'
gmake: *** [Makefile:127: cmTC_e33f8/fast] Error 2

Source file was:
int main() { return 0; }

Performing C++ SOURCE FILE Test COMPILER_SUPPORT_wd981 failed with the following output:
Change Dir: /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-cmoAnQ

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_d3d45/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_d3d45.dir/build.make CMakeFiles/cmTC_d3d45.dir/build
gmake[1]: Entering directory '/Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-cmoAnQ'
Building CXX object CMakeFiles/cmTC_d3d45.dir/src.cxx.o
/Users/p.thomas/emsdk/upstream/emscripten/em++ -DCOMPILER_SUPPORT_wd981  -O3 -std=c++17 -std=c++03 -pedantic -Wall -Wextra -Wundef -Wcast-align -Wchar-subscripts -Wnon-virtual-dtor -Wunused-local-typedefs -Wpointer-arith -Wwrite-strings -Wformat-security -Wshorten-64-to-32 -Wenum-conversion -Wc++11-extensions -Wdouble-promotion -Wshadow -Wno-psabi -Wno-variadic-macros -Wno-long-long -fno-check-new -fno-common -fstrict-aliasing -Werror   -wd981 -MD -MT CMakeFiles/cmTC_d3d45.dir/src.cxx.o -MF CMakeFiles/cmTC_d3d45.dir/src.cxx.o.d -o CMakeFiles/cmTC_d3d45.dir/src.cxx.o -c /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-cmoAnQ/src.cxx
clang-14: error: unknown argument: '-wd981'
em++: error: '/Users/p.thomas/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=34 -D_LIBCPP_ABI_VERSION=2 -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/Users/p.thomas/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -DCOMPILER_SUPPORT_wd981 -O3 -std=c++17 -std=c++03 -pedantic -Wall -Wextra -Wundef -Wcast-align -Wchar-subscripts -Wnon-virtual-dtor -Wunused-local-typedefs -Wpointer-arith -Wwrite-strings -Wformat-security -Wshorten-64-to-32 -Wenum-conversion -Wc++11-extensions -Wdouble-promotion -Wshadow -Wno-psabi -Wno-variadic-macros -Wno-long-long -fno-check-new -fno-common -fstrict-aliasing -Werror -wd981 -MD -MT CMakeFiles/cmTC_d3d45.dir/src.cxx.o -MF CMakeFiles/cmTC_d3d45.dir/src.cxx.o.d -c /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-cmoAnQ/src.cxx -o CMakeFiles/cmTC_d3d45.dir/src.cxx.o' failed (returned 1)
gmake[1]: *** [CMakeFiles/cmTC_d3d45.dir/build.make:79: CMakeFiles/cmTC_d3d45.dir/src.cxx.o] Error 1
gmake[1]: Leaving directory '/Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-cmoAnQ'
gmake: *** [Makefile:127: cmTC_d3d45/fast] Error 2

Source file was:
int main() { return 0; }

Performing C++ SOURCE FILE Test COMPILER_SUPPORT_wd2304 failed with the following output:
Change Dir: /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-jnJ2tR

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_39dc3/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_39dc3.dir/build.make CMakeFiles/cmTC_39dc3.dir/build
gmake[1]: Entering directory '/Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-jnJ2tR'
Building CXX object CMakeFiles/cmTC_39dc3.dir/src.cxx.o
/Users/p.thomas/emsdk/upstream/emscripten/em++ -DCOMPILER_SUPPORT_wd2304  -O3 -std=c++17 -std=c++03 -pedantic -Wall -Wextra -Wundef -Wcast-align -Wchar-subscripts -Wnon-virtual-dtor -Wunused-local-typedefs -Wpointer-arith -Wwrite-strings -Wformat-security -Wshorten-64-to-32 -Wenum-conversion -Wc++11-extensions -Wdouble-promotion -Wshadow -Wno-psabi -Wno-variadic-macros -Wno-long-long -fno-check-new -fno-common -fstrict-aliasing -Werror   -wd2304 -MD -MT CMakeFiles/cmTC_39dc3.dir/src.cxx.o -MF CMakeFiles/cmTC_39dc3.dir/src.cxx.o.d -o CMakeFiles/cmTC_39dc3.dir/src.cxx.o -c /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-jnJ2tR/src.cxx
clang-14: error: unknown argument: '-wd2304'
em++: error: '/Users/p.thomas/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=34 -D_LIBCPP_ABI_VERSION=2 -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/Users/p.thomas/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -DCOMPILER_SUPPORT_wd2304 -O3 -std=c++17 -std=c++03 -pedantic -Wall -Wextra -Wundef -Wcast-align -Wchar-subscripts -Wnon-virtual-dtor -Wunused-local-typedefs -Wpointer-arith -Wwrite-strings -Wformat-security -Wshorten-64-to-32 -Wenum-conversion -Wc++11-extensions -Wdouble-promotion -Wshadow -Wno-psabi -Wno-variadic-macros -Wno-long-long -fno-check-new -fno-common -fstrict-aliasing -Werror -wd2304 -MD -MT CMakeFiles/cmTC_39dc3.dir/src.cxx.o -MF CMakeFiles/cmTC_39dc3.dir/src.cxx.o.d -c /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-jnJ2tR/src.cxx -o CMakeFiles/cmTC_39dc3.dir/src.cxx.o' failed (returned 1)
gmake[1]: *** [CMakeFiles/cmTC_39dc3.dir/build.make:79: CMakeFiles/cmTC_39dc3.dir/src.cxx.o] Error 1
gmake[1]: Leaving directory '/Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-jnJ2tR'
gmake: *** [Makefile:127: cmTC_39dc3/fast] Error 2

Source file was:
int main() { return 0; }

Performing C++ SOURCE FILE Test COMPILER_SUPPORT_STRICTANSI failed with the following output:
Change Dir: /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-cPX9uC

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_d6319/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_d6319.dir/build.make CMakeFiles/cmTC_d6319.dir/build
gmake[1]: Entering directory '/Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-cPX9uC'
Building CXX object CMakeFiles/cmTC_d6319.dir/src.cxx.o
/Users/p.thomas/emsdk/upstream/emscripten/em++ -DCOMPILER_SUPPORT_STRICTANSI  -O3 -std=c++17 -std=c++03 -pedantic -Wall -Wextra -Wundef -Wcast-align -Wchar-subscripts -Wnon-virtual-dtor -Wunused-local-typedefs -Wpointer-arith -Wwrite-strings -Wformat-security -Wshorten-64-to-32 -Wenum-conversion -Wc++11-extensions -Wdouble-promotion -Wshadow -Wno-psabi -Wno-variadic-macros -Wno-long-long -fno-check-new -fno-common -fstrict-aliasing -Werror   -strict-ansi -MD -MT CMakeFiles/cmTC_d6319.dir/src.cxx.o -MF CMakeFiles/cmTC_d6319.dir/src.cxx.o.d -o CMakeFiles/cmTC_d6319.dir/src.cxx.o -c /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-cPX9uC/src.cxx
clang-14: error: unknown argument: '-strict-ansi'
em++: error: '/Users/p.thomas/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=34 -D_LIBCPP_ABI_VERSION=2 -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/Users/p.thomas/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -DCOMPILER_SUPPORT_STRICTANSI -O3 -std=c++17 -std=c++03 -pedantic -Wall -Wextra -Wundef -Wcast-align -Wchar-subscripts -Wnon-virtual-dtor -Wunused-local-typedefs -Wpointer-arith -Wwrite-strings -Wformat-security -Wshorten-64-to-32 -Wenum-conversion -Wc++11-extensions -Wdouble-promotion -Wshadow -Wno-psabi -Wno-variadic-macros -Wno-long-long -fno-check-new -fno-common -fstrict-aliasing -Werror -strict-ansi -MD -MT CMakeFiles/cmTC_d6319.dir/src.cxx.o -MF CMakeFiles/cmTC_d6319.dir/src.cxx.o.d -c /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-cPX9uC/src.cxx -o CMakeFiles/cmTC_d6319.dir/src.cxx.o' failed (returned 1)
gmake[1]: *** [CMakeFiles/cmTC_d6319.dir/build.make:79: CMakeFiles/cmTC_d6319.dir/src.cxx.o] Error 1
gmake[1]: Leaving directory '/Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-cPX9uC'
gmake: *** [Makefile:127: cmTC_d6319/fast] Error 2

Source file was:
int main() { return 0; }

Looking for a Fortran compiler failed with the following output:
-- The Fortran compiler identification is unknown
CMake Error at CMakeLists.txt:2 (project):
  No CMAKE_Fortran_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "FC" or the CMake cache entry CMAKE_Fortran_COMPILER to the full
  path to the compiler, or to the compiler name if it is in the PATH.

-- Configuring incomplete, errors occurred!
See also "/Users/p.thomas/AlvaAR/src/libs/eigen/build/test/CMakeFiles/CheckFortran/CMakeFiles/CMakeOutput.log".
See also "/Users/p.thomas/AlvaAR/src/libs/eigen/build/test/CMakeFiles/CheckFortran/CMakeFiles/CMakeError.log".

Performing C SOURCE FILE Test CMAKE_HAVE_LIBC_PTHREAD failed with the following output:
Change Dir: /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-pLP15s

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_c9701/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_c9701.dir/build.make CMakeFiles/cmTC_c9701.dir/build
gmake[1]: Entering directory '/Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-pLP15s'
Building C object CMakeFiles/cmTC_c9701.dir/src.c.o
/Users/p.thomas/emsdk/upstream/emscripten/emcc -DCMAKE_HAVE_LIBC_PTHREAD  -O3 -std=c++17  -MD -MT CMakeFiles/cmTC_c9701.dir/src.c.o -MF CMakeFiles/cmTC_c9701.dir/src.c.o.d -o CMakeFiles/cmTC_c9701.dir/src.c.o -c /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-pLP15s/src.c
error: invalid argument '-std=c++17' not allowed with 'C'
emcc: error: '/Users/p.thomas/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=34 -D_LIBCPP_ABI_VERSION=2 -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/Users/p.thomas/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -DCMAKE_HAVE_LIBC_PTHREAD -O3 -std=c++17 -MD -MT CMakeFiles/cmTC_c9701.dir/src.c.o -MF CMakeFiles/cmTC_c9701.dir/src.c.o.d -c /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-pLP15s/src.c -o CMakeFiles/cmTC_c9701.dir/src.c.o' failed (returned 1)
gmake[1]: *** [CMakeFiles/cmTC_c9701.dir/build.make:79: CMakeFiles/cmTC_c9701.dir/src.c.o] Error 1
gmake[1]: Leaving directory '/Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-pLP15s'
gmake: *** [Makefile:127: cmTC_c9701/fast] Error 2

Source file was:
#include <pthread.h>

static void* test_func(void* data)
{
  return data;
}

int main(void)
{
  pthread_t thread;
  pthread_create(&thread, NULL, test_func, NULL);
  pthread_detach(thread);
  pthread_cancel(thread);
  pthread_join(thread, NULL);
  pthread_atfork(NULL, NULL, NULL);
  pthread_exit(NULL);

  return 0;
}

Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-PHJSeG

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_40257/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_40257.dir/build.make CMakeFiles/cmTC_40257.dir/build
gmake[1]: Entering directory '/Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-PHJSeG'
Building C object CMakeFiles/cmTC_40257.dir/CheckFunctionExists.c.o
/Users/p.thomas/emsdk/upstream/emscripten/emcc   -O3 -std=c++17 -DCHECK_FUNCTION_EXISTS=pthread_create -MD -MT CMakeFiles/cmTC_40257.dir/CheckFunctionExists.c.o -MF CMakeFiles/cmTC_40257.dir/CheckFunctionExists.c.o.d -o CMakeFiles/cmTC_40257.dir/CheckFunctionExists.c.o -c /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-PHJSeG/CheckFunctionExists.c
error: invalid argument '-std=c++17' not allowed with 'C'
emcc: error: '/Users/p.thomas/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=34 -D_LIBCPP_ABI_VERSION=2 -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/Users/p.thomas/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -O3 -std=c++17 -DCHECK_FUNCTION_EXISTS=pthread_create -MD -MT CMakeFiles/cmTC_40257.dir/CheckFunctionExists.c.o -MF CMakeFiles/cmTC_40257.dir/CheckFunctionExists.c.o.d -c /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-PHJSeG/CheckFunctionExists.c -o CMakeFiles/cmTC_40257.dir/CheckFunctionExists.c.o' failed (returned 1)
gmake[1]: *** [CMakeFiles/cmTC_40257.dir/build.make:79: CMakeFiles/cmTC_40257.dir/CheckFunctionExists.c.o] Error 1
gmake[1]: Leaving directory '/Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-PHJSeG'
gmake: *** [Makefile:127: cmTC_40257/fast] Error 2

Determining if the function pthread_create exists in the pthread failed with the following output:
Change Dir: /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-w2w9lS

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_157d2/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_157d2.dir/build.make CMakeFiles/cmTC_157d2.dir/build
gmake[1]: Entering directory '/Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-w2w9lS'
Building C object CMakeFiles/cmTC_157d2.dir/CheckFunctionExists.c.o
/Users/p.thomas/emsdk/upstream/emscripten/emcc   -O3 -std=c++17 -DCHECK_FUNCTION_EXISTS=pthread_create -MD -MT CMakeFiles/cmTC_157d2.dir/CheckFunctionExists.c.o -MF CMakeFiles/cmTC_157d2.dir/CheckFunctionExists.c.o.d -o CMakeFiles/cmTC_157d2.dir/CheckFunctionExists.c.o -c /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-w2w9lS/CheckFunctionExists.c
error: invalid argument '-std=c++17' not allowed with 'C'
emcc: error: '/Users/p.thomas/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=34 -D_LIBCPP_ABI_VERSION=2 -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/Users/p.thomas/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -O3 -std=c++17 -DCHECK_FUNCTION_EXISTS=pthread_create -MD -MT CMakeFiles/cmTC_157d2.dir/CheckFunctionExists.c.o -MF CMakeFiles/cmTC_157d2.dir/CheckFunctionExists.c.o.d -c /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-w2w9lS/CheckFunctionExists.c -o CMakeFiles/cmTC_157d2.dir/CheckFunctionExists.c.o' failed (returned 1)
gmake[1]: *** [CMakeFiles/cmTC_157d2.dir/build.make:79: CMakeFiles/cmTC_157d2.dir/CheckFunctionExists.c.o] Error 1
gmake[1]: Leaving directory '/Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-w2w9lS'
gmake: *** [Makefile:127: cmTC_157d2/fast] Error 2

Determining if compiler accepts -pthread failed with the following output:
Change Dir: /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-xaMLi1

Run Build Command(s):/usr/local/bin/gmake -f Makefile cmTC_ea3f3/fast && /usr/local/bin/gmake  -f CMakeFiles/cmTC_ea3f3.dir/build.make CMakeFiles/cmTC_ea3f3.dir/build
gmake[1]: Entering directory '/Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-xaMLi1'
Building C object CMakeFiles/cmTC_ea3f3.dir/CheckForPthreads.c.o
/Users/p.thomas/emsdk/upstream/emscripten/emcc   -O3 -std=c++17  -MD -MT CMakeFiles/cmTC_ea3f3.dir/CheckForPthreads.c.o -MF CMakeFiles/cmTC_ea3f3.dir/CheckForPthreads.c.o.d -o CMakeFiles/cmTC_ea3f3.dir/CheckForPthreads.c.o -c /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-xaMLi1/CheckForPthreads.c
error: invalid argument '-std=c++17' not allowed with 'C'
emcc: error: '/Users/p.thomas/emsdk/upstream/bin/clang -target wasm32-unknown-emscripten -DEMSCRIPTEN -fignore-exceptions -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr -D__EMSCRIPTEN_major__=2 -D__EMSCRIPTEN_minor__=0 -D__EMSCRIPTEN_tiny__=34 -D_LIBCPP_ABI_VERSION=2 -Werror=implicit-function-declaration -Xclang -iwithsysroot/include/SDL --sysroot=/Users/p.thomas/emsdk/upstream/emscripten/cache/sysroot -Xclang -iwithsysroot/include/compat -O3 -std=c++17 -MD -MT CMakeFiles/cmTC_ea3f3.dir/CheckForPthreads.c.o -MF CMakeFiles/cmTC_ea3f3.dir/CheckForPthreads.c.o.d -c /Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-xaMLi1/CheckForPthreads.c -o CMakeFiles/cmTC_ea3f3.dir/CheckForPthreads.c.o' failed (returned 1)
gmake[1]: *** [CMakeFiles/cmTC_ea3f3.dir/build.make:79: CMakeFiles/cmTC_ea3f3.dir/CheckForPthreads.c.o] Error 1
gmake[1]: Leaving directory '/Users/p.thomas/AlvaAR/src/libs/eigen/build/CMakeFiles/CMakeScratch/TryCompile-xaMLi1'
gmake: *** [Makefile:127: cmTC_ea3f3/fast] Error 2

`

LiangXin1001 commented 4 months ago

I also encountered this problem. May I ask how it was eventually resolved?