Closed 1111mp closed 2 years ago
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.
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.
I built drogon from source(latest code from master branch):
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.
You should compile jsoncpp with gcc too.
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.
@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?
It should be an ABI issue. Jsoncpp is a c++ library, different compilers might have different ABI.
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.
git clone https://github.com/open-source-parsers/jsoncpp
get the source codemkdir build & cd build
sudo cmake .. -DCMAKE_CXX_COMPILER=g++-12
sudo make & sudo make install
Then, everything should be fine.
like this
I also tried the version:
GCC 12.1.0 aarch64-apple-darwin21
, still error.brew info gcc@12
:Log
:Error
:I desperately want to use c++20 coroutines, but GCC compilation keeps failing.