LidarView Superbuild build errors

I have been trying to build LidarView-Superbuild following this page.
https://gitlab.kitware.com/LidarView/lidarview-superbuild

I got errors below when I ran the command cmake --build . -j.
Any help really appreciated.

[172/193] Performing configure step for ‘eigen’
FAILED: superbuild/eigen/stamp/eigen-configure C:/build/superbuild/eigen/stamp/eigen-configure
C:\Windows\system32\cmd.exe /C “cd /D C:\build\superbuild\eigen\build && “C:\Program Files\CMake\bin\cmake.exe” -P C:/build/superbuild/sb-eigen-configure.cmake && “C:\Program Files\CMake\bin\cmake.exe” -E touch C:/build/superbuild/eigen/stamp/eigen-configure”
Not searching for unused variables given on the command line.
– The C compiler identification is MSVC 19.29.30154.0
– The CXX compiler identification is MSVC 19.29.30154.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
– Detecting C compile features
– Detecting C compile features - done
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx64/x64/cl.exe - skipped
– Detecting CXX compile features
– Detecting CXX compile features - done
– Performing Test EIGEN_COMPILER_SUPPORT_CPP11
– Performing Test EIGEN_COMPILER_SUPPORT_CPP11 - Failed
– Performing Test COMPILER_SUPPORT_std=cpp03
– Performing Test COMPILER_SUPPORT_std=cpp03 - Failed
– 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_OPENMP
– Performing Test COMPILER_SUPPORT_OPENMP - Success
– Found unsuitable Qt version “5.15.2” from C:/Qt/Qt5.15.2/5.15.2/msvc2019_64/bin/qmake.exe
skip snippet C:/build/superbuild/eigen/src/doc/snippets/Array_initializer_list_23_cxx11.cpp because compiler does not support C++11
skip snippet C:/build/superbuild/eigen/src/doc/snippets/Array_initializer_list_vector_cxx11.cpp because compiler does not support C++11
skip snippet C:/build/superbuild/eigen/src/doc/snippets/Array_variadic_ctor_cxx11.cpp because compiler does not support C++11
skip snippet C:/build/superbuild/eigen/src/doc/snippets/MatrixBase_colwise_iterator_cxx11.cpp because compiler does not support C++11
skip snippet C:/build/superbuild/eigen/src/doc/snippets/Matrix_initializer_list_23_cxx11.cpp because compiler does not support C++11
skip snippet C:/build/superbuild/eigen/src/doc/snippets/Matrix_initializer_list_vector_cxx11.cpp because compiler does not support C++11
skip snippet C:/build/superbuild/eigen/src/doc/snippets/Matrix_variadic_ctor_cxx11.cpp because compiler does not support C++11
skip snippet C:/build/superbuild/eigen/src/doc/snippets/Slicing_custom_padding_cxx11.cpp because compiler does not support C++11
skip snippet C:/build/superbuild/eigen/src/doc/snippets/Slicing_rawarray_cxx11.cpp because compiler does not support C++11
skip snippet C:/build/superbuild/eigen/src/doc/snippets/Slicing_stdvector_cxx11.cpp because compiler does not support C++11
skip snippet C:/build/superbuild/eigen/src/doc/snippets/Tutorial_range_for_loop_1d_cxx11.cpp because compiler does not support C++11
skip snippet C:/build/superbuild/eigen/src/doc/snippets/Tutorial_range_for_loop_2d_cxx11.cpp because compiler does not support C++11
skip snippet C:/build/superbuild/eigen/src/doc/snippets/Tutorial_std_sort_rows_cxx11.cpp because compiler does not support C++11
– Looking for a Fortran compiler
– Looking for a Fortran compiler - C:/gcc/mingw64/bin/gfortran.exe
– The Fortran compiler identification is GNU 13.2.0
– Detecting Fortran compiler ABI info
– Detecting Fortran compiler ABI info - failed
– Check for working Fortran compiler: C:/gcc/mingw64/bin/gfortran.exe
– Check for working Fortran compiler: C:/gcc/mingw64/bin/gfortran.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.29/Modules/CMakeTestFortranCompiler.cmake:59 (message):
The Fortran compiler

"C:/gcc/mingw64/bin/gfortran.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: 'C:/build/superbuild/eigen/build/CMakeFiles/CMakeScratch/TryCompile-3vss7d'

Run Build Command(s): C:/Windows/ninja.exe -v cmTC_0d280
[1/4] C:\Windows\system32\cmd.exe /C "C:\gcc\mingw64\bin\gfortran.exe -cpp    -E C:/build/superbuild/eigen/build/CMakeFiles/CMakeScratch/TryCompile-3vss7d/testFortranCompiler.f -o CMakeFiles/cmTC_0d280.dir/testFortranCompiler.f-pp.f && "C:\Program Files\CMake\bin\cmake.exe" -E cmake_ninja_depends --tdi=CMakeFiles\cmTC_0d280.dir\FortranDependInfo.json --lang=Fortran --src=CMakeFiles/cmTC_0d280.dir/testFortranCompiler.f-pp.f --out=CMakeFiles/cmTC_0d280.dir/testFortranCompiler.f-pp.f --dep=CMakeFiles\cmTC_0d280.dir\testFortranCompiler.f-pp.f.d --obj=CMakeFiles\cmTC_0d280.dir\testFortranCompiler.f.obj --ddi=CMakeFiles\cmTC_0d280.dir\testFortranCompiler.f.obj.ddi --src-orig=C:/build/superbuild/eigen/build/CMakeFiles/CMakeScratch/TryCompile-3vss7d/testFortranCompiler.f"
[2/4] "C:\Program Files\CMake\bin\cmake.exe" -E cmake_ninja_dyndep --tdi=CMakeFiles\cmTC_0d280.dir\FortranDependInfo.json --lang=Fortran --dd=CMakeFiles/cmTC_0d280.dir/Fortran.dd @CMakeFiles/cmTC_0d280.dir/Fortran.dd.rsp
[3/4] C:\gcc\mingw64\bin\gfortran.exe -IC:\build\superbuild\eigen\build\CMakeFiles\CMakeScratch\TryCompile-3vss7d -fpreprocessed -c CMakeFiles/cmTC_0d280.dir/testFortranCompiler.f-pp.f -o CMakeFiles/cmTC_0d280.dir/testFortranCompiler.f.obj
[4/4] C:\Windows\system32\cmd.exe /C "cd . && C:\gcc\mingw64\bin\gfortran.exe  /machine:x64 CMakeFiles/cmTC_0d280.dir/testFortranCompiler.f.obj -o cmTC_0d280.exe -Wl,--out-implib,libcmTC_0d280.dll.a -Wl,--major-image-version,0,--minor-image-version,0   && cd ."
FAILED: cmTC_0d280.exe
C:\Windows\system32\cmd.exe /C "cd . && C:\gcc\mingw64\bin\gfortran.exe  /machine:x64 CMakeFiles/cmTC_0d280.dir/testFortranCompiler.f.obj -o cmTC_0d280.exe -Wl,--out-implib,libcmTC_0d280.dll.a -Wl,--major-image-version,0,--minor-image-version,0   && cd ."
C:/gcc/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/13.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: cannot find /machine:x64: No such file or directory
collect2.exe: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
blas/CMakeLists.txt:7 (enable_language)

– Configuring incomplete, errors occurred!
CMake Error at C:/build/superbuild/sb-eigen-configure.cmake:47 (message):
Failed with exit code 1

[173/193] Performing install step for ‘numpy’
Processing c:\build\superbuild\numpy\src
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status ‘done’
Building wheels for collected packages: numpy
Building wheel for numpy (pyproject.toml): started
Building wheel for numpy (pyproject.toml): still running…
Building wheel for numpy (pyproject.toml): still running…
Building wheel for numpy (pyproject.toml): finished with status ‘done’
Created wheel for numpy: filename=numpy-1.25.2-cp310-cp310-win_amd64.whl size=6225023 sha256=9a3240862d938de2c9b7025eda31284e6ad41d2600e2bd5d60092c497ccb91ec
Stored in directory: C:\Users\chima\AppData\Local\Temp\pip-ephem-wheel-cache-31tb02b4\wheels\13\d2\f2\51cada5f45e2502ed4b04b5d9cfcb9fd8914523f39317e82cd
Successfully built numpy
Installing collected packages: numpy
Successfully installed numpy-1.25.2
[174/193] Performing download step (git clone) for ‘lidarview’
Cloning into ‘src’…
Your branch is up to date with ‘origin/master’.
Already on ‘master’
Submodule ‘LVCore’ (https://gitlab.kitware.com/LidarView/lidarview-core.git) registered for path ‘LVCore’
Submodule ‘Plugins/HesaiPlugin’ (https://gitlab.kitware.com/LidarView/HesaiPlugin.git) registered for path ‘Plugins/HesaiPlugin’
Submodule ‘Plugins/LivoxPlugin’ (https://gitlab.kitware.com/LidarView/livoxplugin.git) registered for path ‘Plugins/LivoxPlugin’
Submodule ‘Plugins/VelodynePlugin’ (https://gitlab.kitware.com/LidarView/velodyneplugin.git) registered for path ‘Plugins/VelodynePlugin’
Cloning into ‘C:/build/superbuild/lidarview/src/LVCore’…
Cloning into ‘C:/build/superbuild/lidarview/src/Plugins/HesaiPlugin’…
Cloning into ‘C:/build/superbuild/lidarview/src/Plugins/LivoxPlugin’…
Cloning into ‘C:/build/superbuild/lidarview/src/Plugins/VelodynePlugin’…
Submodule path ‘LVCore’: checked out ‘37d6a89ec8eb82734026dca5ba532866c743ede7’
Submodule path ‘Plugins/HesaiPlugin’: checked out ‘d96c307e2923db7af22d2d7630018a33af3315a8’
Submodule path ‘Plugins/LivoxPlugin’: checked out ‘1e67cdab94e108658a271be85bb1975c91eed780’
Submodule path ‘Plugins/VelodynePlugin’: checked out ‘2884a11431c4c6384493d97f0bcafc741f874df2’
ninja: build stopped: subcommand failed.

I ran cmake ../lvsb -GNinja -DQt5_DIR="C:\Qt\Qt5.15.2\5.15.2\msvc2019_64\lib\cmake\Qt5" -DCMAKE_BUILD_TYPE=Release before the above command and the build files have been written to the build.

Windows 11 x64 Native Tools Command Prompt for VS2019

Thanks in advance!

@Timothee_Couble @Gatien_Ferret any inputs?

mingw is not supported afaik, use MSVC on Windows.

1 Like

Hi @chimanaco,

it seems you cmake configuration does not manage to find the C / CXX compiler.
You should be able to set it manually in cmake-gui ( which you can call with cmake-gui . from your build folder)

Or by adding the arguments to your configure command

 -DCMAKE_C_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x86/cl.exe" -DCMAKE_CXX_COMPILER="C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x86/cl.exe"

And if the issue is specific to eigen in your superbuild, you may do the same in the corresponding subfolder, e.g ./superbuild/eigen/build

I hope this helps.

1 Like

Thank you for your reply!
I tried the command below on x64 Native Tools Command Prompt for VS 2019 as Administrator.

cmake ../lvsb -GNinja -DQt5_DIR="C:\Qt\Qt5.15.2\5.15.2\msvc2019_64\lib\cmake\Qt5" -DCMAKE_C_COMPILER="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx86\x86\cl.exe" -DCMAKE_CXX_COMPILER="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx86\x86\cl.exe" -DCMAKE_BUILD_TYPE=Release

And I got the error below.

– The C compiler identification is MSVC 19.29.30154.0
– The CXX compiler identification is MSVC 19.29.30154.0
– Detecting C compiler ABI info
– Detecting C compiler ABI info - failed
– Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x86/cl.exe
– Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x86/cl.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.29/Modules/CMakeTestCCompiler.cmake:67 (message):
The C compiler

"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x86/cl.exe"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: 'C:/build/CMakeFiles/CMakeScratch/TryCompile-9yglza'

Run Build Command(s): C:/Windows/ninja.exe -v cmTC_27d43
[1/2] C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx86\x86\cl.exe  /nologo   /DWIN32 /D_WINDOWS  /Zi /Ob0 /Od /RTC1 -MDd /showIncludes /FoCMakeFiles\cmTC_27d43.dir\testCCompiler.c.obj /FdCMakeFiles\cmTC_27d43.dir\ /FS -c C:\build\CMakeFiles\CMakeScratch\TryCompile-9yglza\testCCompiler.c
[2/2] C:\Windows\system32\cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_27d43.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx86\x86\link.exe /nologo CMakeFiles\cmTC_27d43.dir\testCCompiler.c.obj  /out:cmTC_27d43.exe /implib:cmTC_27d43.lib /pdb:cmTC_27d43.pdb /version:0.0 /machine:X86  /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
FAILED: cmTC_27d43.exe
C:\Windows\system32\cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_exe --intdir=CMakeFiles\cmTC_27d43.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100226~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx86\x86\link.exe /nologo CMakeFiles\cmTC_27d43.dir\testCCompiler.c.obj  /out:cmTC_27d43.exe /implib:cmTC_27d43.lib /pdb:cmTC_27d43.pdb /version:0.0 /machine:X86  /debug /INCREMENTAL /subsystem:console  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib && cd ."
LINK Pass 1: command "C:\PROGRA~2\MICROS~2\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx86\x86\link.exe /nologo CMakeFiles\cmTC_27d43.dir\testCCompiler.c.obj /out:cmTC_27d43.exe /implib:cmTC_27d43.lib /pdb:cmTC_27d43.pdb /version:0.0 /machine:X86 /debug /INCREMENTAL /subsystem:console kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib /MANIFEST /MANIFESTFILE:CMakeFiles\cmTC_27d43.dir/intermediate.manifest CMakeFiles\cmTC_27d43.dir/manifest.res" failed (exit code 1120) with the following output:
testCCompiler.c.obj : error LNK2001: unresolved external symbol __RTC_InitBase
testCCompiler.c.obj : error LNK2001: unresolved external symbol __RTC_Shutdown
LINK : error LNK2001: unresolved external symbol _mainCRTStartup
C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\kernel32.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\user32.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\gdi32.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\winspool.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\shell32.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\ole32.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\oleaut32.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\uuid.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\comdlg32.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
C:\Program Files (x86)\Windows Kits\10\lib\10.0.22621.0\um\x64\advapi32.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\lib\x64\MSVCRTD.lib : warning LNK4272: library machine type 'x64' conflicts with target machine type 'x86'
cmTC_27d43.exe : fatal error LNK1120: 3 unresolved externals
ninja: build stopped: subcommand failed.

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:3 (project)

– Configuring incomplete, errors occurred!

It seems MSVC version doesn’t match…?

Indeed you seem to have a different version of the compiler.

You’ll need then to adjust the path to where your ‘cl.exe’ file is actually located on your system ( you’ll probably need to change the version number in the path to point to the correct location )

If you are using the VS x64 command prompt, there is no need to specify the compiler. Start with an empty build directory and let cmake find the compiler automatically. i.e. use this command instead:

cmake ../lvsb -GNinja -DQt5_DIR="C:\Qt\Qt5.15.2\5.15.2\msvc2019_64\lib\cmake\Qt5" -DCMAKE_BUILD_TYPE=Release

Thank you for your reply!
I have cl.exe in the path I added on my last post, but I don’t know how I can find MSVC 19.29.30154.0 though even though I want to match them.

– The C compiler identification is MSVC 19.29.30154.0
– The CXX compiler identification is MSVC 19.29.30154.0

Thank you for your reply!
When I ran the build command after the configure command you told, I got the error of my first post

Do you know how to fix this error…?

I believe that the first error was misinterpreted - you are using MSVC for compiling the C/C++ code in the superbuild, but Eigen wants to compile Fortran code, and it finds gfortran from mingw64, which can’t be used at the same time as MSVC. You should remove/uninstall gfortran, or make sure it is not available on your path, and try again. If Eigen is not able to compile without a fortran compiler, you will need to use the MSVC installer to add the MSVC fortran compiler.

1 Like

Thank you! I will try that.