drogonframework / drogon

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

ld: library 'yaml-cpp' not found #2195

Open vzool opened 3 weeks ago

vzool commented 3 weeks ago

I can't build the source code.

Describe the bug

When I follow the steps in the docs, it failed to build.

build git:(master) ✗ make
[ 17%] Built target trantor
[ 54%] Built target drogon
[ 54%] Linking CXX executable client
ld: library 'yaml-cpp' not found
c++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [examples/client] Error 1
make[1]: *** [examples/CMakeFiles/client.dir/all] Error 2
make: *** [all] Error 2

I did install all dependancies. In fact, I installed yaml-cpp library by the following command brew install yaml-cpp

Even cmake said it found yaml-cpp

build git:(master) ✗ cmake -LAH ..
-- compiler: AppleClang
-- Trantor using SSL library: OpenSSL
-- c-ares found!
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Found std::filesystem
-- use c++20
-- jsoncpp version:1.9.4
-- yaml-cpp found 
-- Found UUID: /usr/local/lib/libuuid.dylib
-- Brotli found
-- Could NOT find PostgreSQL (missing: PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR) 
-- Could NOT find pg (missing: PG_LIBRARIES PG_INCLUDE_DIRS) 
-- MySql was not found.
-- Ok! We find sqlite3!
-- Could NOT find Hiredis (missing: HIREDIS_LIBRARY HIREDIS_INCLUDE_DIR) 
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/cmake.csp
-- view classname:cmake
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/config_json.csp
-- view classname:config_json
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/config_yaml.csp
-- view classname:config_yaml
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/demoMain.csp
-- view classname:demoMain
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/filter_cc.csp
-- view classname:filter_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/filter_h.csp
-- view classname:filter_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/gitignore.csp
-- view classname:gitignore
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/model_cc.csp
-- view classname:model_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/model_h.csp
-- view classname:model_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/model_json.csp
-- view classname:model_json
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/plugin_cc.csp
-- view classname:plugin_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/plugin_h.csp
-- view classname:plugin_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_base_cc.csp
-- view classname:restful_controller_base_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_base_h.csp
-- view classname:restful_controller_base_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_cc.csp
-- view classname:restful_controller_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_custom_cc.csp
-- view classname:restful_controller_custom_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_custom_h.csp
-- view classname:restful_controller_custom_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_h.csp
-- view classname:restful_controller_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/test_cmake.csp
-- view classname:test_cmake
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/test_main.csp
-- view classname:test_main
-- bin:bin
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Configuring done (2.6s)
-- Generating done (0.3s)
-- Build files have been written to: /Users/vzool/Workspace/drogon
-- Cache values
// Path to a library.
BROTLICOMMON_LIBRARY:FILEPATH=/usr/local/lib/libbrotlicommon.dylib

// Path to a library.
BROTLIDEC_LIBRARY:FILEPATH=/usr/local/lib/libbrotlidec.dylib

// Path to a library.
BROTLIENC_LIBRARY:FILEPATH=/usr/local/lib/libbrotlienc.dylib

// Path to a file.
BROTLI_INCLUDE_DIR:PATH=/usr/local/include

// Build Brotli
BUILD_BROTLI:BOOL=ON

// Build C-ARES
BUILD_C-ARES:BOOL=ON

// Build drogon_ctl
BUILD_CTL:BOOL=ON

// Build Doxygen documentation
BUILD_DOC:BOOL=OFF

// Build examples
BUILD_EXAMPLES:BOOL=ON

// Build with mysql support
BUILD_MYSQL:BOOL=ON

// Build orm
BUILD_ORM:BOOL=ON

// Build with postgresql support
BUILD_POSTGRESQL:BOOL=ON

// Build with redis support
BUILD_REDIS:BOOL=ON

// Build trantor as a shared lib
BUILD_SHARED_LIBS:BOOL=OFF

// Build with sqlite3 support
BUILD_SQLITE:BOOL=ON

// Build tests
BUILD_TESTING:BOOL=OFF

// Build yaml config
BUILD_YAML_CONFIG:BOOL=ON

// Path to a file.
C-ARES_INCLUDE_DIRS:PATH=/usr/local/include

// Path to a library.
C-ARES_LIBRARIES:FILEPATH=/usr/local/lib/libcares.dylib

// Path to a program.
CMAKE_ADDR2LINE:FILEPATH=CMAKE_ADDR2LINE-NOTFOUND

// Path to a program.
CMAKE_AR:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar

// Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel ...
CMAKE_BUILD_TYPE:STRING=

// Enable/Disable color output during build.
CMAKE_COLOR_MAKEFILE:BOOL=ON

// CXX compiler
CMAKE_CXX_COMPILER:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++

// Flags used by the CXX compiler during all build types.
CMAKE_CXX_FLAGS:STRING=

// Flags used by the CXX compiler during DEBUG builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g

// Flags used by the CXX compiler during MINSIZEREL builds.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

// Flags used by the CXX compiler during RELEASE builds.
CMAKE_CXX_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

// Flags used by the CXX compiler during RELWITHDEBINFO builds.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

// C compiler
CMAKE_C_COMPILER:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc

// Flags used by the C compiler during all build types.
CMAKE_C_FLAGS:STRING=

// Flags used by the C compiler during DEBUG builds.
CMAKE_C_FLAGS_DEBUG:STRING=-g

// Flags used by the C compiler during MINSIZEREL builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=-Os -DNDEBUG

// Flags used by the C compiler during RELEASE builds.
CMAKE_C_FLAGS_RELEASE:STRING=-O3 -DNDEBUG

// Flags used by the C compiler during RELWITHDEBINFO builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=-O2 -g -DNDEBUG

// Path to a program.
CMAKE_DLLTOOL:FILEPATH=CMAKE_DLLTOOL-NOTFOUND

// Flags used by the linker during all build types.
CMAKE_EXE_LINKER_FLAGS:STRING=

// Flags used by the linker during DEBUG builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=

// Flags used by the linker during MINSIZEREL builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=

// Flags used by the linker during RELEASE builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=

// Flags used by the linker during RELWITHDEBINFO builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

// Enable/Disable output of compile commands during generation.
CMAKE_EXPORT_COMPILE_COMMANDS:BOOL=

// User executables (bin)
CMAKE_INSTALL_BINDIR:PATH=bin

// Read-only architecture-independent data (DATAROOTDIR)
CMAKE_INSTALL_DATADIR:PATH=

// Read-only architecture-independent data root (share)
CMAKE_INSTALL_DATAROOTDIR:PATH=share

// Documentation root (DATAROOTDIR/doc/PROJECT_NAME)
CMAKE_INSTALL_DOCDIR:PATH=

// C header files (include)
CMAKE_INSTALL_INCLUDEDIR:PATH=include

// Info documentation (DATAROOTDIR/info)
CMAKE_INSTALL_INFODIR:PATH=

// Object code libraries (lib)
CMAKE_INSTALL_LIBDIR:PATH=lib

// Program executables (libexec)
CMAKE_INSTALL_LIBEXECDIR:PATH=libexec

// Locale-dependent data (DATAROOTDIR/locale)
CMAKE_INSTALL_LOCALEDIR:PATH=

// Modifiable single-machine data (var)
CMAKE_INSTALL_LOCALSTATEDIR:PATH=var

// Man documentation (DATAROOTDIR/man)
CMAKE_INSTALL_MANDIR:PATH=

// Path to a program.
CMAKE_INSTALL_NAME_TOOL:FILEPATH=/usr/bin/install_name_tool

// C header files for non-gcc (/usr/include)
CMAKE_INSTALL_OLDINCLUDEDIR:PATH=/usr/include

// Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=/usr/local

// Run-time variable data (LOCALSTATEDIR/run)
CMAKE_INSTALL_RUNSTATEDIR:PATH=

// System admin executables (sbin)
CMAKE_INSTALL_SBINDIR:PATH=sbin

// Modifiable architecture-independent data (com)
CMAKE_INSTALL_SHAREDSTATEDIR:PATH=com

// Read-only single-machine data (etc)
CMAKE_INSTALL_SYSCONFDIR:PATH=etc

// Path to a program.
CMAKE_LINKER:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld

// Path to a program.
CMAKE_MAKE_PROGRAM:FILEPATH=/usr/bin/make

// Flags used by the linker during the creation of modules during all build types.
CMAKE_MODULE_LINKER_FLAGS:STRING=

// Flags used by the linker during the creation of modules during DEBUG builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=

// Flags used by the linker during the creation of modules during MINSIZEREL builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=

// Flags used by the linker during the creation of modules during RELEASE builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=

// Flags used by the linker during the creation of modules during RELWITHDEBINFO builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=

// Path to a program.
CMAKE_NM:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/nm

// Path to a program.
CMAKE_OBJCOPY:FILEPATH=CMAKE_OBJCOPY-NOTFOUND

// Path to a program.
CMAKE_OBJDUMP:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/objdump

// Build architectures for OSX
CMAKE_OSX_ARCHITECTURES:STRING=

// Minimum OS X version to target for deployment (at runtime); newer APIs weak linked. Set to empty string for default value.
CMAKE_OSX_DEPLOYMENT_TARGET:STRING=

// The product will be built against the headers and libraries located inside the indicated SDK.
CMAKE_OSX_SYSROOT:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk

// Path to a program.
CMAKE_RANLIB:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib

// Path to a program.
CMAKE_READELF:FILEPATH=CMAKE_READELF-NOTFOUND

// Flags used by the linker during the creation of shared libraries during all build types.
CMAKE_SHARED_LINKER_FLAGS:STRING=

// Flags used by the linker during the creation of shared libraries during DEBUG builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=

// Flags used by the linker during the creation of shared libraries during MINSIZEREL builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=

// Flags used by the linker during the creation of shared libraries during RELEASE builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=

// Flags used by the linker during the creation of shared libraries during RELWITHDEBINFO builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=

// If set, runtime paths are not added when installing shared libraries, but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO

// If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=NO

// Flags used by the linker during the creation of static libraries during all build types.
CMAKE_STATIC_LINKER_FLAGS:STRING=

// Flags used by the linker during the creation of static libraries during DEBUG builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=

// Flags used by the linker during the creation of static libraries during MINSIZEREL builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=

// Flags used by the linker during the creation of static libraries during RELEASE builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=

// Flags used by the linker during the creation of static libraries during RELWITHDEBINFO builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=

// Path to a program.
CMAKE_STRIP:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip

// Path to a program.
CMAKE_TAPI:FILEPATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/tapi

// If this value is on, makefiles will be generated without the .SILENT directive, and all commands will be echoed to the console during the make.  This is useful for debugging only. With Visual Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE

// Use coz for profiling
COZ_PROFILING:BOOL=OFF

// Enable to build OSX bundles
CPACK_BINARY_BUNDLE:BOOL=OFF

// Enable to build Debian packages
CPACK_BINARY_DEB:BOOL=OFF

// Enable to build OSX Drag And Drop package
CPACK_BINARY_DRAGNDROP:BOOL=OFF

// Enable to build FreeBSD packages
CPACK_BINARY_FREEBSD:BOOL=OFF

// Enable to build IFW packages
CPACK_BINARY_IFW:BOOL=OFF

// Enable to build NSIS packages
CPACK_BINARY_NSIS:BOOL=OFF

// Enable to build productbuild packages
CPACK_BINARY_PRODUCTBUILD:BOOL=OFF

// Enable to build RPM packages
CPACK_BINARY_RPM:BOOL=OFF

// Enable to build STGZ packages
CPACK_BINARY_STGZ:BOOL=ON

// Enable to build TBZ2 packages
CPACK_BINARY_TBZ2:BOOL=OFF

// Enable to build TGZ packages
CPACK_BINARY_TGZ:BOOL=ON

// Enable to build TXZ packages
CPACK_BINARY_TXZ:BOOL=OFF

// Enable to build RPM source packages
CPACK_SOURCE_RPM:BOOL=OFF

// Enable to build TBZ2 source packages
CPACK_SOURCE_TBZ2:BOOL=ON

// Enable to build TGZ source packages
CPACK_SOURCE_TGZ:BOOL=ON

// Enable to build TXZ source packages
CPACK_SOURCE_TXZ:BOOL=ON

// Enable to build TZ source packages
CPACK_SOURCE_TZ:BOOL=ON

// Enable to build ZIP source packages
CPACK_SOURCE_ZIP:BOOL=OFF

// TRUE if we have the C++ filesystem headers
CXX_FILESYSTEM_HAVE_FS:BOOL=TRUE

// The header that should be included to obtain the filesystem APIs
CXX_FILESYSTEM_HEADER:STRING=filesystem

// TRUE if the C++ filesystem library is the experimental version
CXX_FILESYSTEM_IS_EXPERIMENTAL:BOOL=FALSE

// The C++ namespace that contains the filesystem APIs
CXX_FILESYSTEM_NAMESPACE:STRING=std::filesystem

// Diagram Editor tool for use with Doxygen
DOXYGEN_DIA_EXECUTABLE:FILEPATH=DOXYGEN_DIA_EXECUTABLE-NOTFOUND

// Dot tool for use with Doxygen
DOXYGEN_DOT_EXECUTABLE:FILEPATH=/usr/local/bin/dot

// Doxygen documentation generation tool (https://www.doxygen.nl)
DOXYGEN_EXECUTABLE:FILEPATH=DOXYGEN_EXECUTABLE-NOTFOUND

// TRUE if we can run a program using std::filesystem
Filesystem_FOUND:BOOL=TRUE

// use std::filesystem
HAS_STD_FILESYSTEM_PATH:BOOL=ON

// Path to a file.
HIREDIS_INCLUDE_DIR:PATH=HIREDIS_INCLUDE_DIR-NOTFOUND

// Path to a library.
HIREDIS_LIBRARY:FILEPATH=HIREDIS_LIBRARY-NOTFOUND

// Installation directory for executables
INSTALL_BIN_DIR:PATH=bin

// Installation directory for cmake files
INSTALL_DROGON_CMAKE_DIR:PATH=lib/cmake/Drogon

// Installation directory for header files
INSTALL_INCLUDE_DIR:PATH=include

// Installation directory for libraries
INSTALL_LIB_DIR:PATH=lib

// Installation directory for cmake files
INSTALL_TRANTOR_CMAKE_DIR:PATH=lib/cmake/Trantor

// jsoncpp include dir
JSONCPP_INCLUDE_DIRS:PATH=/usr/local/include

// jsoncpp library
JSONCPP_LIBRARIES:FILEPATH=/usr/local/lib/libjsoncpp.dylib

// Use batch mode for libpq
LIBPQ_BATCH_MODE:BOOL=ON

// Path to a file.
MARIADB_INCLUDE_DIRS:PATH=/usr/local/include/mysql

// Path to a file.
MYSQL_INCLUDE_DIRS:PATH=/usr/local/include/mysql

// Path to a library.
MYSQL_LIBRARIES:FILEPATH=MYSQL_LIBRARIES-NOTFOUND

// Path to a library.
OPENSSL_CRYPTO_LIBRARY:FILEPATH=/usr/local/lib/libcrypto.dylib

// Path to a file.
OPENSSL_INCLUDE_DIR:PATH=/usr/local/include

// Path to a library.
OPENSSL_SSL_LIBRARY:FILEPATH=/opt/local/lib/libssl.dylib

// Arguments to supply to pkg-config
PKG_CONFIG_ARGN:STRING=

// pkg-config executable
PKG_CONFIG_EXECUTABLE:FILEPATH=/usr/local/bin/pkg-config

// The Set the PostgreSQL_INCLUDE_DIR cmake cache entry to the top-level directory containing the PostgreSQL include directories. E.g /usr/local/include/PostgreSQL/8.4 or C:/Program Files/PostgreSQL/8.4/include
PostgreSQL_INCLUDE_DIR:PATH=PostgreSQL_INCLUDE_DIR-NOTFOUND

// The Set the PostgreSQL_LIBRARY_DIR cmake cache entry to the top-level directory containing the PostgreSQL libraries.
PostgreSQL_LIBRARY_DEBUG:FILEPATH=PostgreSQL_LIBRARY_DEBUG-NOTFOUND

// The Set the PostgreSQL_LIBRARY_DIR cmake cache entry to the top-level directory containing the PostgreSQL libraries.
PostgreSQL_LIBRARY_RELEASE:FILEPATH=PostgreSQL_LIBRARY_RELEASE-NOTFOUND

// The Set the PostgreSQL_INCLUDE_DIR cmake cache entry to the top-level directory containing the PostgreSQL include directories. E.g /usr/local/include/PostgreSQL/8.4 or C:/Program Files/PostgreSQL/8.4/include
PostgreSQL_TYPE_INCLUDE_DIR:PATH=PostgreSQL_TYPE_INCLUDE_DIR-NOTFOUND

// Path to a file.
SQLITE3_INCLUDE_DIRS:PATH=/Library/Frameworks/Mono.framework/Headers

// Path to a library.
SQLITE3_LIBRARIES:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/lib/libsqlite3.tbd

// TLS provider for trantor. Valid options are 'openssl', 'botan' or '' (let the build scripr decide)
TRANTOR_USE_TLS:BOOL=OFF

// Enable C++20 coroutine support
USE_COROUTINE:BOOL=ON

// Disable Mysql
USE_MYSQL:BOOL=OFF

// Disable PostgreSQL
USE_POSTGRESQL:BOOL=OFF

// Allow using the spdlog logging library
USE_SPDLOG:BOOL=OFF

// Enable Sqlite3
USE_SQLITE3:BOOL=ON

// Use only static libraries as dependencies
USE_STATIC_LIBS_ONLY:BOOL=OFF

// Use trantor as a submodule
USE_SUBMODULE:BOOL=ON

// Path to a file.
UUID_INCLUDE_DIR:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/uuid

// Path to a library.
UUID_LIBRARY:FILEPATH=/usr/local/lib/libuuid.dylib

// Path to a library.
UUID_LIBRARY_DEBUG:FILEPATH=UUID_LIBRARY_DEBUG-NOTFOUND

// Path to a file.
ZLIB_INCLUDE_DIR:PATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include

// Path to a library.
ZLIB_LIBRARY_DEBUG:FILEPATH=ZLIB_LIBRARY_DEBUG-NOTFOUND

// Path to a library.
ZLIB_LIBRARY_RELEASE:FILEPATH=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/lib/libz.tbd

// The directory containing a CMake configuration file for unofficial-libmariadb.
unofficial-libmariadb_DIR:PATH=unofficial-libmariadb_DIR-NOTFOUND

// The directory containing a CMake configuration file for unofficial-sqlite3.
unofficial-sqlite3_DIR:PATH=unofficial-sqlite3_DIR-NOTFOUND

// The directory containing a CMake configuration file for yaml-cpp.
yaml-cpp_DIR:PATH=/Users/vzool/miniconda3/lib/cmake/yaml-cpp

Desktop (please complete the following information):

Any suggestions?

nqf commented 3 weeks ago

If you don't use YAML CPP, you can turn it off,-DBUILD_YAML_CONFIG=OFF

vzool commented 3 weeks ago

I did the following

➜  build git:(master) ✗ make clean
➜  build git:(master) ✗ cmake .. -DBUILD_YAML_CONFIG=OFF
-- compiler: AppleClang
-- Trantor using SSL library: OpenSSL
-- c-ares found!
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Found std::filesystem
-- use c++20
-- jsoncpp version:1.9.4
-- yaml-cpp not used
-- Found UUID: /usr/local/lib/libuuid.dylib
-- Brotli found
-- Could NOT find PostgreSQL (missing: PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR) 
-- Could NOT find pg (missing: PG_LIBRARIES PG_INCLUDE_DIRS) 
-- MySql was not found.
-- Ok! We find sqlite3!
-- Could NOT find Hiredis (missing: HIREDIS_LIBRARY HIREDIS_INCLUDE_DIR) 
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/cmake.csp
-- view classname:cmake
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/config_json.csp
-- view classname:config_json
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/config_yaml.csp
-- view classname:config_yaml
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/demoMain.csp
-- view classname:demoMain
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/filter_cc.csp
-- view classname:filter_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/filter_h.csp
-- view classname:filter_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/gitignore.csp
-- view classname:gitignore
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/model_cc.csp
-- view classname:model_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/model_h.csp
-- view classname:model_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/model_json.csp
-- view classname:model_json
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/plugin_cc.csp
-- view classname:plugin_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/plugin_h.csp
-- view classname:plugin_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_base_cc.csp
-- view classname:restful_controller_base_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_base_h.csp
-- view classname:restful_controller_base_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_cc.csp
-- view classname:restful_controller_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_custom_cc.csp
-- view classname:restful_controller_custom_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_custom_h.csp
-- view classname:restful_controller_custom_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_h.csp
-- view classname:restful_controller_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/test_cmake.csp
-- view classname:test_cmake
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/test_main.csp
-- view classname:test_main
-- bin:bin
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Configuring done (2.1s)
-- Generating done (0.2s)
-- Build files have been written to: /Users/vzool/Workspace/drogon

Then

➜  build git:(master) ✗ make                            
[  1%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/AsyncFileLogger.cc.o
[  1%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/ConcurrentTaskQueue.cc.o
[  2%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/Date.cc.o
[  2%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/LogStream.cc.o
[  2%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/Logger.cc.o
[  3%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/MsgBuffer.cc.o
[  3%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/SerialTaskQueue.cc.o
[  4%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/TimingWheel.cc.o
[  4%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/Utilities.cc.o
[  5%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/EventLoop.cc.o
[  5%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/EventLoopThread.cc.o
[  6%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/EventLoopThreadPool.cc.o
[  6%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/InetAddress.cc.o
[  7%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/TcpClient.cc.o
[  7%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/TcpServer.cc.o
[  8%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/Channel.cc.o
[  8%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/Acceptor.cc.o
[  9%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/Connector.cc.o
[  9%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/Poller.cc.o
[ 10%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/Socket.cc.o
[ 10%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/MemBufferNode.cc.o
[ 11%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/StreamBufferNode.cc.o
[ 11%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/AsyncStreamBufferNode.cc.o
[ 12%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/TcpConnectionImpl.cc.o
[ 12%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/Timer.cc.o
[ 13%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/TimerQueue.cc.o
[ 13%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/poller/EpollPoller.cc.o
[ 14%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/poller/KQueue.cc.o
[ 14%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/poller/PollPoller.cc.o
[ 15%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/FileBufferNodeUnix.cc.o
[ 15%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/tlsprovider/OpenSSLProvider.cc.o
[ 16%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/crypto/openssl.cc.o
[ 16%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/AresResolver.cc.o
[ 17%] Linking CXX static library libtrantor.a
[ 17%] Built target trantor
[ 18%] Building CXX object CMakeFiles/drogon.dir/lib/src/AOPAdvice.cc.o
[ 18%] Building CXX object CMakeFiles/drogon.dir/lib/src/AccessLogger.cc.o
[ 19%] Building CXX object CMakeFiles/drogon.dir/lib/src/CacheFile.cc.o
[ 19%] Building CXX object CMakeFiles/drogon.dir/lib/src/ConfigAdapterManager.cc.o
[ 20%] Building CXX object CMakeFiles/drogon.dir/lib/src/ConfigLoader.cc.o
[ 20%] Building CXX object CMakeFiles/drogon.dir/lib/src/Cookie.cc.o
[ 21%] Building CXX object CMakeFiles/drogon.dir/lib/src/DrClassMap.cc.o
[ 21%] Building CXX object CMakeFiles/drogon.dir/lib/src/DrTemplateBase.cc.o
[ 22%] Building CXX object CMakeFiles/drogon.dir/lib/src/MiddlewaresFunction.cc.o
[ 22%] Building CXX object CMakeFiles/drogon.dir/lib/src/FixedWindowRateLimiter.cc.o
[ 23%] Building CXX object CMakeFiles/drogon.dir/lib/src/GlobalFilters.cc.o
[ 23%] Building CXX object CMakeFiles/drogon.dir/lib/src/Histogram.cc.o
[ 24%] Building CXX object CMakeFiles/drogon.dir/lib/src/Hodor.cc.o
[ 24%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpAppFrameworkImpl.cc.o
[ 25%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpBinder.cc.o
[ 25%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpClientImpl.cc.o
[ 26%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpConnectionLimit.cc.o
[ 26%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpControllerBinder.cc.o
[ 27%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpControllersRouter.cc.o
[ 27%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpFileImpl.cc.o
[ 27%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpFileUploadRequest.cc.o
[ 28%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpRequestImpl.cc.o
[ 28%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpRequestParser.cc.o
[ 29%] Building CXX object CMakeFiles/drogon.dir/lib/src/RequestStream.cc.o
[ 29%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpResponseImpl.cc.o
[ 30%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpResponseParser.cc.o
[ 30%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpServer.cc.o
[ 31%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpUtils.cc.o
/Users/vzool/Workspace/drogon/lib/src/HttpUtils.cc:62:10: warning: 'CT_APPLICATION_X_JAVASCRIPT' is deprecated: use CT_TEXT_JAVASCRIPT [-Wdeprecated-declarations]
   62 |         {CT_APPLICATION_X_JAVASCRIPT,
      |          ^
/Users/vzool/Workspace/drogon/lib/inc/drogon/HttpTypes.h:106:35: note: 'CT_APPLICATION_X_JAVASCRIPT' has been explicitly marked deprecated here
  106 |     CT_APPLICATION_X_JAVASCRIPT [[deprecated("use CT_TEXT_JAVASCRIPT")]],
      |                                   ^
/Users/vzool/Workspace/drogon/lib/src/HttpUtils.cc:733:23: warning: 'CT_APPLICATION_X_JAVASCRIPT' is deprecated: use CT_TEXT_JAVASCRIPT [-Wdeprecated-declarations]
  733 |         extensionMap_[CT_APPLICATION_X_JAVASCRIPT] =
      |                       ^
/Users/vzool/Workspace/drogon/lib/inc/drogon/HttpTypes.h:106:35: note: 'CT_APPLICATION_X_JAVASCRIPT' has been explicitly marked deprecated here
  106 |     CT_APPLICATION_X_JAVASCRIPT [[deprecated("use CT_TEXT_JAVASCRIPT")]],
      |                                   ^
2 warnings generated.
[ 31%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpViewData.cc.o
[ 32%] Building CXX object CMakeFiles/drogon.dir/lib/src/IntranetIpFilter.cc.o
[ 32%] Building CXX object CMakeFiles/drogon.dir/lib/src/JsonConfigAdapter.cc.o
[ 33%] Building CXX object CMakeFiles/drogon.dir/lib/src/ListenerManager.cc.o
[ 33%] Building CXX object CMakeFiles/drogon.dir/lib/src/LocalHostFilter.cc.o
[ 34%] Building CXX object CMakeFiles/drogon.dir/lib/src/MultiPart.cc.o
[ 34%] Building CXX object CMakeFiles/drogon.dir/lib/src/MultipartStreamParser.cc.o
[ 35%] Building CXX object CMakeFiles/drogon.dir/lib/src/NotFound.cc.o
[ 35%] Building CXX object CMakeFiles/drogon.dir/lib/src/PluginsManager.cc.o
[ 36%] Building CXX object CMakeFiles/drogon.dir/lib/src/PromExporter.cc.o
[ 36%] Building CXX object CMakeFiles/drogon.dir/lib/src/RangeParser.cc.o
[ 37%] Building CXX object CMakeFiles/drogon.dir/lib/src/RateLimiter.cc.o
[ 37%] Building CXX object CMakeFiles/drogon.dir/lib/src/RealIpResolver.cc.o
[ 38%] Building CXX object CMakeFiles/drogon.dir/lib/src/SecureSSLRedirector.cc.o
[ 38%] Building CXX object CMakeFiles/drogon.dir/lib/src/Redirector.cc.o
[ 39%] Building CXX object CMakeFiles/drogon.dir/lib/src/SessionManager.cc.o
[ 39%] Building CXX object CMakeFiles/drogon.dir/lib/src/SlashRemover.cc.o
[ 40%] Building CXX object CMakeFiles/drogon.dir/lib/src/SlidingWindowRateLimiter.cc.o
[ 40%] Building CXX object CMakeFiles/drogon.dir/lib/src/StaticFileRouter.cc.o
[ 41%] Building CXX object CMakeFiles/drogon.dir/lib/src/TaskTimeoutFlag.cc.o
[ 41%] Building CXX object CMakeFiles/drogon.dir/lib/src/TokenBucketRateLimiter.cc.o
[ 42%] Building CXX object CMakeFiles/drogon.dir/lib/src/Utilities.cc.o
[ 42%] Building CXX object CMakeFiles/drogon.dir/lib/src/WebSocketClientImpl.cc.o
[ 43%] Building CXX object CMakeFiles/drogon.dir/lib/src/WebSocketConnectionImpl.cc.o
[ 43%] Building CXX object CMakeFiles/drogon.dir/lib/src/YamlConfigAdapter.cc.o
[ 44%] Building CXX object CMakeFiles/drogon.dir/lib/src/drogon_test.cc.o
[ 44%] Building CXX object CMakeFiles/drogon.dir/lib/src/SharedLibManager.cc.o
[ 44%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/sqlite3_impl/Sqlite3Connection.cc.o
[ 45%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/sqlite3_impl/Sqlite3ResultImpl.cc.o
[ 45%] Building CXX object CMakeFiles/drogon.dir/lib/src/RedisClientSkipped.cc.o
[ 46%] Building CXX object CMakeFiles/drogon.dir/lib/src/RedisResultSkipped.cc.o
[ 46%] Building CXX object CMakeFiles/drogon.dir/lib/src/RedisClientManagerSkipped.cc.o
[ 47%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/ArrayParser.cc.o
[ 47%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/Criteria.cc.o
[ 48%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/DbClient.cc.o
[ 48%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/DbClientImpl.cc.o
[ 49%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/DbClientLockFree.cc.o
[ 49%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/DbConnection.cc.o
[ 50%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/DbListener.cc.o
[ 50%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/Exception.cc.o
[ 51%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/Field.cc.o
[ 51%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/Result.cc.o
[ 52%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/Row.cc.o
[ 52%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/SqlBinder.cc.o
[ 53%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/TransactionImpl.cc.o
[ 53%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/RestfulController.cc.o
[ 54%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/DbClientManager.cc.o
[ 54%] Linking CXX static library libdrogon.a
[ 54%] Built target drogon
[ 55%] Building CXX object examples/CMakeFiles/client.dir/client_example/main.cc.o
[ 55%] Linking CXX executable client
ld: library 'yaml-cpp' not found
c++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [examples/client] Error 1
make[1]: *** [examples/CMakeFiles/client.dir/all] Error 2
make: *** [all] Error 2

What I did wrong?

vzool commented 3 weeks ago

I deleted build directory then made these following commands:

➜  drogon git:(master) ✗ rm -rf build                   
➜  drogon git:(master) ✗ cmake . -DBUILD_YAML_CONFIG=OFF
-- compiler: AppleClang
-- Trantor using SSL library: OpenSSL
-- c-ares found!
-- Found std::filesystem
-- use c++20
-- jsoncpp version:1.9.4
-- yaml-cpp not used
-- Found UUID: /usr/local/lib/libuuid.dylib
-- Brotli found
-- Could NOT find PostgreSQL (missing: PostgreSQL_LIBRARY PostgreSQL_INCLUDE_DIR) 
-- Could NOT find pg (missing: PG_LIBRARIES PG_INCLUDE_DIRS) 
-- MySql was not found.
-- Ok! We find sqlite3!
-- Could NOT find Hiredis (missing: HIREDIS_LIBRARY HIREDIS_INCLUDE_DIR) 
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/cmake.csp
-- view classname:cmake
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/config_json.csp
-- view classname:config_json
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/config_yaml.csp
-- view classname:config_yaml
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/demoMain.csp
-- view classname:demoMain
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/filter_cc.csp
-- view classname:filter_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/filter_h.csp
-- view classname:filter_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/gitignore.csp
-- view classname:gitignore
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/model_cc.csp
-- view classname:model_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/model_h.csp
-- view classname:model_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/model_json.csp
-- view classname:model_json
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/plugin_cc.csp
-- view classname:plugin_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/plugin_h.csp
-- view classname:plugin_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_base_cc.csp
-- view classname:restful_controller_base_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_base_h.csp
-- view classname:restful_controller_base_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_cc.csp
-- view classname:restful_controller_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_custom_cc.csp
-- view classname:restful_controller_custom_cc
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_custom_h.csp
-- view classname:restful_controller_custom_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/restful_controller_h.csp
-- view classname:restful_controller_h
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/test_cmake.csp
-- view classname:test_cmake
-- cspFile:/Users/vzool/Workspace/drogon/drogon_ctl/templates/test_main.csp
-- view classname:test_main
-- bin:bin
-- Configuring done (2.1s)
-- Generating done (0.2s)
-- Build files have been written to: /Users/vzool/Workspace/drogon
➜  drogon git:(master) ✗ make clean                     
➜  drogon git:(master) ✗ make      
[  1%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/AsyncFileLogger.cc.o
[  1%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/ConcurrentTaskQueue.cc.o
[  2%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/Date.cc.o
[  2%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/LogStream.cc.o
[  3%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/Logger.cc.o
[  3%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/MsgBuffer.cc.o
[  4%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/SerialTaskQueue.cc.o
[  4%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/TimingWheel.cc.o
[  5%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/Utilities.cc.o
[  5%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/EventLoop.cc.o
[  6%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/EventLoopThread.cc.o
[  6%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/EventLoopThreadPool.cc.o
[  6%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/InetAddress.cc.o
[  7%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/TcpClient.cc.o
[  7%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/TcpServer.cc.o
[  8%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/Channel.cc.o
[  8%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/Acceptor.cc.o
[  9%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/Connector.cc.o
[  9%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/Poller.cc.o
[ 10%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/Socket.cc.o
[ 10%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/MemBufferNode.cc.o
[ 11%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/StreamBufferNode.cc.o
[ 11%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/AsyncStreamBufferNode.cc.o
[ 12%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/TcpConnectionImpl.cc.o
[ 12%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/Timer.cc.o
[ 13%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/TimerQueue.cc.o
[ 13%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/poller/EpollPoller.cc.o
[ 14%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/poller/KQueue.cc.o
[ 14%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/poller/PollPoller.cc.o
[ 15%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/FileBufferNodeUnix.cc.o
[ 15%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/tlsprovider/OpenSSLProvider.cc.o
[ 16%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/utils/crypto/openssl.cc.o
[ 16%] Building CXX object trantor/CMakeFiles/trantor.dir/trantor/net/inner/AresResolver.cc.o
[ 17%] Linking CXX static library libtrantor.a
[ 17%] Built target trantor
[ 18%] Building CXX object CMakeFiles/drogon.dir/lib/src/AOPAdvice.cc.o
[ 18%] Building CXX object CMakeFiles/drogon.dir/lib/src/AccessLogger.cc.o
[ 19%] Building CXX object CMakeFiles/drogon.dir/lib/src/CacheFile.cc.o
[ 19%] Building CXX object CMakeFiles/drogon.dir/lib/src/ConfigAdapterManager.cc.o
[ 20%] Building CXX object CMakeFiles/drogon.dir/lib/src/ConfigLoader.cc.o
[ 20%] Building CXX object CMakeFiles/drogon.dir/lib/src/Cookie.cc.o
[ 21%] Building CXX object CMakeFiles/drogon.dir/lib/src/DrClassMap.cc.o
[ 21%] Building CXX object CMakeFiles/drogon.dir/lib/src/DrTemplateBase.cc.o
[ 22%] Building CXX object CMakeFiles/drogon.dir/lib/src/MiddlewaresFunction.cc.o
[ 22%] Building CXX object CMakeFiles/drogon.dir/lib/src/FixedWindowRateLimiter.cc.o
[ 22%] Building CXX object CMakeFiles/drogon.dir/lib/src/GlobalFilters.cc.o
[ 23%] Building CXX object CMakeFiles/drogon.dir/lib/src/Histogram.cc.o
[ 23%] Building CXX object CMakeFiles/drogon.dir/lib/src/Hodor.cc.o
[ 24%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpAppFrameworkImpl.cc.o
[ 24%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpBinder.cc.o
[ 25%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpClientImpl.cc.o
[ 25%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpConnectionLimit.cc.o
[ 26%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpControllerBinder.cc.o
[ 26%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpControllersRouter.cc.o
[ 27%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpFileImpl.cc.o
[ 27%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpFileUploadRequest.cc.o
[ 28%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpRequestImpl.cc.o
[ 28%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpRequestParser.cc.o
[ 29%] Building CXX object CMakeFiles/drogon.dir/lib/src/RequestStream.cc.o
[ 29%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpResponseImpl.cc.o
[ 30%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpResponseParser.cc.o
[ 30%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpServer.cc.o
[ 31%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpUtils.cc.o
/Users/vzool/Workspace/drogon/lib/src/HttpUtils.cc:62:10: warning: 'CT_APPLICATION_X_JAVASCRIPT' is deprecated: use CT_TEXT_JAVASCRIPT [-Wdeprecated-declarations]
   62 |         {CT_APPLICATION_X_JAVASCRIPT,
      |          ^
/Users/vzool/Workspace/drogon/lib/inc/drogon/HttpTypes.h:106:35: note: 'CT_APPLICATION_X_JAVASCRIPT' has been explicitly marked deprecated here
  106 |     CT_APPLICATION_X_JAVASCRIPT [[deprecated("use CT_TEXT_JAVASCRIPT")]],
      |                                   ^
/Users/vzool/Workspace/drogon/lib/src/HttpUtils.cc:733:23: warning: 'CT_APPLICATION_X_JAVASCRIPT' is deprecated: use CT_TEXT_JAVASCRIPT [-Wdeprecated-declarations]
  733 |         extensionMap_[CT_APPLICATION_X_JAVASCRIPT] =
      |                       ^
/Users/vzool/Workspace/drogon/lib/inc/drogon/HttpTypes.h:106:35: note: 'CT_APPLICATION_X_JAVASCRIPT' has been explicitly marked deprecated here
  106 |     CT_APPLICATION_X_JAVASCRIPT [[deprecated("use CT_TEXT_JAVASCRIPT")]],
      |                                   ^
2 warnings generated.
[ 31%] Building CXX object CMakeFiles/drogon.dir/lib/src/HttpViewData.cc.o
[ 32%] Building CXX object CMakeFiles/drogon.dir/lib/src/IntranetIpFilter.cc.o
[ 32%] Building CXX object CMakeFiles/drogon.dir/lib/src/JsonConfigAdapter.cc.o
[ 33%] Building CXX object CMakeFiles/drogon.dir/lib/src/ListenerManager.cc.o
[ 33%] Building CXX object CMakeFiles/drogon.dir/lib/src/LocalHostFilter.cc.o
[ 34%] Building CXX object CMakeFiles/drogon.dir/lib/src/MultiPart.cc.o
[ 34%] Building CXX object CMakeFiles/drogon.dir/lib/src/MultipartStreamParser.cc.o
[ 35%] Building CXX object CMakeFiles/drogon.dir/lib/src/NotFound.cc.o
[ 35%] Building CXX object CMakeFiles/drogon.dir/lib/src/PluginsManager.cc.o
[ 35%] Building CXX object CMakeFiles/drogon.dir/lib/src/PromExporter.cc.o
[ 36%] Building CXX object CMakeFiles/drogon.dir/lib/src/RangeParser.cc.o
[ 36%] Building CXX object CMakeFiles/drogon.dir/lib/src/RateLimiter.cc.o
[ 37%] Building CXX object CMakeFiles/drogon.dir/lib/src/RealIpResolver.cc.o
[ 37%] Building CXX object CMakeFiles/drogon.dir/lib/src/SecureSSLRedirector.cc.o
[ 38%] Building CXX object CMakeFiles/drogon.dir/lib/src/Redirector.cc.o
[ 38%] Building CXX object CMakeFiles/drogon.dir/lib/src/SessionManager.cc.o
[ 39%] Building CXX object CMakeFiles/drogon.dir/lib/src/SlashRemover.cc.o
[ 39%] Building CXX object CMakeFiles/drogon.dir/lib/src/SlidingWindowRateLimiter.cc.o
[ 40%] Building CXX object CMakeFiles/drogon.dir/lib/src/StaticFileRouter.cc.o
[ 40%] Building CXX object CMakeFiles/drogon.dir/lib/src/TaskTimeoutFlag.cc.o
[ 41%] Building CXX object CMakeFiles/drogon.dir/lib/src/TokenBucketRateLimiter.cc.o
[ 41%] Building CXX object CMakeFiles/drogon.dir/lib/src/Utilities.cc.o
[ 42%] Building CXX object CMakeFiles/drogon.dir/lib/src/WebSocketClientImpl.cc.o
[ 42%] Building CXX object CMakeFiles/drogon.dir/lib/src/WebSocketConnectionImpl.cc.o
[ 43%] Building CXX object CMakeFiles/drogon.dir/lib/src/YamlConfigAdapter.cc.o
[ 43%] Building CXX object CMakeFiles/drogon.dir/lib/src/drogon_test.cc.o
[ 44%] Building CXX object CMakeFiles/drogon.dir/lib/src/SharedLibManager.cc.o
[ 44%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/sqlite3_impl/Sqlite3Connection.cc.o
[ 45%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/sqlite3_impl/Sqlite3ResultImpl.cc.o
[ 45%] Building CXX object CMakeFiles/drogon.dir/lib/src/RedisClientSkipped.cc.o
[ 46%] Building CXX object CMakeFiles/drogon.dir/lib/src/RedisResultSkipped.cc.o
[ 46%] Building CXX object CMakeFiles/drogon.dir/lib/src/RedisClientManagerSkipped.cc.o
[ 47%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/ArrayParser.cc.o
[ 47%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/Criteria.cc.o
[ 47%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/DbClient.cc.o
[ 48%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/DbClientImpl.cc.o
[ 48%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/DbClientLockFree.cc.o
[ 49%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/DbConnection.cc.o
[ 49%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/DbListener.cc.o
[ 50%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/Exception.cc.o
[ 50%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/Field.cc.o
[ 51%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/Result.cc.o
[ 51%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/Row.cc.o
[ 52%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/SqlBinder.cc.o
[ 52%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/TransactionImpl.cc.o
[ 53%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/RestfulController.cc.o
[ 53%] Building CXX object CMakeFiles/drogon.dir/orm_lib/src/DbClientManager.cc.o
[ 54%] Linking CXX static library libdrogon.a
[ 54%] Built target drogon
[ 55%] Building CXX object examples/CMakeFiles/client.dir/client_example/main.cc.o
[ 55%] Linking CXX executable client
Undefined symbols for architecture x86_64:
  "_SSL_get_peer_certificate", referenced from:
      OpenSSLProvider::processHandshake() in libtrantor.a[32](OpenSSLProvider.cc.o)
ld: symbol(s) not found for architecture x86_64
c++: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [examples/client] Error 1
make[1]: *** [examples/CMakeFiles/client.dir/all] Error 2
make: *** [all] Error 2
vzool commented 3 weeks ago

Thanks @nqf The main issue for yaml-cpp is resolved, but I face another! Do I need to continue in the same issue or create another one?

nqf commented 3 weeks ago

https://github.com/openssl/openssl/issues/17994

nqf commented 3 weeks ago

I haven't encountered this error before. I can compile it using openssl3.0 on Ubuntu

vzool commented 3 weeks ago

Thanks @nqf again, now I can build it successfully. Here what I did for the future reference to the community:

➜ git clone git@github.com:openssl/openssl.git
➜ cd openssl
➜ git checkout openssl-3.4.0 # select the latest version tag
➜ ./Configure
➜ make
➜ sudo make install
vzool commented 3 weeks ago

But, when I tried to create a new project according to the docs it fails to complete. Here is the output:

➜  Workspace drogon_ctl create project drogon_static_site
dyld[18433]: Library not loaded: @rpath/libjsoncpp.24.dylib
  Referenced from: <A408D630-177C-33E2-9B2D-6238B9FFA4A7> /usr/local/bin/drogon_ctl
  Reason: no LC_RPATH's found
[1]    18433 abort      drogon_ctl create project drogon_static_site
fantasy-peak commented 3 weeks ago

Library not loaded: @rpath/libjsoncpp.24.dylib

vzool commented 3 weeks ago

@fantasy-peak How to load @rpath/libjsoncpp.24.dylib?

nqf commented 3 weeks ago

https://github.com/valhalla/valhalla/issues/4641 https://stackoverflow.com/questions/77829286/no-lc-rpaths-found

vzool commented 3 weeks ago

@nqf Strange it can't be loaded even after I set it manually by many ways, I think it should be loaded automatically, because it is "User-Installed Libraries" location on macOS. The library itself exists at location /usr/local/lib/libjsoncpp.24.dylib, Here what I did:

➜  Workspace drogon_ctl create project drogon_static_site                        
dyld[78229]: Library not loaded: @rpath/libjsoncpp.24.dylib
  Referenced from: <A408D630-177C-33E2-9B2D-6238B9FFA4A7> /usr/local/bin/drogon_ctl
  Reason: no LC_RPATH\'s found
[1]    78229 abort      drogon_ctl create project drogon_static_site

➜  Workspace LC_RPATH=/usr/local/lib                                         

➜  Workspace echo $LC_RPATH                                                      
/usr/local/lib

➜  Workspace ll /usr/local/lib/libjsoncpp.24.dylib       
lrwxr-xr-x  1 vzool  staff    22B Jul 29  2021 /usr/local/lib/libjsoncpp.24.dylib -> libjsoncpp.1.9.4.dylib

➜  Workspace drogon_ctl create project drogon_static_site
dyld[78848]: Library not loaded: @rpath/libjsoncpp.24.dylib
  Referenced from: <A408D630-177C-33E2-9B2D-6238B9FFA4A7> /usr/local/bin/drogon_ctl
  Reason: no LC_RPATH\'s found
[1]    78848 abort      drogon_ctl create project drogon_static_site

➜  Workspace LC_RPATH=/usr/local/lib/ drogon_ctl create project drogon_static_site 
dyld[79090]: Library not loaded: @rpath/libjsoncpp.24.dylib
  Referenced from: <A408D630-177C-33E2-9B2D-6238B9FFA4A7> /usr/local/bin/drogon_ctl
  Reason: no LC_RPATH\'s found
[1]    79090 abort      LC_RPATH=/usr/local/lib/ drogon_ctl create project drogon_static_site
nqf commented 3 weeks ago

I am not very familiar with macOS because I am using Linux,But your error message is very strange,LC_RPATH\'s, It has one \

vzool commented 3 weeks ago

I think this is because the main OS was used to develop the framework is Linux, right?

nqf commented 3 weeks ago

https://github.com/drogonframework/drogon/actions/runs/11538296012/job/32116613793 no, It can be compiled on macOS 12 , Please check the CI file, I think it may be an issue with your environment