klogg
klogg copied to clipboard
[Build error] When I build this project on Ubuntu18.04LTS, it will fail
Thanks for your great software. I encounter some issues when I build this project on Ubuntu18.04 LTS.
-
Firstly, I use "cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo .." to get required cmake dependencies, and then use "cmake --build ." to build this project, but so many errors occur just like:
-
Secondly, I clean the build directory, and use "cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DKLOGG_USE_HYPERSCAN=OFF ..", and I can build it successfully, but when I open a log file, it will crash and output segmentation fault.
And I confirmed that my AMD CPU does support ssse3.
Could you provide the output of lscpu
?
It does look like some cpu instruction is enabled in build but missing from physical cpu, could be popcnt
Thanks for your comment, I used lscpu
, and the result is:
Is there any way to solve this build issue?
Thanks for lscpu
. That cpu has all required instructions. What compiler are you using? Could you attach the output of clean cmake configuration step?
For the compilation environment, I list all the tools as:
-
gcc / g++: 7.5.0
-
cmake: 3.20
-
libboost: 1.65
-
Ragel: 6.10
And I rebuild the project, it seems that these errors occur when the build process reaches end point
And I tried to clean the output of cmake using cmake --build ./ --target clean
, no output info, and I checked that the /build_root/output dir is cleaned.
The build tools are the same as in ubuntu 18.04 docker container. Could you try passing -DKLOGG_USE_LTO=OFF
to cmake? That should disable link time optimizations, and that is used for klogg builds for ubuntu 18.04 in ci pipleline.
The build tools are the same as in ubuntu 18.04 docker container. Could you try passing
-DKLOGG_USE_LTO=OFF
to cmake? That should disable link time optimizations, and that is used for klogg builds for ubuntu 18.04 in ci pipleline.
Thanks for the info, but I tried it and not helpful. Finally I found that we must using -DKLOGG_GENERIC_CPU=ON
to the cmake, then it would be okay
One more question about Generic_CPU flag. What is the difference between ucm_add_flags(C CXX "-march=x86-64 -mtune=generic")
and ucm_add_flags(C CXX "-march=native -mtune=generic")
? Will it imapct the final performance of KLogg?