drogonframework / drogon

Drogon: A C++14/17/20 based HTTP web application framework running on Linux/macOS/Unix/Windows
MIT License
11.62k stars 1.12k forks source link

Has anyone been able to successfully compile a project with GCC on MacOS(arm64)? #1288

Closed 1111mp closed 2 years ago

1111mp commented 2 years ago

like this

I also tried the version: GCC 12.1.0 aarch64-apple-darwin21, still error.

brew info gcc@12:

gcc@12: stable 12.1.0 (bottled)
GNU compiler collection
https://gcc.gnu.org/
/opt/homebrew/Cellar/gcc@12/12.1.0_1 (1,422 files, 261.6MB) *
  Poured from bottle on 2022-06-17 at 15:29:39
From: https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/gcc@12.rb
License: GPL-3.0-or-later with GCC-exception-3.1
==> Dependencies
Required: gmp ✔, isl ✔, libmpc ✔, mpfr ✔, zstd ✔
==> Analytics
install: 693 (30 days), 693 (90 days), 693 (365 days)
install-on-request: 690 (30 days), 690 (90 days), 690 (365 days)
build-error: 1 (30 days)

Log:

[main] Building folder: ForDrogon 
[proc] Executing command: /opt/homebrew/bin/aarch64-apple-darwin21-gcc-12 -v
[main] Configuring folder: ForDrogon 
[proc] Executing command: /opt/homebrew/bin/cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/opt/homebrew/bin/aarch64-apple-darwin21-gcc-12 -DCMAKE_CXX_COMPILER:FILEPATH=/opt/homebrew/bin/aarch64-apple-darwin21-g++-12 -S/Users/zhangyifan/Documents/projects/ForDrogon -B/Users/zhangyifan/Documents/projects/ForDrogon/build -G "Unix Makefiles"
[cmake] Not searching for unused variables given on the command line.
[cmake] -- The CXX compiler identification is GNU 12.1.0
[cmake] -- Checking whether CXX compiler has -isysroot
[cmake] -- Checking whether CXX compiler has -isysroot - yes
[cmake] -- Checking whether CXX compiler supports OSX deployment target flag
[cmake] -- Checking whether CXX compiler supports OSX deployment target flag - yes
[cmake] -- Detecting CXX compiler ABI info
[cmake] -- Detecting CXX compiler ABI info - done
[cmake] -- Check for working CXX compiler: /opt/homebrew/bin/aarch64-apple-darwin21-g++-12 - skipped
[cmake] -- Detecting CXX compile features
[cmake] -- Detecting CXX compile features - done
[cmake] -- Looking for C++ include any
[cmake] -- Looking for C++ include any - found
[cmake] -- Looking for C++ include string_view
[cmake] -- Looking for C++ include string_view - found
[cmake] -- Looking for C++ include coroutine
[cmake] -- Looking for C++ include coroutine - not found
[cmake] -- ################Add Module Thgirdparty################
[cmake] -- The C compiler identification is GNU 12.1.0
[cmake] -- Checking whether C compiler has -isysroot
[cmake] -- Checking whether C compiler has -isysroot - yes
[cmake] -- Checking whether C compiler supports OSX deployment target flag
[cmake] -- Checking whether C compiler supports OSX deployment target flag - yes
[cmake] -- Detecting C compiler ABI info
[cmake] -- Detecting C compiler ABI info - done
[cmake] -- Check for working C compiler: /opt/homebrew/bin/aarch64-apple-darwin21-gcc-12 - skipped
[cmake] -- Detecting C compile features
[cmake] -- Detecting C compile features - done
[cmake] -- compiler: GNU
[cmake] -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
[cmake] -- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
[cmake] -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
[cmake] -- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
[cmake] -- Performing Test COMPILER_HAS_DEPRECATED_ATTR
[cmake] -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
[cmake] -- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) 
[cmake] -- Could NOT find c-ares (missing: C-ARES_INCLUDE_DIRS C-ARES_LIBRARIES) 
[cmake] -- Looking for pthread.h
[cmake] -- Looking for pthread.h - found
[cmake] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD
[cmake] -- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
[cmake] -- Found Threads: TRUE  
[cmake] -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
[cmake] -- Looking for C++ include filesystem
[cmake] -- Looking for C++ include filesystem - found
[cmake] -- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED
[cmake] -- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED - Success
[cmake] -- Found std::filesystem
[cmake] -- use c++17
[cmake] -- Found Jsoncpp: /opt/homebrew/include  
[cmake] -- jsoncpp verson:1.9.5
[cmake] -- Found UUID: 
[cmake] -- Could NOT find BROTLI (missing: BROTLIDEC_LIBRARY BROTLIENC_LIBRARY BROTLICOMMON_LIBRARY BROTLI_INCLUDE_DIR) 
[cmake] -- Found PostgreSQL: /opt/homebrew/lib/libpq.dylib (found version "14.3")  
[cmake] -- pg inc: /opt/homebrew/include/opt/homebrew/include/postgresql/server
[cmake] -- Found pg: /opt/homebrew/lib/libpq.dylib  
[cmake] -- libpq inc path:/opt/homebrew/include/opt/homebrew/include/postgresql/server
[cmake] -- libpq lib:/opt/homebrew/lib/libpq.dylib
[cmake] -- The libpq supports batch mode
[cmake] -- MySQL Include dir: /opt/homebrew/include/mysql
[cmake] -- MySQL client libraries: /opt/homebrew/lib/libmysqlclient_r.dylib
[cmake] -- Ok! We find mariadb!
[cmake] -- Looking for mysql_optionsv in MySQL_lib
[cmake] -- Looking for mysql_optionsv in MySQL_lib - found
[cmake] -- Mariadb support mysql_optionsv
[cmake] -- Ok! We find sqlite3!
[cmake] -- Found Hiredis: /opt/homebrew/lib/libhiredis.dylib  
[cmake] -- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib/libz.tbd (found version "1.2.11") 
[cmake] -- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) 
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/cmake.csp
[cmake] -- view classname:cmake
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/config.csp
[cmake] -- view classname:config
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/demoMain.csp
[cmake] -- view classname:demoMain
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/filter_cc.csp
[cmake] -- view classname:filter_cc
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/filter_h.csp
[cmake] -- view classname:filter_h
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/gitignore.csp
[cmake] -- view classname:gitignore
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/model_cc.csp
[cmake] -- view classname:model_cc
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/model_h.csp
[cmake] -- view classname:model_h
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/model_json.csp
[cmake] -- view classname:model_json
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/plugin_cc.csp
[cmake] -- view classname:plugin_cc
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/plugin_h.csp
[cmake] -- view classname:plugin_h
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/restful_controller_base_cc.csp
[cmake] -- view classname:restful_controller_base_cc
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/restful_controller_base_h.csp
[cmake] -- view classname:restful_controller_base_h
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/restful_controller_cc.csp
[cmake] -- view classname:restful_controller_cc
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/restful_controller_custom_cc.csp
[cmake] -- view classname:restful_controller_custom_cc
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/restful_controller_custom_h.csp
[cmake] -- view classname:restful_controller_custom_h
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/restful_controller_h.csp
[cmake] -- view classname:restful_controller_h
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/test_cmake.csp
[cmake] -- view classname:test_cmake
[cmake] -- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/test_main.csp
[cmake] -- view classname:test_main
[cmake] -- bin:bin
[cmake] -- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
[cmake] CMake Warning (dev) at third_party/stduuid/CMakeLists.txt:11 (option):
[cmake]   Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
[cmake]   --help-policy CMP0077" for policy details.  Use the cmake_policy command to
[cmake]   set the policy and suppress this warning.
[cmake] 
[cmake]   For compatibility with older versions of CMake, option is clearing the
[cmake]   normal variable 'UUID_BUILD_TESTS'.
[cmake] This warning is for project developers.  Use -Wno-dev to suppress it.
[cmake] 
[cmake] CMake Warning (dev) at third_party/jwt-cpp/CMakeLists.txt:14 (option):
[cmake]   Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
[cmake]   --help-policy CMP0077" for policy details.  Use the cmake_policy command to
[cmake]   set the policy and suppress this warning.
[cmake] 
[cmake]   For compatibility with older versions of CMake, option is clearing the
[cmake]   normal variable 'JWT_BUILD_EXAMPLES'.
[cmake] This warning is for project developers.  Use -Wno-dev to suppress it.
[cmake] 
[cmake] -- Found OpenSSL: /opt/homebrew/opt/openssl@1.1/lib/libcrypto.dylib (found suitable version "1.1.1o", minimum required is "1.0.1")  
[cmake] -- Could NOT find jsoncons (missing: jsoncons_DIR)
[cmake] -- Could NOT find nlohmann_json (missing: nlohmann_json_DIR)
[cmake] -- use c++17
[cmake] -- Configuring done
[cmake] -- Generating done

Error:

[cmake] -- Build files have been written to: /Users/zhangyifan/Documents/projects/ForDrogon/build
[build] Starting build
[proc] Executing command: /opt/homebrew/bin/cmake --build /Users/zhangyifan/Documents/projects/ForDrogon/build --config Debug --target all -j 12 --
[build] [  1%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/utils/AsyncFileLogger.cc.o
[build] [  1%] Building CXX object third_party/jwt-cpp/example/CMakeFiles/rsa-verify.dir/rsa-verify.cpp.o
[build] [  1%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/utils/ConcurrentTaskQueue.cc.o
[build] [  1%] Building CXX object third_party/jwt-cpp/example/CMakeFiles/print-claims.dir/print-claims.cpp.o
[build] [  1%] Building CXX object third_party/jwt-cpp/example/CMakeFiles/private-claims.dir/private-claims.cpp.o
[build] [  2%] Building CXX object third_party/jwt-cpp/example/CMakeFiles/jwks-verify.dir/jwks-verify.cpp.o
[build] [  2%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/utils/Date.cc.o
[build] [  2%] Building CXX object third_party/CMakeFiles/bcrypt.dir/bcrypt/src/bcrypt.cc.o
[build] [  3%] Building CXX object third_party/jwt-cpp/example/CMakeFiles/es256k.dir/es256k.cpp.o
[build] [  4%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c.o
[build] [  4%] Building CXX object third_party/jwt-cpp/example/CMakeFiles/rsa-create.dir/rsa-create.cpp.o
[build] [  4%] Building CXX object third_party/jwt-cpp/example/CMakeFiles/partial-claim-verifier.dir/partial-claim-verifier.cpp.o
[build] [  4%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c.o
[build] [  5%] Building CXX object third_party/CMakeFiles/bcrypt.dir/bcrypt/src/blowfish.cc.o
[build] [  5%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c.o
[build] [  5%] Linking CXX static library libbcrypt.a
[build] [  5%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_auth/crypto_auth.c.o
[build] [  5%] Built target bcrypt
[build] [  5%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/utils/LogStream.cc.o
third_party/drogon/examples/CMakeFiles/websocket_server.dir/websocket_server/WebSocketServer.cc.o

......

[build] [ 78%] Building CXX object third_party/drogon/examples/CMakeFiles/websocket_client.dir/websocket_client/WebSocketClient.cc.o
[build] [ 78%] Building CXX object third_party/drogon/examples/CMakeFiles/client.dir/client_example/main.cc.o
[build] [ 78%] Building CXX object CMakeFiles/ForDrogon.dir/src/Application.cpp.o
[build] [ 78%] Building CXX object third_party/drogon/drogon_ctl/CMakeFiles/_drogon_ctl.dir/cmd.cc.o
[build] [ 78%] Building CXX object third_party/drogon/examples/CMakeFiles/benchmark.dir/benchmark/JsonCtrl.cc.o
[build] [ 78%] Building CXX object third_party/drogon/examples/CMakeFiles/benchmark.dir/benchmark/main.cc.o
[build] [ 78%] Building CXX object third_party/drogon/drogon_ctl/CMakeFiles/_drogon_ctl.dir/create_view.cc.o
[build] [ 78%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/IMGroupCtrl.cpp.o
[build] [ 78%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulChatGroupsCtrl.cc.o
[build] [ 78%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulChatGroupsCtrlBase.cc.o
[build] [ 78%] Linking CXX executable websocket_client
[build] [ 79%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulElectronsCtrl.cc.o
[build] [ 79%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulElectronsCtrlBase.cc.o
[build] [ 79%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulFriendSettingsCtrl.cc.o
[build] [ 80%] Linking CXX executable benchmark
[build] [ 80%] Linking CXX executable client
[build] Undefined symbols for architecture arm64:
[build]   "__ZN4Json11writeStringB5cxx11ERKNS_12StreamWriter7FactoryERKNS_5ValueE", referenced from:
[build]       __ZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueE in libdrogon.a(HttpRequestImpl.cc.o)
[build]       __ZNK6drogon16HttpResponseImpl20generateBodyFromJsonEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]   "__ZN4Json17CharReaderBuilderixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZNK6drogon15HttpRequestImpl9parseJsonEvENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]       __ZZNK6drogon16HttpResponseImpl9parseJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]   "__ZN4Json19StreamWriterBuilderixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueEENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]       __ZZNK6drogon16HttpResponseImpl20generateBodyFromJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]   "__ZN4Json5ValueC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueEENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]       __ZZNK6drogon16HttpResponseImpl20generateBodyFromJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]   "__ZN4Json5ValueixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZL7loadAppRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZN4JsonrsERSiRNS_5ValueE", referenced from:
[build]       __ZN6drogon12ConfigLoaderC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZN6drogon12ConfigLoaderC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZNK4Json5Value14getMemberNamesB5cxx11Ev", referenced from:
[build]       __ZL7loadAppRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZNK4Json5Value8asStringB5cxx11Ev", referenced from:
[build]       __ZL14loadLogSettingRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL15loadControllersRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL7loadAppRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL13loadDbClientsRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL16loadRedisClientsRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL13loadListenersRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL7loadSSLRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       ...
[build] ld: symbol(s) not found for architecture arm64
[build] collect2: error: ld returned 1 exit status
[build] make[2]: *** [third_party/drogon/examples/websocket_client] Error 1
[build] make[1]: *** [third_party/drogon/examples/CMakeFiles/websocket_client.dir/all] Error 2
[build] make[1]: *** Waiting for unfinished jobs....
[build] [ 81%] Linking CXX executable websocket_server
[build] Undefined symbols for architecture arm64:
[build]   "__ZN4Json11writeStringB5cxx11ERKNS_12StreamWriter7FactoryERKNS_5ValueE", referenced from:
[build]       __ZNK6drogon16HttpResponseImpl20generateBodyFromJsonEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]       __ZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueE in libdrogon.a(HttpRequestImpl.cc.o)
[build] [ 81%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulFriendSettingsCtrlBase.cc.o
[build]   "__ZN4Json17CharReaderBuilderixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZNK6drogon16HttpResponseImpl9parseJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]       __ZZNK6drogon15HttpRequestImpl9parseJsonEvENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]   "__ZN4Json19StreamWriterBuilderixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZNK6drogon16HttpResponseImpl20generateBodyFromJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]       __ZZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueEENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]   "__ZN4Json5ValueC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZNK6drogon16HttpResponseImpl20generateBodyFromJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]       __ZZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueEENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]   "__ZN4Json5ValueixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZL7loadAppRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZN4JsonrsERSiRNS_5ValueE", referenced from:
[build]       __ZN6drogon12ConfigLoaderC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZN6drogon12ConfigLoaderC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZNK4Json5Value14getMemberNamesB5cxx11Ev", referenced from:
[build]       __ZL7loadAppRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZNK4Json5Value8asStringB5cxx11Ev", referenced from:
[build]       __ZN6drogon6plugin12AccessLogger12initAndStartERKN4Json5ValueE in libdrogon.a(AccessLogger.cc.o)
[build]       __ZN6drogon6plugin19SecureSSLRedirector12initAndStartERKN4Json5ValueE in libdrogon.a(SecureSSLRedirector.cc.o)
[build]       __ZL14loadLogSettingRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL15loadControllersRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL7loadAppRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL13loadDbClientsRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL16loadRedisClientsRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       ...
[build] ld: symbol(s) not found for architecture arm64
[build] collect2: error: ld returned 1 exit status
[build] make[2]: *** [third_party/drogon/examples/benchmark] Error 1
[build] make[1]: *** [third_party/drogon/examples/CMakeFiles/benchmark.dir/all] Error 2
[build] [ 82%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulFriendsCtrl.cc.o
[build] Undefined symbols for architecture arm64:
[build]   "__ZN4Json11writeStringB5cxx11ERKNS_12StreamWriter7FactoryERKNS_5ValueE", referenced from:
[build]       __ZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueE in libdrogon.a(HttpRequestImpl.cc.o)
[build]       __ZNK6drogon16HttpResponseImpl20generateBodyFromJsonEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]   "__ZN4Json17CharReaderBuilderixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZNK6drogon15HttpRequestImpl9parseJsonEvENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]       __ZZNK6drogon16HttpResponseImpl9parseJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]   "__ZN4Json19StreamWriterBuilderixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueEENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]       __ZZNK6drogon16HttpResponseImpl20generateBodyFromJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]   "__ZN4Json5ValueC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueEENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]       __ZZNK6drogon16HttpResponseImpl20generateBodyFromJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]   "__ZN4Json5ValueixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZL7loadAppRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZN4JsonrsERSiRNS_5ValueE", referenced from:
[build]       __ZN6drogon12ConfigLoaderC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZN6drogon12ConfigLoaderC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZNK4Json5Value14getMemberNamesB5cxx11Ev", referenced from:
[build]       __ZL7loadAppRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZNK4Json5Value8asStringB5cxx11Ev", referenced from:
[build]       __ZN6drogon6plugin12AccessLogger12initAndStartERKN4Json5ValueE in libdrogon.a(AccessLogger.cc.o)
[build]       __ZN6drogon6plugin19SecureSSLRedirector12initAndStartERKN4Json5ValueE in libdrogon.a(SecureSSLRedirector.cc.o)
[build]       __ZL14loadLogSettingRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL15loadControllersRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL7loadAppRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL13loadDbClientsRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL16loadRedisClientsRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       ...
[build] ld: symbol(s) not found for architecture arm64
[build] collect2: error: ld returned 1 exit status
[build] make[2]: *** [third_party/drogon/examples/client] Error 1
[build] make[1]: *** [third_party/drogon/examples/CMakeFiles/client.dir/all] Error 2
[build] [ 82%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulFriendsCtrlBase.cc.o
[build] Undefined symbols for architecture arm64:
[build]   "__ZN4Json11writeStringB5cxx11ERKNS_12StreamWriter7FactoryERKNS_5ValueE", referenced from:
[build]       __ZNK6drogon16HttpResponseImpl20generateBodyFromJsonEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]       __ZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueE in libdrogon.a(HttpRequestImpl.cc.o)
[build]   "__ZN4Json17CharReaderBuilderixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZNK6drogon16HttpResponseImpl9parseJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]       __ZZNK6drogon15HttpRequestImpl9parseJsonEvENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]   "__ZN4Json19StreamWriterBuilderixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZNK6drogon16HttpResponseImpl20generateBodyFromJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]       __ZZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueEENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]   "__ZN4Json5ValueC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZNK6drogon16HttpResponseImpl20generateBodyFromJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]       __ZZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueEENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]   "__ZN4Json5ValueixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZL7loadAppRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZN4JsonrsERSiRNS_5ValueE", referenced from:
[build]       __ZN6drogon12ConfigLoaderC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZN6drogon12ConfigLoaderC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZNK4Json5Value14getMemberNamesB5cxx11Ev", referenced from:
[build]       __ZL7loadAppRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZNK4Json5Value8asStringB5cxx11Ev", referenced from:
[build]       __ZL14loadLogSettingRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL15loadControllersRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL7loadAppRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL13loadDbClientsRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL16loadRedisClientsRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL13loadListenersRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL7loadSSLRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       ...
[build] ld: symbol(s) not found for architecture arm64
[build] collect2: error: ld returned 1 exit status
[build] make[2]: *** [third_party/drogon/examples/websocket_server] Error 1
[build] make[1]: *** [third_party/drogon/examples/CMakeFiles/websocket_server.dir/all] Error 2
[build] [ 82%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulGroupMembersCtrl.cc.o
[build] [ 82%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulGroupMembersCtrlBase.cc.o
[build] [ 82%] Linking CXX executable jsonstore
[build] [ 82%] Linking CXX executable _drogon_ctl
[build] [ 82%] Built target _drogon_ctl
[build] [ 82%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulNotifiesCtrl.cc.o
[build] Undefined symbols for architecture arm64:
[build]   "__ZN4Json11writeStringB5cxx11ERKNS_12StreamWriter7FactoryERKNS_5ValueE", referenced from:
[build]       __ZNK6drogon16HttpResponseImpl20generateBodyFromJsonEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]       __ZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueE in libdrogon.a(HttpRequestImpl.cc.o)
[build] [ 83%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulNotifiesCtrlBase.cc.o
[build]   "__ZN4Json17CharReaderBuilderixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZNK6drogon16HttpResponseImpl9parseJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]       __ZZNK6drogon15HttpRequestImpl9parseJsonEvENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]   "__ZN4Json19StreamWriterBuilderixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZNK6drogon16HttpResponseImpl20generateBodyFromJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]       __ZZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueEENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]   "__ZN4Json5ValueC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN9JsonStore8getTokenERKSt10shared_ptrIN6drogon11HttpRequestEEOSt8functionIFvRKS0_INS1_12HttpResponseEEEE in main.cc.o
[build]       __ZZNK6drogon16HttpResponseImpl20generateBodyFromJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]       __ZZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueEENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]   "__ZN4Json5ValueixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN9JsonStore10updateItemERKSt10shared_ptrIN6drogon11HttpRequestEEOSt8functionIFvRKS0_INS1_12HttpResponseEEEERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESL_ in main.cc.o
[build]       __ZN9JsonStore8walkJsonERN4Json5ValueERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEm in main.cc.o
[build]       __ZL7loadAppRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZN4JsonrsERSiRNS_5ValueE", referenced from:
[build]       __ZN6drogon12ConfigLoaderC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZN6drogon12ConfigLoaderC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZNK4Json5Value14getMemberNamesB5cxx11Ev", referenced from:
[build]       __ZL7loadAppRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZNK4Json5Value8asStringB5cxx11Ev", referenced from:
[build]       __ZN6drogon6plugin12AccessLogger12initAndStartERKN4Json5ValueE in libdrogon.a(AccessLogger.cc.o)
[build]       __ZN6drogon6plugin19SecureSSLRedirector12initAndStartERKN4Json5ValueE in libdrogon.a(SecureSSLRedirector.cc.o)
[build]       __ZL14loadLogSettingRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL15loadControllersRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL7loadAppRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL13loadDbClientsRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZL16loadRedisClientsRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]       ...
[build] ld: symbol(s) not found for architecture arm64
[build] collect2: error: ld returned 1 exit status
[build] make[2]: *** [third_party/drogon/examples/jsonstore] Error 1
[build] make[1]: *** [third_party/drogon/examples/CMakeFiles/jsonstore.dir/all] Error 2
[build] [ 83%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulUsersCtrl.cc.o
[build] [ 83%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulUsersCtrlBase.cc.o
[build] [ 83%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/UserCtrl.cpp.o
[build] [ 84%] Building CXX object CMakeFiles/ForDrogon.dir/src/filters/JwtFilter.cc.o
[build] [ 84%] Building CXX object CMakeFiles/ForDrogon.dir/src/filters/TimeFilter.cc.o
[build] [ 84%] Building CXX object CMakeFiles/ForDrogon.dir/src/models/ChatGroups.cc.o
[build] [ 84%] Building CXX object CMakeFiles/ForDrogon.dir/src/models/Electrons.cc.o
[build] [ 84%] Building CXX object CMakeFiles/ForDrogon.dir/src/models/FriendSettings.cc.o
[build] [ 85%] Building CXX object CMakeFiles/ForDrogon.dir/src/models/Friends.cc.o
[build] [ 85%] Building CXX object CMakeFiles/ForDrogon.dir/src/models/GroupMembers.cc.o
[build] [ 85%] Building CXX object CMakeFiles/ForDrogon.dir/src/models/Notifies.cc.o
[build] [ 85%] Building CXX object CMakeFiles/ForDrogon.dir/src/models/Users.cc.o
[build] [ 86%] Building CXX object CMakeFiles/ForDrogon.dir/src/utils/bcrypt/bcrypt.cpp.o
[build] [ 86%] Building CXX object CMakeFiles/ForDrogon.dir/src/utils/jwt/JWT.cpp.o
[build] [ 86%] Linking CXX executable ForDrogon
[build] Undefined symbols for architecture arm64:
[build]   "__ZN4Json11writeStringB5cxx11ERKNS_12StreamWriter7FactoryERKNS_5ValueE", referenced from:
[build]       __ZNK6drogon16HttpResponseImpl20generateBodyFromJsonEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]       __ZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueE in libdrogon.a(HttpRequestImpl.cc.o)
[build]   "__ZN4Json17CharReaderBuilderixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZNK6drogon16HttpResponseImpl9parseJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]       __ZZNK6drogon15HttpRequestImpl9parseJsonEvENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]   "__ZN4Json19StreamWriterBuilderixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZNK6drogon16HttpResponseImpl20generateBodyFromJsonEvENKUlvE_clEv in libdrogon.a(HttpResponseImpl.cc.o)
[build]       __ZZN6drogon11HttpRequest18newHttpJsonRequestERKN4Json5ValueEENKUlvE_clEv in libdrogon.a(HttpRequestImpl.cc.o)
[build]   "__ZN4Json5ValueC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZZZZN3api2v15Group6createERKSt10shared_ptrIN6drogon11HttpRequestEEOSt8functionIFvRKS2_INS3_12HttpResponseEEEEENKUlRKS2_INS3_3orm11TransactionEEE_clESK_ENKUlRKN12drogon_model13database_test10ChatGroupsEE_clESQ_ENKUlRKNSG_17DrogonDbExceptionEE0_clESU_ in IMGroupCtrl.cpp.o
[build]       __ZN25RestfulChatGroupsCtrlBase9updateOneERKSt10shared_ptrIN6drogon11HttpRequestEEOSt8functionIFvRKS0_INS1_12HttpResponseEEEEOi in RestfulChatGroupsCtrlBase.cc.o
[build]       __ZN25RestfulChatGroupsCtrlBase6createERKSt10shared_ptrIN6drogon11HttpRequestEEOSt8functionIFvRKS0_INS1_12HttpResponseEEEE in RestfulChatGroupsCtrlBase.cc.o
[build]       __ZN24RestfulElectronsCtrlBase9updateOneERKSt10shared_ptrIN6drogon11HttpRequestEEOSt8functionIFvRKS0_INS1_12HttpResponseEEEEOi in RestfulElectronsCtrlBase.cc.o
[build]       __ZN24RestfulElectronsCtrlBase6createERKSt10shared_ptrIN6drogon11HttpRequestEEOSt8functionIFvRKS0_INS1_12HttpResponseEEEE in RestfulElectronsCtrlBase.cc.o
[build]       __ZN29RestfulFriendSettingsCtrlBase9updateOneERKSt10shared_ptrIN6drogon11HttpRequestEEOSt8functionIFvRKS0_INS1_12HttpResponseEEEEOi in RestfulFriendSettingsCtrlBase.cc.o
[build]       __ZN29RestfulFriendSettingsCtrlBase6createERKSt10shared_ptrIN6drogon11HttpRequestEEOSt8functionIFvRKS0_INS1_12HttpResponseEEEE in RestfulFriendSettingsCtrlBase.cc.o
[build]       ...
[build]   "__ZN4Json5ValueixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZNK12drogon_model13database_test10ChatGroups17toMasqueradedJsonERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EE in ChatGroups.cc.o
[build]       __ZNK12drogon_model13database_test9Electrons17toMasqueradedJsonERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EE in Electrons.cc.o
[build]       __ZNK12drogon_model13database_test14FriendSettings17toMasqueradedJsonERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EE in FriendSettings.cc.o
[build]       __ZNK12drogon_model13database_test7Friends17toMasqueradedJsonERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EE in Friends.cc.o
[build]       __ZNK12drogon_model13database_test12GroupMembers17toMasqueradedJsonERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EE in GroupMembers.cc.o
[build]       __ZNK12drogon_model13database_test8Notifies17toMasqueradedJsonERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EE in Notifies.cc.o
[build]       __ZNK12drogon_model13database_test5Users17toMasqueradedJsonERKSt6vectorINSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEESaIS8_EE in Users.cc.o
[build]       ...
[build]   "__ZN4JsonrsERSiRNS_5ValueE", referenced from:
[build]       __ZN6drogon12ConfigLoaderC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in libdrogon.a(ConfigLoader.cc.o)
[build]       __ZN6drogon12ConfigLoaderC1ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZNK4Json5Value14getMemberNamesB5cxx11Ev", referenced from:
[build]       __ZL7loadAppRKN4Json5ValueE in libdrogon.a(ConfigLoader.cc.o)
[build]   "__ZNK4Json5Value8asStringB5cxx11Ev", referenced from:
[build]       __ZZZZN3api2v15Group6createERKSt10shared_ptrIN6drogon11HttpRequestEEOSt8functionIFvRKS2_INS3_12HttpResponseEEEEENKUlRKS2_INS3_3orm11TransactionEEE_clESK_ENKUlRKN12drogon_model13database_test10ChatGroupsEE_clESQ_ENKUlRKNSG_17DrogonDbExceptionEE0_clESU_ in IMGroupCtrl.cpp.o
[build]       __ZN6drogon3orm8internal9SqlBinderlsERKN4Json5ValueE in UserCtrl.cpp.o
[build]       __ZZZN3api2v14User5loginERKSt10shared_ptrIN6drogon11HttpRequestEEOSt8functionIFvRKS2_INS3_12HttpResponseEEEEENKUlRKN12drogon_model13database_test5UsersEE_clESK_ENKUlRKS2_INS3_5nosql16RedisTransactionEEE_clESQ_ in UserCtrl.cpp.o
[build]       __ZZN3api2v14User5loginERKSt10shared_ptrIN6drogon11HttpRequestEEOSt8functionIFvRKS2_INS3_12HttpResponseEEEEENKUlRKN12drogon_model13database_test5UsersEE_clESK_ in UserCtrl.cpp.o
[build]       __ZN3api2v14User6logoutERKSt10shared_ptrIN6drogon11HttpRequestEEOSt8functionIFvRKS2_INS3_12HttpResponseEEEE in UserCtrl.cpp.o
[build]       __ZZN3api2v14User6createERKSt10shared_ptrIN6drogon11HttpRequestEEOSt8functionIFvRKS2_INS3_12HttpResponseEEEEENKUlRKN12drogon_model13database_test5UsersEE_clESK_ in UserCtrl.cpp.o
[build]       __ZN3api2v14User9deleteOneERKSt10shared_ptrIN6drogon11HttpRequestEEOSt8functionIFvRKS2_INS3_12HttpResponseEEEE in UserCtrl.cpp.o
[build]       ...
[build]   "__ZNK4Json5Value8isMemberERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN6drogon17RestfulController19doCustomValidationsERKN4Json5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in RestfulChatGroupsCtrlBase.cc.o
[build]       __ZN6drogon17RestfulController19doCustomValidationsERKN4Json5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in RestfulElectronsCtrlBase.cc.o
[build]       __ZN6drogon17RestfulController19doCustomValidationsERKN4Json5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in RestfulFriendSettingsCtrlBase.cc.o
[build]       __ZN6drogon17RestfulController19doCustomValidationsERKN4Json5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in RestfulFriendsCtrlBase.cc.o
[build]       __ZN6drogon17RestfulController19doCustomValidationsERKN4Json5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in RestfulGroupMembersCtrlBase.cc.o
[build]       __ZN6drogon17RestfulController19doCustomValidationsERKN4Json5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in RestfulNotifiesCtrlBase.cc.o
[build]       __ZN6drogon17RestfulController19doCustomValidationsERKN4Json5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in RestfulUsersCtrlBase.cc.o
[build]       ...
[build]   "__ZNK4Json5ValueixERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE", referenced from:
[build]       __ZN6drogon17RestfulController19doCustomValidationsERKN4Json5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in RestfulChatGroupsCtrlBase.cc.o
[build]       __ZN6drogon17RestfulController19doCustomValidationsERKN4Json5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in RestfulElectronsCtrlBase.cc.o
[build]       __ZN6drogon17RestfulController19doCustomValidationsERKN4Json5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in RestfulFriendSettingsCtrlBase.cc.o
[build]       __ZN6drogon17RestfulController19doCustomValidationsERKN4Json5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in RestfulFriendsCtrlBase.cc.o
[build]       __ZN6drogon17RestfulController19doCustomValidationsERKN4Json5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in RestfulGroupMembersCtrlBase.cc.o
[build]       __ZN6drogon17RestfulController19doCustomValidationsERKN4Json5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in RestfulNotifiesCtrlBase.cc.o
[build]       __ZN6drogon17RestfulController19doCustomValidationsERKN4Json5ValueERNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEE in RestfulUsersCtrlBase.cc.o
[build]       ...
[build] ld: symbol(s) not found for architecture arm64
[build] collect2: error: ld returned 1 exit status
[build] make[2]: *** [ForDrogon] Error 1
[build] make[1]: *** [CMakeFiles/ForDrogon.dir/all] Error 2
[build] make: *** [all] Error 2
[build] Build finished with exit code 2

I desperately want to use c++20 coroutines, but GCC compilation keeps failing.

1111mp commented 2 years ago
image

If I use Clang I can't use coroutines, but if I use GCC the project compiles and fails. I'm starting to miss Windows.

0rangeFox commented 2 years ago

Hey, I got M1 and never tried with coroutines because I never needed it. But it actually works without coroutines. Are you available to test this formula, so I can assure this works on another Macs and not just only mine? If not, I will try help you in other way. Thanks.

1111mp commented 2 years ago

I built drogon from source(latest code from master branch):

image

The project can be compiled successfully using the Clang, but Clang's support for c++20 is not very good. So i tried use GCC. GCC also gives some errors when I install drogon_ctl through the tutorial.

hwc0919 commented 2 years ago

You should compile jsoncpp with gcc too.

1111mp commented 2 years ago

You should compile jsoncpp with gcc too.

Can you teach me how to compile jsoncpp with gcc? I installed jsoncpp via brew install jsoncpp. I'm just starting to use c++, so please forgive me.

1111mp commented 2 years ago

@hwc0919 Thank you for your help. After I tried to install jsoncpp using the source code build, I could successfully install drogon. drogon-ctl -v:

     _                             
  __| |_ __ ___   __ _  ___  _ __  
 / _` | '__/ _ \ / _` |/ _ \| '_ \ 
| (_| | | | (_) | (_| | (_) | | | |
 \__,_|_|  \___/ \__, |\___/|_| |_|
                 |___/             

A utility for drogon
Version: 1.7.5
Git commit: 
Compilation: 
  Compiler: /opt/homebrew/bin/g++-12
  Compiler ID: GNU
  Compilation flags: -std=c++20 -I/usr/local/include
Libraries: 
  postgresql: yes  (pipeline mode: yes)
  mariadb: yes
  sqlite3: yes
  openssl: no
  brotli: no
  boost: no
  hiredis: yes
  c-ares: no

But my project still fails at the link stage: sudo cmake .. -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12 -DCMAKE_CXX_FLAGS="-std=c++20 -fcoroutines":

-- The CXX compiler identification is GNU 12.1.0
-- 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: /opt/homebrew/bin/g++-12 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- ################Add Module Thgirdparty################
-- The C compiler identification is GNU 12.1.0
-- 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: /opt/homebrew/bin/gcc-12 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- compiler: GNU
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Looking for C++ include any
-- Looking for C++ include any - found
-- Looking for C++ include string_view
-- Looking for C++ include string_view - found
-- Looking for C++ include coroutine
-- Looking for C++ include coroutine - found
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) 
-- Could NOT find c-ares (missing: C-ARES_INCLUDE_DIRS C-ARES_LIBRARIES) 
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Looking for C++ include filesystem
-- Looking for C++ include filesystem - found
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED
-- Performing Test CXX_FILESYSTEM_NO_LINK_NEEDED - Success
-- Found std::filesystem
-- use c++20
-- Found Jsoncpp: /usr/local/include  
-- jsoncpp verson:1.9.5
-- Found UUID: 
-- Could NOT find BROTLI (missing: BROTLIDEC_LIBRARY BROTLIENC_LIBRARY BROTLICOMMON_LIBRARY BROTLI_INCLUDE_DIR) 
-- Found PostgreSQL: /opt/homebrew/lib/libpq.dylib (found version "14.4")  
-- pg inc: /opt/homebrew/include/opt/homebrew/include/postgresql/server
-- Found pg: /opt/homebrew/lib/libpq.dylib  
-- libpq inc path:/opt/homebrew/include/opt/homebrew/include/postgresql/server
-- libpq lib:/opt/homebrew/lib/libpq.dylib
-- The libpq supports batch mode
-- MySQL Include dir: /opt/homebrew/include/mysql
-- MySQL client libraries: /opt/homebrew/lib/libmysqlclient_r.dylib
-- Ok! We find mariadb!
-- Looking for mysql_optionsv in MySQL_lib
-- Looking for mysql_optionsv in MySQL_lib - found
-- Mariadb support mysql_optionsv
-- Ok! We find sqlite3!
-- Found Hiredis: /opt/homebrew/lib/libhiredis.dylib  
-- Found ZLIB: /Library/Developer/CommandLineTools/SDKs/MacOSX12.3.sdk/usr/lib/libz.tbd (found version "1.2.11") 
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR) 
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/cmake.csp
-- view classname:cmake
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/config.csp
-- view classname:config
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/demoMain.csp
-- view classname:demoMain
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/filter_cc.csp
-- view classname:filter_cc
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/filter_h.csp
-- view classname:filter_h
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/gitignore.csp
-- view classname:gitignore
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/model_cc.csp
-- view classname:model_cc
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/model_h.csp
-- view classname:model_h
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/model_json.csp
-- view classname:model_json
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/plugin_cc.csp
-- view classname:plugin_cc
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/plugin_h.csp
-- view classname:plugin_h
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/restful_controller_base_cc.csp
-- view classname:restful_controller_base_cc
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/restful_controller_base_h.csp
-- view classname:restful_controller_base_h
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/restful_controller_cc.csp
-- view classname:restful_controller_cc
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/restful_controller_custom_cc.csp
-- view classname:restful_controller_custom_cc
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/restful_controller_custom_h.csp
-- view classname:restful_controller_custom_h
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/restful_controller_h.csp
-- view classname:restful_controller_h
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/test_cmake.csp
-- view classname:test_cmake
-- cspFile:/Users/zhangyifan/Documents/projects/ForDrogon/third_party/drogon/drogon_ctl/templates/test_main.csp
-- view classname:test_main
-- bin:bin
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
CMake Warning (dev) at third_party/stduuid/CMakeLists.txt:11 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'UUID_BUILD_TESTS'.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at third_party/stduuid/CMakeLists.txt:14 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'UUID_USING_CXX20_SPAN'.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at third_party/jwt-cpp/CMakeLists.txt:14 (option):
  Policy CMP0077 is not set: option() honors normal variables.  Run "cmake
  --help-policy CMP0077" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  For compatibility with older versions of CMake, option is clearing the
  normal variable 'JWT_BUILD_EXAMPLES'.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found OpenSSL: /opt/homebrew/opt/openssl@1.1/lib/libcrypto.dylib (found suitable version "1.1.1p", minimum required is "1.0.1")  
-- Could NOT find jsoncons (missing: jsoncons_DIR)
-- Could NOT find nlohmann_json (missing: nlohmann_json_DIR)
-- use c++20
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/***/Documents/projects/ForDrogon/build
[  1%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_aead/aes256gcm/aesni/aead_aes256gcm_aesni.c.o
[  1%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_aead/chacha20poly1305/sodium/aead_chacha20poly1305.c.o
[  1%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_aead/xchacha20poly1305/sodium/aead_xchacha20poly1305.c.o
[  1%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_auth/crypto_auth.c.o
[  2%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_auth/hmacsha256/auth_hmacsha256.c.o
[  2%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_auth/hmacsha512/auth_hmacsha512.c.o
[  2%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_auth/hmacsha512256/auth_hmacsha512256.c.o
[  2%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_box/crypto_box.c.o
[  2%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_box/crypto_box_easy.c.o
[  3%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_box/crypto_box_seal.c.o
[  3%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_box/curve25519xsalsa20poly1305/box_curve25519xsalsa20poly1305.c.o
[  3%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_core/ed25519/ref10/ed25519_ref10.c.o
[  3%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_core/hchacha20/core_hchacha20.c.o
[  4%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_core/hsalsa20/core_hsalsa20.c.o
[  4%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_core/hsalsa20/ref2/core_hsalsa20_ref2.c.o
[  4%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_core/salsa/ref/core_salsa_ref.c.o
[  4%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_generichash/blake2b/generichash_blake2.c.o
[  4%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-avx2.c.o
[  5%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ref.c.o
[  5%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-sse41.c.o
[  5%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-compress-ssse3.c.o
[  5%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_generichash/blake2b/ref/blake2b-ref.c.o
[  6%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_generichash/blake2b/ref/generichash_blake2b.c.o
[  6%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_generichash/crypto_generichash.c.o
[  6%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_hash/crypto_hash.c.o
[  6%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_hash/sha256/cp/hash_sha256_cp.c.o
[  6%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_hash/sha256/hash_sha256.c.o
[  7%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_hash/sha512/cp/hash_sha512_cp.c.o
[  7%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_hash/sha512/hash_sha512.c.o
[  7%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_kdf/blake2b/kdf_blake2b.c.o
[  7%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_kdf/crypto_kdf.c.o
[  8%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_kx/crypto_kx.c.o
[  8%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_onetimeauth/crypto_onetimeauth.c.o
[  8%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_onetimeauth/poly1305/donna/poly1305_donna.c.o
[  8%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_onetimeauth/poly1305/onetimeauth_poly1305.c.o
[  9%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_onetimeauth/poly1305/sse2/poly1305_sse2.c.o
[  9%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-core.c.o
[  9%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-encoding.c.o
[  9%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-avx2.c.o
[  9%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-avx512f.c.o
[ 10%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ref.c.o
[ 10%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_pwhash/argon2/argon2-fill-block-ssse3.c.o
[ 10%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_pwhash/argon2/argon2.c.o
[ 10%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_pwhash/argon2/blake2b-long.c.o
[ 11%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_pwhash/argon2/pwhash_argon2i.c.o
[ 11%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_pwhash/argon2/pwhash_argon2id.c.o
[ 11%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_pwhash/crypto_pwhash.c.o
[ 11%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_scalarmult/crypto_scalarmult.c.o
[ 11%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_scalarmult/curve25519/ref10/x25519_ref10.c.o
[ 12%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/curve25519_sandy2x.c.o
[ 12%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe51_invert.c.o
[ 12%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_scalarmult/curve25519/sandy2x/fe_frombytes_sandy2x.c.o
[ 12%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_scalarmult/curve25519/scalarmult_curve25519.c.o
[ 13%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox.c.o
[ 13%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_secretbox/crypto_secretbox_easy.c.o
[ 13%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_secretbox/xsalsa20poly1305/secretbox_xsalsa20poly1305.c.o
[ 13%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_secretstream/xchacha20poly1305/secretstream_xchacha20poly1305.c.o
[ 13%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_shorthash/crypto_shorthash.c.o
[ 14%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_shorthash/siphash24/ref/shorthash_siphash24_ref.c.o
[ 14%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_shorthash/siphash24/shorthash_siphash24.c.o
[ 14%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_sign/crypto_sign.c.o
[ 14%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_sign/ed25519/ref10/keypair.c.o
[ 15%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_sign/ed25519/ref10/open.c.o
[ 15%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_sign/ed25519/ref10/sign.c.o
[ 15%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_sign/ed25519/sign_ed25519.c.o
[ 15%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-avx2.c.o
[ 15%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_stream/chacha20/dolbeau/chacha20_dolbeau-ssse3.c.o
[ 16%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_stream/chacha20/ref/chacha20_ref.c.o
[ 16%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_stream/chacha20/stream_chacha20.c.o
[ 16%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_stream/crypto_stream.c.o
[ 16%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_stream/salsa20/ref/salsa20_ref.c.o
[ 17%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_stream/salsa20/stream_salsa20.c.o
[ 17%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_stream/salsa20/xmm6/salsa20_xmm6.c.o
[ 17%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-avx2.c.o
[ 17%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_stream/salsa20/xmm6int/salsa20_xmm6int-sse2.c.o
[ 17%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_stream/xsalsa20/stream_xsalsa20.c.o
[ 18%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/crypto_verify/sodium/verify.c.o
[ 18%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/randombytes/internal/randombytes_internal_random.c.o
[ 18%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/randombytes/randombytes.c.o
[ 18%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/randombytes/sysrandom/randombytes_sysrandom.c.o
[ 19%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/sodium/codecs.c.o
[ 19%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/sodium/core.c.o
[ 19%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/sodium/runtime.c.o
[ 19%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/sodium/utils.c.o
[ 19%] Building C object _deps/sodium-build/CMakeFiles/sodium.dir/libsodium/src/libsodium/sodium/version.c.o
[ 20%] Linking C static library libsodium.a
[ 20%] Built target sodium
[ 20%] Building CXX object third_party/CMakeFiles/bcrypt.dir/bcrypt/src/bcrypt.cc.o
[ 21%] Building CXX object third_party/CMakeFiles/bcrypt.dir/bcrypt/src/blowfish.cc.o
[ 21%] Linking CXX static library libbcrypt.a
[ 21%] Built target bcrypt
[ 22%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/utils/AsyncFileLogger.cc.o
[ 22%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/utils/ConcurrentTaskQueue.cc.o
[ 22%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/utils/Date.cc.o
[ 22%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/utils/LogStream.cc.o
[ 22%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/utils/Logger.cc.o
[ 23%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/utils/MsgBuffer.cc.o
[ 23%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/utils/SerialTaskQueue.cc.o
[ 23%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/utils/TimingWheel.cc.o
[ 23%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/utils/Utilities.cc.o
[ 24%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/EventLoop.cc.o
[ 24%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/EventLoopThread.cc.o
[ 24%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/EventLoopThreadPool.cc.o
[ 24%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/InetAddress.cc.o
[ 24%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/TcpClient.cc.o
[ 25%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/TcpServer.cc.o
[ 25%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/Channel.cc.o
[ 25%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/inner/Acceptor.cc.o
[ 25%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/inner/Connector.cc.o
[ 26%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/inner/Poller.cc.o
[ 26%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/inner/Socket.cc.o
[ 26%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/inner/TcpConnectionImpl.cc.o
[ 26%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/inner/Timer.cc.o
[ 26%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/inner/TimerQueue.cc.o
[ 27%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/inner/poller/EpollPoller.cc.o
[ 27%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/inner/poller/KQueue.cc.o
[ 27%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/inner/poller/PollPoller.cc.o
[ 27%] Building CXX object third_party/drogon/trantor/CMakeFiles/trantor.dir/trantor/net/inner/NormalResolver.cc.o
[ 28%] Linking CXX static library libtrantor.a
[ 28%] Built target trantor
[ 28%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/AOPAdvice.cc.o
[ 29%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/CacheFile.cc.o
[ 29%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/ConfigLoader.cc.o
[ 29%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/Cookie.cc.o
[ 29%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/DrClassMap.cc.o
[ 29%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/DrTemplateBase.cc.o
[ 30%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/FiltersFunction.cc.o
[ 30%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/HttpAppFrameworkImpl.cc.o
[ 30%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/HttpBinder.cc.o
[ 30%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/HttpClientImpl.cc.o
[ 31%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/HttpControllersRouter.cc.o
[ 31%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/HttpFileImpl.cc.o
[ 31%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/HttpFileUploadRequest.cc.o
[ 31%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/HttpRequestImpl.cc.o
[ 31%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/HttpRequestParser.cc.o
[ 32%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/HttpResponseImpl.cc.o
[ 32%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/HttpResponseParser.cc.o
[ 32%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/HttpServer.cc.o
[ 32%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/HttpSimpleControllersRouter.cc.o
[ 33%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/HttpUtils.cc.o
[ 33%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/HttpViewData.cc.o
[ 33%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/IntranetIpFilter.cc.o
[ 33%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/ListenerManager.cc.o
[ 33%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/LocalHostFilter.cc.o
[ 34%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/MultiPart.cc.o
[ 34%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/NotFound.cc.o
[ 34%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/PluginsManager.cc.o
[ 34%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/RangeParser.cc.o
[ 35%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/SecureSSLRedirector.cc.o
[ 35%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/AccessLogger.cc.o
[ 35%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/SessionManager.cc.o
[ 35%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/StaticFileRouter.cc.o
[ 35%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/TaskTimeoutFlag.cc.o
[ 36%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/Utilities.cc.o
[ 36%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/WebSocketClientImpl.cc.o
[ 36%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/WebSocketConnectionImpl.cc.o
[ 36%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/WebsocketControllersRouter.cc.o
[ 37%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/SharedLibManager.cc.o
[ 37%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/postgresql_impl/PostgreSQLResultImpl.cc.o
[ 37%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/postgresql_impl/PgBatchConnection.cc.o
[ 37%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/mysql_impl/MysqlConnection.cc.o
[ 37%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/mysql_impl/MysqlResultImpl.cc.o
[ 38%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/sqlite3_impl/Sqlite3Connection.cc.o
[ 38%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/sqlite3_impl/Sqlite3ResultImpl.cc.o
[ 38%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/nosql_lib/redis/src/RedisClientImpl.cc.o
[ 38%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/nosql_lib/redis/src/RedisClientLockFree.cc.o
[ 39%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/nosql_lib/redis/src/RedisClientManager.cc.o
[ 39%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/nosql_lib/redis/src/RedisConnection.cc.o
[ 39%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/nosql_lib/redis/src/RedisResult.cc.o
[ 39%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/nosql_lib/redis/src/RedisTransactionImpl.cc.o
[ 39%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/ssl_funcs/Md5.cc.o
[ 40%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/lib/src/ssl_funcs/Sha1.cc.o
[ 40%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/ArrayParser.cc.o
[ 40%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/Criteria.cc.o
[ 40%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/DbClient.cc.o
[ 41%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/DbClientImpl.cc.o
[ 41%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/DbClientLockFree.cc.o
[ 41%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/DbConnection.cc.o
[ 41%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/Exception.cc.o
[ 41%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/Field.cc.o
[ 42%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/Result.cc.o
[ 42%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/Row.cc.o
[ 42%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/SqlBinder.cc.o
[ 42%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/TransactionImpl.cc.o
[ 43%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/RestfulController.cc.o
[ 43%] Building CXX object third_party/drogon/CMakeFiles/drogon.dir/orm_lib/src/DbClientManager.cc.o
[ 43%] Linking CXX static library libdrogon.a
[ 43%] Built target drogon
[ 43%] Building CXX object CMakeFiles/ForDrogon.dir/src/Application.cpp.o
[ 43%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/IMGroupCtrl.cpp.o
[ 43%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulChatGroupsCtrl.cc.o
[ 43%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulChatGroupsCtrlBase.cc.o
[ 44%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulElectronsCtrl.cc.o
[ 44%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulElectronsCtrlBase.cc.o
[ 44%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulFriendSettingsCtrl.cc.o
[ 44%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulFriendSettingsCtrlBase.cc.o
[ 45%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulFriendsCtrl.cc.o
[ 45%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulFriendsCtrlBase.cc.o
[ 45%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulGroupMembersCtrl.cc.o
[ 45%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulGroupMembersCtrlBase.cc.o
[ 45%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulNotifiesCtrl.cc.o
[ 46%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulNotifiesCtrlBase.cc.o
[ 46%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulUsersCtrl.cc.o
[ 46%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/RestfulUsersCtrlBase.cc.o
[ 46%] Building CXX object CMakeFiles/ForDrogon.dir/src/controllers/UserCtrl.cpp.o
[ 47%] Building CXX object CMakeFiles/ForDrogon.dir/src/filters/JwtFilter.cc.o
[ 47%] Building CXX object CMakeFiles/ForDrogon.dir/src/filters/TimeFilter.cc.o
[ 47%] Building CXX object CMakeFiles/ForDrogon.dir/src/models/ChatGroups.cc.o
[ 47%] Building CXX object CMakeFiles/ForDrogon.dir/src/models/Electrons.cc.o
[ 47%] Building CXX object CMakeFiles/ForDrogon.dir/src/models/FriendSettings.cc.o
[ 48%] Building CXX object CMakeFiles/ForDrogon.dir/src/models/Friends.cc.o
[ 48%] Building CXX object CMakeFiles/ForDrogon.dir/src/models/GroupMembers.cc.o
[ 48%] Building CXX object CMakeFiles/ForDrogon.dir/src/models/Notifies.cc.o
[ 48%] Building CXX object CMakeFiles/ForDrogon.dir/src/models/Users.cc.o
[ 49%] Building CXX object CMakeFiles/ForDrogon.dir/src/utils/bcrypt/bcrypt.cpp.o
[ 49%] Building CXX object CMakeFiles/ForDrogon.dir/src/utils/jwt/JWT.cpp.o
[ 49%] Linking CXX executable ForDrogon
ld: library not found for -ljsoncpp
collect2: error: ld returned 1 exit status
make[2]: *** [ForDrogon] Error 1
make[1]: *** [CMakeFiles/ForDrogon.dir/all] Error 2
make: *** [all] Error 2

Here is my command and output to install jsoncpp: sudo cmake .. -DCMAKE_C_COMPILER=gcc-12 -DCMAKE_CXX_COMPILER=g++-12:

-- The CXX compiler identification is GNU 12.1.0
-- 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: /opt/homebrew/bin/g++-12 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- JsonCpp Version: 1.9.5
-- Looking for C++ include clocale
-- Looking for C++ include clocale - found
-- Looking for localeconv
-- Looking for localeconv - found
-- Looking for C++ include sys/types.h
-- Looking for C++ include sys/types.h - found
-- Looking for C++ include stdint.h
-- Looking for C++ include stdint.h - found
-- Looking for C++ include stddef.h
-- Looking for C++ include stddef.h - found
-- Check size of lconv
-- Check size of lconv - done
-- Performing Test HAVE_DECIMAL_POINT
-- Performing Test HAVE_DECIMAL_POINT - Success
-- Found Python3: /Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.8/bin/python3.8 (found version "3.8.9") found components: Interpreter 
-- Configuring done
-- Generating done
CMake Warning:
  Manually-specified variables were not used by the project:

    CMAKE_C_COMPILER

-- Build files have been written to: /Users/***/Documents/projects/ForDrogon/third_party/jsoncpp/build

sodu make:

[  5%] Building CXX object src/lib_json/CMakeFiles/jsoncpp_lib.dir/json_reader.cpp.o
[ 11%] Building CXX object src/lib_json/CMakeFiles/jsoncpp_lib.dir/json_value.cpp.o
[ 17%] Building CXX object src/lib_json/CMakeFiles/jsoncpp_lib.dir/json_writer.cpp.o
[ 23%] Linking CXX shared library ../../lib/libjsoncpp.dylib
[ 23%] Built target jsoncpp_lib
[ 29%] Building CXX object src/lib_json/CMakeFiles/jsoncpp_static.dir/json_reader.cpp.o
[ 35%] Building CXX object src/lib_json/CMakeFiles/jsoncpp_static.dir/json_value.cpp.o
[ 41%] Building CXX object src/lib_json/CMakeFiles/jsoncpp_static.dir/json_writer.cpp.o
[ 47%] Linking CXX static library ../../lib/libjsoncpp.a
[ 47%] Built target jsoncpp_static
[ 52%] Building CXX object src/lib_json/CMakeFiles/jsoncpp_object.dir/json_reader.cpp.o
[ 58%] Building CXX object src/lib_json/CMakeFiles/jsoncpp_object.dir/json_value.cpp.o
[ 64%] Building CXX object src/lib_json/CMakeFiles/jsoncpp_object.dir/json_writer.cpp.o
[ 64%] Built target jsoncpp_object
[ 70%] Building CXX object src/jsontestrunner/CMakeFiles/jsontestrunner_exe.dir/main.cpp.o
[ 76%] Linking CXX executable ../../bin/jsontestrunner_exe
[ 76%] Built target jsontestrunner_exe
[ 82%] Building CXX object src/test_lib_json/CMakeFiles/jsoncpp_test.dir/jsontest.cpp.o
[ 88%] Building CXX object src/test_lib_json/CMakeFiles/jsoncpp_test.dir/fuzz.cpp.o
[ 94%] Building CXX object src/test_lib_json/CMakeFiles/jsoncpp_test.dir/main.cpp.o
[100%] Linking CXX executable ../../bin/jsoncpp_test
Testing ValueTest/checkNormalizeFloatingPointStr: OK
Testing ValueTest/memberCount: OK
Testing ValueTest/objects: OK
Testing ValueTest/arrays: OK
Testing ValueTest/resizeArray: OK
Testing ValueTest/resizePopulatesAllMissingElements: OK
Testing ValueTest/getArrayValue: OK
Testing ValueTest/arrayIssue252: OK
Testing ValueTest/arrayInsertAtRandomIndex: OK
Testing ValueTest/null: OK
Testing ValueTest/strings: OK
Testing ValueTest/bools: OK
Testing ValueTest/integers: OK
Testing ValueTest/nonIntegers: OK
Testing ValueTest/compareNull: OK
Testing ValueTest/compareInt: OK
Testing ValueTest/compareUInt: OK
Testing ValueTest/compareDouble: OK
Testing ValueTest/compareString: OK
Testing ValueTest/compareBoolean: OK
Testing ValueTest/compareArray: OK
Testing ValueTest/compareObject: OK
Testing ValueTest/compareType: OK
Testing ValueTest/CopyObject: OK
Testing ValueTest/typeChecksThrowExceptions: OK
Testing ValueTest/offsetAccessors: OK
Testing ValueTest/StaticString: OK
Testing ValueTest/WideString: OK
Testing ValueTest/CommentBefore: OK
Testing ValueTest/zeroes: OK
Testing ValueTest/zeroesInKeys: OK
Testing ValueTest/specialFloats: OK
Testing ValueTest/precision: OK
Testing ValueTest/searchValueByPath: OK
Testing FastWriterTest/dropNullPlaceholders: OK
Testing FastWriterTest/enableYAMLCompatibility: OK
Testing FastWriterTest/omitEndingLineFeed: OK
Testing FastWriterTest/writeNumericValue: OK
Testing FastWriterTest/writeArrays: OK
Testing FastWriterTest/writeNestedObjects: OK
Testing StyledWriterTest/writeNumericValue: OK
Testing StyledWriterTest/writeArrays: OK
Testing StyledWriterTest/writeNestedObjects: OK
Testing StyledWriterTest/multiLineArray: OK
Testing StyledWriterTest/writeValueWithComment: OK
Testing StyledStreamWriterTest/writeNumericValue: OK
Testing StyledStreamWriterTest/writeArrays: OK
Testing StyledStreamWriterTest/writeNestedObjects: OK
Testing StyledStreamWriterTest/multiLineArray: OK
Testing StyledStreamWriterTest/writeValueWithComment: OK
Testing StreamWriterTest/writeNumericValue: OK
Testing StreamWriterTest/writeArrays: OK
Testing StreamWriterTest/writeNestedObjects: OK
Testing StreamWriterTest/multiLineArray: OK
Testing StreamWriterTest/dropNullPlaceholders: OK
Testing StreamWriterTest/enableYAMLCompatibility: OK
Testing StreamWriterTest/indentation: OK
Testing StreamWriterTest/writeZeroes: OK
Testing StreamWriterTest/unicode: OK
Testing StreamWriterTest/escapeControlCharacters: OK
Testing ReaderTest/parseWithNoErrors: OK
Testing ReaderTest/parseObject: OK
Testing ReaderTest/parseArray: OK
Testing ReaderTest/parseString: OK
Testing ReaderTest/parseComment: OK
Testing ReaderTest/streamParseWithNoErrors: OK
Testing ReaderTest/parseWithNoErrorsTestingOffsets: OK
Testing ReaderTest/parseWithOneError: OK
Testing ReaderTest/parseSpecialFloat: OK
Testing ReaderTest/strictModeParseNumber: OK
Testing ReaderTest/parseChineseWithOneError: OK
Testing ReaderTest/parseWithDetailError: OK
Testing ReaderTest/pushErrorTest: OK
Testing ReaderTest/allowNumericKeysTest: OK
Testing CharReaderTest/parseWithNoErrors: OK
Testing CharReaderTest/parseWithNoErrorsTestingOffsets: OK
Testing CharReaderTest/parseNumber: OK
Testing CharReaderTest/parseString: OK
Testing CharReaderTest/parseComment: OK
Testing CharReaderTest/parseObjectWithErrors: OK
Testing CharReaderTest/parseArrayWithErrors: OK
Testing CharReaderTest/parseWithOneError: OK
Testing CharReaderTest/parseChineseWithOneError: OK
Testing CharReaderTest/parseWithDetailError: OK
Testing CharReaderTest/parseWithStackLimit: OK
Testing CharReaderTest/testOperator: OK
Testing CharReaderStrictModeTest/dupKeys: OK
Testing CharReaderFailIfExtraTest/issue164: OK
Testing CharReaderFailIfExtraTest/issue107: OK
Testing CharReaderFailIfExtraTest/commentAfterObject: OK
Testing CharReaderFailIfExtraTest/commentAfterArray: OK
Testing CharReaderFailIfExtraTest/commentAfterBool: OK
Testing CharReaderFailIfExtraTest/parseComment: OK
Testing CharReaderAllowDropNullTest/issue178: OK
Testing CharReaderAllowNumericKeysTest/allowNumericKeys: OK
Testing CharReaderAllowSingleQuotesTest/issue182: OK
Testing CharReaderAllowZeroesTest/issue176: OK
Testing CharReaderAllowSpecialFloatsTest/specialFloat: OK
Testing CharReaderAllowSpecialFloatsTest/issue209: OK
Testing EscapeSequenceTest/readerParseEscapeSequence: OK
Testing EscapeSequenceTest/charReaderParseEscapeSequence: OK
Testing EscapeSequenceTest/writeEscapeSequence: OK
Testing BuilderTest/settings: OK
Testing BomTest/skipBom: OK
Testing BomTest/notSkipBom: OK
Testing IteratorTest/convert: OK
Testing IteratorTest/decrement: OK
Testing IteratorTest/reverseIterator: OK
Testing IteratorTest/distance: OK
Testing IteratorTest/nullValues: OK
Testing IteratorTest/staticStringKey: OK
Testing IteratorTest/names: OK
Testing IteratorTest/indexes: OK
Testing IteratorTest/constness: OK
Testing RValueTest/moveConstruction: OK
Testing FuzzTest/fuzzDoesntCrash: OK
Testing MemberTemplateAs/BehavesSameAsNamedAs: OK
Testing MemberTemplateIs/BehavesSameAsNamedIs: OK
Testing VersionTest/VersionNumbersMatch: OK
All 119 tests passed
[100%] Built target jsoncpp_test

sudo make install:

Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/pkgconfig/jsoncpp.pc
-- Installing: /usr/local/lib/cmake/jsoncpp/jsoncpp-targets.cmake
-- Installing: /usr/local/lib/cmake/jsoncpp/jsoncpp-targets-release.cmake
-- Installing: /usr/local/lib/cmake/jsoncpp/jsoncppConfigVersion.cmake
-- Installing: /usr/local/lib/cmake/jsoncpp/jsoncppConfig.cmake
-- Installing: /usr/local/lib/cmake/jsoncpp/jsoncpp-namespaced-targets.cmake
-- Installing: /usr/local/lib/libjsoncpp.1.9.5.dylib
-- Installing: /usr/local/lib/libjsoncpp.25.dylib
-- Installing: /usr/local/lib/libjsoncpp.dylib
-- Installing: /usr/local/lib/libjsoncpp.a
-- Installing: /usr/local/lib/objects-Release/jsoncpp_object/json_reader.cpp.o
-- Installing: /usr/local/lib/objects-Release/jsoncpp_object/json_value.cpp.o
-- Installing: /usr/local/lib/objects-Release/jsoncpp_object/json_writer.cpp.o
-- Installing: /usr/local/include/json/allocator.h
-- Installing: /usr/local/include/json/assertions.h
-- Installing: /usr/local/include/json/config.h
-- Installing: /usr/local/include/json/forwards.h
-- Installing: /usr/local/include/json/json.h
-- Installing: /usr/local/include/json/json_features.h
-- Installing: /usr/local/include/json/reader.h
-- Installing: /usr/local/include/json/value.h
-- Installing: /usr/local/include/json/version.h
-- Installing: /usr/local/include/json/writer.h

Did i miss something?

hwc0919 commented 2 years ago

It should be an ABI issue. Jsoncpp is a c++ library, different compilers might have different ABI.

1111mp commented 2 years ago

Thank you very much. Finally compiled successfully, everything is normal. The failure of this problem ld: library not found for -ljsoncpp is entirely due to my own stupidity. There is such a low-level error in my CMakeLists.txt file:

target_link_libraries(${PROJECT_NAME} PRIVATE
  jsoncpp       //    ------>>>>>  I am not using the `find_package` command, oh gosh...
  drogon
  jwt-cpp
  bcrypt
  stduuid
  sodium
)

really really... thank you so much....

It has nothing to do with this issue from here, I just record the complete process:

The final solution is to use GCC to build and install jsoncpp from source.

  1. git clone https://github.com/open-source-parsers/jsoncppget the source code
  2. mkdir build & cd build
  3. sudo cmake .. -DCMAKE_CXX_COMPILER=g++-12
  4. sudo make & sudo make install

Then, everything should be fine.