当前位置:网站首页>Error reported when compiling basalt
Error reported when compiling basalt
2022-06-23 01:25:00 【Blue area soldier】
Write the summary at the front
- Please use GCC9 Or above basalt
- If apt Installed fmt Outdated Version , Please compile and install a higher version of fmt
- Use CLion When compiling, please configure the runtime LD_LIBRARY_PATH
Report a mistake :
github/basalt/thirdparty/Pangolin/src/image/image_io_lz4.cpp:42:12: error: ‘char* strncpy(char*, const char*, size_t)’ output truncated before terminating nul copying 3 bytes from a string of the same length [-Werror=stringop-truncation]
strncpy(header.magic,"LZ4",3);
~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
This error is due to CMake Of C++ Added... To the compilation options -Werror, Treat all warnings as errors , This strncpy function , Because it is C Function of style , Copy string is not followed by ’\0’ This terminator , But there is no need to add a terminator here , So full text search in the project -Werror The location of , Then add a blank space to the back -Wno-error=stringop-truncation Just go .
Error reporting II :
In file included
from XXX/github/basalt/thirdparty/basalt-headers/thirdparty/eigen/Eigen/src/Geometry/AlignedBox.h:49,
from XXX/github/basalt/thirdparty/Pangolin/include/pangolin/plot/range.h:43,
from XXX/github/basalt/thirdparty/Pangolin/include/pangolin/image/image_utils.h:34,
from XXX/github/basalt/thirdparty/Pangolin/include/pangolin/handler/handler_image.h:30,
from /home/vipl/VIPL2021-CJ/github/basalt/thirdparty/Pangolin/src/handler/handler_image.cpp:1:
/home/vipl/VIPL2021-CJ/github/basalt/thirdparty/basalt-headers/thirdparty/eigen/Eigen/src/Geometry/InternalHeaderCheck.h:2:2: error: #error "Please include Eigen/Geometry instead of including headers inside the src directory directly."
#error "Please include Eigen/Geometry instead of including headers inside the src directory directly."
This error is reported because the code checks whether it directly contains AlignedBox.h, That is to say range.h Used directly in
#include <Eigen/src/Geometry/AlignedBox.h>
And then in AlignedBox.h in , There is one #include "./InternalHeaderCheck.h" Directly checked out .
So the report is wrong , Need to put range.h Medium
#include <Eigen/src/Geometry/AlignedBox.h>
It is amended as follows
#include <Eigen/Geometry>
Error reporting 3 :
[ 87%] Building CXX object CMakeFiles/basalt.dir/src/utils/time_utils.cpp.o
In file included from /home/vipl/VIPL2021-CJ/github/basalt/src/utils/time_utils.cpp:2:
/home/vipl/VIPL2021-CJ/github/basalt/include/basalt/utils/format.hpp: In instantiation of ‘basalt::literals::operator""_format(const char*, size_t)::<lambda(auto:1&& …)> [with auto:1 = {const std::__cxx11::basic_string<char, std::char_traits, std::allocator >&, int&, double&, double&, double&, double&}]’:
/home/vipl/VIPL2021-CJ/github/basalt/src/utils/time_utils.cpp:134:56: required from here
/home/vipl/VIPL2021-CJ/github/basalt/include/basalt/utils/format.hpp:53:23: error: no matching function for call to ‘format(std::string_view, const std::__cxx11::basic_string&, int&, double&, double&, double&, double&)’
return fmt::format(std::string_view(s, n), args...);
~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This report is wrong GCC The reason for the version , I'm using GCC8.3.0, Although it has been fully supported C++17 了 , But I don't know why it can't be opened C++17 Characteristics of , I don't want to study this problem too deeply , Direct download GCC9 Or above , Then compile and install , Use update-alternative Version management , It is important to note that LD_LIBRARY_PATH Add inside GCC New version Library Directory ,fmt Also use new GCC Compile and install , And don't use apt Way to install fmt, I'm using deepin,apt From the source libfmt Kuo is 5.2.1 As if , Too old , Direct download 8.1.1 Version of , Use the new GCC Install after compilation , Then compile
Error reporting 4 :
Click on debug When debugging , The executable shows a link to /lib/x86_64-linux-gnu/libstdc++.so… This library , This library does not support new GLIBCXX.3.29 wait 
This is because CLion Environment variables are not set in the runtime configuration LD_LIBRARY_PATH, The system library directory used directly , Good configuration LD_LIBRARY_PATH Then you can run
stay CLION Operation of -> Edit the configuration -> Select the one you want on the left debug The program , Then set the environment variable .
边栏推荐
- a++,++a,!,~
- Dual cross domain: access allow origin header contains multiple values "*, *", but only one is allowed
- What financial product does the new bond belong to?
- Hierarchy selector
- Learn the specific technical learning experience of designing reusable software from the three levels of class, API and framework
- 62. different paths
- 层次选择器
- SYSTEMd summary
- JS image resolution compression
- Is it safe to open a new bond? How
猜你喜欢

cadence SPB17.4 - allegro - 优化指定单条电气线折线连接角度 - 折线转圆弧

SQL programming task04 job - set operation

B tree and b+ tree

Psychological analysis of the safest spot Silver
![[hdu] P6964 I love counting](/img/ff/f8e79d28758c9bd3019816c8f46723.png)
[hdu] P6964 I love counting
Yyds dry goods counting tail recursion is better than recursion

SAP mm transaction code vl04 create outbound delivery for sto

Autumn move script a

cadence SPB17.4 - 中文UI设置

cadence SPB17.4 - allegro - 優化指定單條電氣線折線連接角度 - 折線轉圓弧
随机推荐
Extend your kubernetes API using the aggregation API
E-R diagram
leetcode 91. Decode ways (medium)
[UVM] don't say that your VIP can't use ral model
Software construction course ADT and OOP understanding
Extend your kubernetes API using the aggregation API
It's still like this
Quelle est la structure et la façon dont les données sont stockées dans la base de données?
Webdriver and selenium Usage Summary
C language student achievement ranking system
[hdu] P7079 Pty loves lines
崔鹏团队:万字长文梳理「稳定学习」全景图
Voice network multiplayer video recording and synthesis support offline re recording | Nuggets technology solicitation
3DMAX modeling notes (I): introducing 3DMAX and creating the first model Hello World
Local deployment and problem solving of IIS in ArcGIS JS 4.23
SQL programming task06 assignment - Autumn recruit secret script ABC
How to refine permissions to buttons?
Shell 日志与打印输出
OSPF comprehensive experiment
[ZOJ] P3228 Searching the String