Closed indianscorpion closed 12 months ago
when doing cmake .. -DBUILD_NFIQ2_CLI=OFF It gave warning of the below: CMake Warning at cmake/compiler.cmake:43 (message): You are missing one or more static system libraries that will be linked by -static-libgcc -static-libstdc++ Call Stack (most recent call first): CMakeLists.txt:49 (include)
apt install libstdc++-9-dev
the system already had libstdc++ installed. strings /lib64/libstdc++.so.6 | grep LIBCXX GLIBCXX_3.4.19
Due to the flags the error message depicts, you need the static library, not the shared library. NFIQ 2 is linked entirely static.
do u mean it should be a .a file? and only dev install contains .a file?
I installed rpm -i devtoolset-9-runtime-9.0-3.el7.x86_64.rpm and rpm -i devtoolset-9-libstdc++-devel-9.3.1-2.2.el7.x86_64.rpm run cmake .. -DBUILD_NFIQ2_CLI=OFF, it complained the same. the static libraries were installed as:
/opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/libstdc++.a /opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/libstdc++_nonshared.a /opt/rh/devtoolset-9/root/usr/lib/gcc/x86_64-redhat-linux/9/libstdc++fs.a
[100%] Linking CXX static library libFRFXLL_static.a [100%] Built target FRFXLL_static but #make FRFXLL failed, looked like that it was not related to static library. [ 9%] Linking CXX shared library libFRFXLL.so /usr/bin/ld: cannot find -lstdc++ collect2: error: ld returned 1 exit status make[3]: [fingerjetfxose/FingerJetFXOSE/libFRFXLL/src/libFRFXLL.so] Error 1 make[2]: [fingerjetfxose/FingerJetFXOSE/libFRFXLL/src/CMakeFiles/FRFXLL.dir/all] Error 2 make[1]: [fingerjetfxose/FingerJetFXOSE/libFRFXLL/src/CMakeFiles/FRFXLL.dir/rule] Error 2 make: [FRFXLL] Error 2
it successfully built on GNU 11.4.0 at wsl latest ubuntu. It just failed on my old build machine with g++ (GCC) 4.8.5 20150623 (Red Hat 4.8.5-4)
When following the steps below: git clone --recursive https://github.com/usnistgov/NFIQ2.git cd NFIQ2 mkdir build cd build cmake .. -DBUILD_NFIQ2_CLI=OFF cmake --build .
It gave error of below: /usr/bin/ld: cannot find -lstdc++ collect2: error: ld returned 1 exit status gmake[2]: [fingerjetfxose/FingerJetFXOSE/libFRFXLL/src/libFRFXLL.so] Error 1 gmake[1]: [fingerjetfxose/FingerJetFXOSE/libFRFXLL/src/CMakeFiles/FRFXLL.dir/all] Error 2 gmake: *** [all] Error 2
The LINUX does have stdc++!