Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build error in arch linux #7

Open
ed29 opened this issue Jun 7, 2022 · 2 comments
Open

Build error in arch linux #7

ed29 opened this issue Jun 7, 2022 · 2 comments

Comments

@ed29
Copy link

ed29 commented Jun 7, 2022

OS:Arch linux

Build log:

[ed@desktopserver build]$ cmake ..
CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 2.8.12 will be removed from a future version of
CMake.

Update the VERSION argument value or use a ... suffix to tell
CMake that the project does not need compatibility with older versions.

-- 64 bits compiler detected
-- DATA_MODEL is not set. Use platform 64
-- DATA_MODEL = 64
-- PRODUCTION = OFF
-- BUILD_TESTS = ON
-- BUILD_TOOLS = ON
-- BUILD_SHARED = OFF
-- DHT = enabled
-- DHT_VERBOSE = OFF
-- UPNP_VERBOSE = OFF
-- C++ compiler version: 2.1.0 [/usr/bin/c++]
-- Found Boost: /usr/lib64/cmake/Boost-1.78.0/BoostConfig.cmake (found suitable version "1.78.0", minimum required is "1.40") found components: system thread random date_time unit_test_framework unit_test_framework
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ed/libed2k/build
[ed@desktopserver build]$ sudo make
[ 1%] Building CXX object CMakeFiles/ed2k.dir/src/ConvertUTF.cpp.o
[ 2%] Building CXX object CMakeFiles/ed2k.dir/src/add_transfer_params.cpp.o
在從下述位置 include 的檔案: /home/ed/libed2k/include/libed2k/escape_string.hpp:41,
來自 /home/ed/libed2k/include/libed2k/peer_id.hpp:45,
來自 /home/ed/libed2k/include/libed2k/hasher.hpp:6,
來自 /home/ed/libed2k/include/libed2k/add_transfer_params.hpp:4,
來自 /home/ed/libed2k/src/add_transfer_params.cpp:1:
/home/ed/libed2k/include/libed2k/error_code.hpp: 在函式 「const boost::system::error_category& libed2k::get_system_category()」 中:
/home/ed/libed2k/include/libed2k/error_code.hpp:174:29: 錯誤:「get_system_category」 is not a member of 「boost::system」; did you mean 「system_category」?
174 | { return boost::system::get_system_category(); }
| ^~~~~~~~~~~~~~~~~~~
| system_category
/home/ed/libed2k/include/libed2k/error_code.hpp: 在函式 「const boost::system::error_category& libed2k::get_posix_category()」 中:
/home/ed/libed2k/include/libed2k/error_code.hpp:181:29: 錯誤:「get_generic_category」 is not a member of 「boost::system」; did you mean 「generic_category」?
181 | { return boost::system::get_generic_category(); }
| ^~~~~~~~~~~~~~~~~~~~
| generic_category
在從下述位置 include 的檔案: /home/ed/libed2k/include/boost/logging/detail/tss/tss_impl.hpp:54,
來自 /home/ed/libed2k/include/boost/logging/detail/tss/tss.hpp:30,
來自 /home/ed/libed2k/include/boost/logging/detail/ts/ts_resource.hpp:25,
來自 /home/ed/libed2k/include/boost/logging/detail/fwd.hpp:31,
來自 /home/ed/libed2k/include/boost/logging/logging.hpp:24,
來自 /home/ed/libed2k/include/boost/logging/detail/format_fwd_detail.hpp:24,
來自 /home/ed/libed2k/include/boost/logging/format_fwd.hpp:25,
來自 /home/ed/libed2k/include/libed2k/log.hpp:6,
來自 /home/ed/libed2k/src/add_transfer_params.cpp:2:
/home/ed/libed2k/include/boost/logging/detail/tss/tss_impl_pthread.hpp: 在函式 「boost::logging::detail::tss_libed2k_pods* boost::logging::detail::get_libed2k_pods()」 中:
/home/ed/libed2k/include/boost/logging/detail/tss/tss_impl_pthread.hpp:42:14: 警告:「template class std::auto_ptr」 is deprecated: use 'std::unique_ptr' instead [-Wdeprecated-declarations]
42 | std::auto_ptr<tss_libed2k_pods> temp( new_object_ensure_delete<tss_libed2k_pods>() );
| ^~~~~~~~
在從下述位置 include 的檔案: /usr/include/c++/12.1.0/memory:76,
來自 /usr/include/boost/smart_ptr/detail/sp_counted_impl.hpp:35,
來自 /usr/include/boost/smart_ptr/detail/shared_count.hpp:27,
來自 /usr/include/boost/smart_ptr/shared_ptr.hpp:17,
來自 /usr/include/boost/shared_ptr.hpp:17,
來自 /home/ed/libed2k/include/libed2k/error_code.hpp:6:
/usr/include/c++/12.1.0/bits/unique_ptr.h:64:28: 附註:在此声明
64 | template class auto_ptr;
| ^~~~~~~~
make[2]: *** [CMakeFiles/ed2k.dir/build.make:90:CMakeFiles/ed2k.dir/src/add_transfer_params.cpp.o] 錯誤 1
make[1]: *** [CMakeFiles/Makefile2:91:CMakeFiles/ed2k.dir/all] 錯誤 2
make: *** [Makefile:91:all] 錯誤 2

@a-pavlov
Copy link
Collaborator

a-pavlov commented Jun 9, 2022

Boost version 1.78 seems is not compatible with boost 1.40-1.50 we used to build the program. get_system_category() and get_generic_category() were deprecated. Please see for more details https://www.boost.org/doc/libs/1_52_0/libs/system/doc/reference.html.

@barracuda156
Copy link

@a-pavlov Any idea why it does not want to find Boost on MacOS?

--->  Configuring libed2k
Executing:  cd "/opt/local/var/macports/build/_opt_PPCRosettaPorts_net_libed2k/libed2k/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefiles" -DCMAKE_BUILD_TYPE=MacPorts -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DCMAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DBOOST_ROOT=/opt/local/libexec/boost/1.76 -DBOOSTROOT=/opt/local/libexec/boost/1.76 -DBOOST_INCLUDEDIR=/opt/local/libexec/boost/1.76/include -DBOOST_LIBRARYDIR=/opt/local/libexec/boost/1.76/lib -DBOOST_INCLUDE_DIR=/opt/local/libexec/boost/1.76/include -DBOOST_LIBRARY_DIR=/opt/local/libexec/boost/1.76/lib -DBOOST_LIB_DIR=/opt/local/libexec/boost/1.76/lib -DBoost_NO_SYSTEM_PATHS=ON -DBoost_INCLUDE_DIR=/opt/local/libexec/boost/1.76/include -DBoost_DIR=/opt/local/libexec/boost/1.76 -DCMAKE_OSX_ARCHITECTURES="ppc" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.6" -DCMAKE_OSX_SYSROOT="/" /opt/local/var/macports/build/_opt_PPCRosettaPorts_net_libed2k/libed2k/work/libed2k-5408c6503b8eb94d0f59f16a1f0c2a8a578f4bba 
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 4.2.1
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/gcc-4.2 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/g++-4.2 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- 32 bits compiler detected
-- DATA_MODEL is not set. Use platform 32
-- DATA_MODEL      = 32
-- PRODUCTION      = OFF
-- BUILD_TESTS     = ON
-- BUILD_TOOLS     = ON
-- BUILD_SHARED    = OFF
-- DHT	= enabled
-- DHT_VERBOSE	= OFF
-- UPNP_VERBOSE	= OFF
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
CMake Error at /opt/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: system thread random date_time
  unit_test_framework unit_test_framework) (found suitable version "1.76.0",
  minimum required is "1.40")
Call Stack (most recent call first):
  /opt/local/share/cmake-3.25/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
  /opt/local/share/cmake-3.25/Modules/FindBoost.cmake:2376 (find_package_handle_standard_args)
  cmake/Environment.cmake:23 (find_package)
  cmake/Targets.cmake:5 (find_host_package)
  CMakeLists.txt:22 (include)


-- Configuring incomplete, errors occurred!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants