Ubuntu12.0安装g++过程及其报错
https://blog.csdn.net/weixin_51286763/article/details/120703953
https://blog.csdn.net/dingd1234/article/details/124029945
2.报错二:
[41/80] Building CXX object absl/synchronization/CMakeFiles/graphcycles_internal.dir/internal/graphcycles.cc.o
FAILED: absl/synchronization/CMakeFiles/graphcycles_internal.dir/internal/graphcycles.cc.o
/usr/bin/c++ -D__CLANG_SUPPORT_DYN_ANNOTATION__ -I/home/eaibot/cartoros2_ws/abseil-cpp -O3 -DNDEBUG -fPIC -Wall -Wextra -Wcast-qual -Wconversion-null -Wmissing-declarations -Woverlength-strings -Wpointer-arith -Wunused-local-typedefs -Wunused-result -Wvarargs -Wvla -Wwrite-strings -Wno-missing-field-initializers -Wno-sign-compare -std=gnu++17 -MD -MT absl/synchronization/CMakeFiles/graphcycles_internal.dir/internal/graphcycles.cc.o -MF absl/synchronization/CMakeFiles/graphcycles_internal.dir/internal/graphcycles.cc.o.d -o absl/synchronization/CMakeFiles/graphcycles_internal.dir/internal/graphcycles.cc.o -c /home/eaibot/cartoros2_ws/abseil-cpp/absl/synchronization/internal/graphcycles.cc
/home/eaibot/cartoros2_ws/abseil-cpp/absl/synchronization/internal/graphcycles.cc: In member function ‘void absl::synchronization_internal::GraphCycles::RemoveNode(void*)’:
/home/eaibot/cartoros2_ws/abseil-cpp/absl/synchronization/internal/graphcycles.cc:450:26: error: ‘numeric_limits’ is not a member of ‘std’
450 | if (x->version == std::numeric_limits<uint32_t>::max()) {
| ^~~~~~~~~~~~~~
/home/eaibot/cartoros2_ws/abseil-cpp/absl/synchronization/internal/graphcycles.cc:450:49: error: expected primary-expression before ‘>’ token
450 | if (x->version == std::numeric_limits<uint32_t>::max()) {
| ^
/home/eaibot/cartoros2_ws/abseil-cpp/absl/synchronization/internal/graphcycles.cc:450:52: error: ‘::max’ has not been declared; did you mean ‘std::max’?
450 | if (x->version == std::numeric_limits<uint32_t>::max()) {
| ^~~
| std::max
In file included from /usr/include/c++/11/algorithm:62,
from /home/eaibot/cartoros2_ws/abseil-cpp/absl/synchronization/internal/graphcycles.cc:38:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: ‘std::max’ declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
解决办法:
修改abseil-cpp/absl/synchronization/internal/graphcycles.cc文件,
添加 #include
configure: error: in `/home/wangkun/Desktop/swig-4.0.0':
configure: error:
Cannot find pcre-config script from PCRE (Perl Compatible Regular Expressions)
library package. This dependency is needed for configure to complete,
Either:
- Install the PCRE developer package on your system (preferred approach).
- Download the PCRE source tarball, build and install on your system
as you would for any package built from source distribution.
- Use the Tools/pcre-build.sh script to build PCRE just for SWIG to statically
link against. Run 'Tools/pcre-build.sh --help' for instructions.
(quite easy and does not require privileges to install PCRE on your system)
- Use configure --without-pcre to disable regular expressions support in SWIG
(not recommended).
See `config.log' for more details
(venv) wangkun@wangkun-virtual-machine:~/Desktop/swig-4.0.0$ ./configure --without-pcre
Could NOT find PythonLibs (missingPYTHON_LIBRARIES PYTHON_INCLUDE_DIRS) (Required is at least 3.5)
我是在ubuntu16.04.6
直接在你的正在操作的页面输入
sudo apt-get install -y python-dev python3-dev