microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.26k stars 6.41k forks source link

[drogon][mysql] Build error on x64-linux #42070

Open sagarc02 opened 6 days ago

sagarc02 commented 6 days ago

Below is the error which i am getting while building the drogon[mysql] package in x64 linux

/home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:62:36: error: ‘MYSQL_OPT_NONBLOCK’ was not declared in this scope; did you mean ‘MY SQL_OPT_SSL_CA’? 62 mysqloptions(mysqlPtr.get(), MYSQL_OPT_NONBLOCK, nullptr); ^~~~~~ MYSQL_OPT_SSL_CA /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc: In lambda function: /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:112:13: error: ‘mysql_real_connect_start’ was not declared in this scope; did you m ean ‘mysql_real_connect_dns_srv’? 112 mysql_real_connect_start(&ret, ^~~~~~~~ mysql_real_connect_dns_srv /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:124:19: error: ‘mysql_get_socket’ was not declared in this scope; did you mean ‘mys ql_ssl_set’? 124 auto fd = mysql_getsocket(mysqlPtr.get()); ^~~~ mysql_ssl_set /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc: In member function ‘void drogon::orm::MysqlConnection::setChannel()’: /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:143:24: error: ‘MYSQL_WAIT_READ’ was not declared in this scope 143 if ((waitStatus_ & MYSQL_WAIT_READ) (waitStatus_ & MYSQL_WAIT_EXCEPT)) ^~~~~~~ /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:143:59: error: ‘MYSQL_WAIT_EXCEPT’ was not declared in this scope; did you mean ‘MY SQL_STMT_EXT’? 143 if ((waitStatus_ & MYSQL_WAIT_READ) (waitStatus_ & MYSQL_WAIT_EXCEPT)) ^~~~~ MYSQL_STMT_EXT /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:148:23: error: ‘MYSQL_WAIT_WRITE’ was not declared in this scope 148 if (waitStatus_ & MYSQL_WAIT_WRITE) ^~~~ /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:158:23: error: ‘MYSQL_WAIT_TIMEOUT’ was not declared in this scope; did you mean ‘N ET_WAIT_TIMEOUT’? 158 if (waitStatus_ & MYSQL_WAIT_TIMEOUT) ^~~~~~ NET_WAIT_TIMEOUT /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:160:24: error: ‘mysql_get_timeout_value’ was not declared in this scope 160 auto timeout = mysql_get_timeoutvalue(mysqlPtr.get());

/home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc: In member function ‘void drogon::orm::MysqlConnection::handleTimeout()’: /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:197:15: error: ‘MYSQL_WAIT_TIMEOUT’ was not declared in this scope; did you mean ‘N ET_WAIT_TIMEOUT’? 197 | status |= MYSQL_WAIT_TIMEOUT; | ^~~~~~ | NET_WAIT_TIMEOUT /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:201:23: error: ‘mysql_real_connect_cont’ was not declared in this scope; did you me an ‘mysql_realconnect’? 201 | waitStatus = mysql_real_connectcont(&ret, mysqlPtr.get(), status); | ^~~~~~~ | mysql_real_connect /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc: In member function ‘void drogon::orm::MysqlConnection::handleCmd(int)’: /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:247:27: error: ‘mysql_real_query_cont’ was not declared in this scope; did you mean ‘mysql_realquery’? 247 | waitStatus = mysql_real_querycont(&err, mysqlPtr.get(), status); | ^~~~~ | mysql_real_query /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:267:17: error: ‘mysql_store_result_cont’ was not declared in this scope; did you me an ‘mysql_store_result’? 267 | mysql_store_resultcont(&ret, mysqlPtr.get(), status); | ^~~~~~~ | mysql_store_result /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:286:27: error: ‘mysql_next_result_cont’ was not declared in this scope; did you mea n ‘mysql_nextresult’? 286 | waitStatus = mysql_next_resultcont(&err, mysqlPtr.get(), status); | ^~~~~~ | mysql_next_result /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc: In member function ‘void drogon::orm::MysqlConnection::handleEvent()’: /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:318:19: error: ‘MYSQL_WAIT_READ’ was not declared in this scope 318 | status |= MYSQL_WAIT_READ; | ^~~~~~~ /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:320:19: error: ‘MYSQL_WAIT_WRITE’ was not declared in this scope 320 | status |= MYSQL_WAIT_WRITE; | ^~~~ /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:322:19: error: ‘MYSQL_WAIT_EXCEPT’ was not declared in this scope; did you mean ‘MY SQL_STMT_EXT’? 322 | status |= MYSQL_WAIT_EXCEPT; | ^~~~~ | MYSQL_STMT_EXT /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:327:23: error: ‘mysql_real_connect_cont’ was not declared in this scope; did you me an ‘mysql_real_connect’?

home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:327:23: error: ‘mysql_real_connect_cont’ was not declared in this scope; did you me an ‘mysql_real_connect’? 327 waitStatus_ = mysql_real_connectcont(&ret, mysqlPtr.get(), status); ^~~~~~~ mysql_real_connect /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc: In member function ‘void drogon::orm::MysqlConnection::continueSetCharacterSet(int )’: /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:369:19: error: ‘mysql_set_character_set_cont’ was not declared in this scope; did y ou mean ‘mysql_set_character_set’? 369 waitStatus_ = mysql_set_character_setcont(&err, mysqlPtr.get(), status); ^~~~~~~~ mysql_set_character_set /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc: In member function ‘void drogon::orm::MysqlConnection::startSetCharacterSet()’: /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:393:19: error: ‘mysql_set_character_set_start’ was not declared in this scope; did you mean ‘mysql_set_character_set’? 393 waitStatus_ = mysql_set_character_set_start(&err, ^~~~~~~~~ mysql_set_character_set /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc: In member function ‘void drogon::orm::MysqlConnection::startQuery()’: /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:550:19: error: ‘mysql_real_query_start’ was not declared in this scope; did you mea n ‘mysql_real_query’? 550 waitStatus_ = mysql_real_query_start(&err, ^~~~~~ mysql_real_query /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc: In member function ‘void drogon::orm::MysqlConnection::startStoreResult(bool)’: /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:573:19: error: ‘mysql_store_result_start’ was not declared in this scope; did you m ean ‘mysql_store_result’? 573 waitStatus_ = mysql_store_resultstart(&ret, mysqlPtr.get()); ^~~~~~~~ mysql_store_result /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc: In member function ‘void drogon::orm::MysqlConnection::getResult(MYSQL_RES*)’: /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/orm_lib/src/mysql_impl/MysqlConnection.cc:626:27: error: ‘mysql_next_result_start’ was not declared in this scope; did you me an ‘mysql_next_result’? 626 waitStatus_ = mysql_next_resultstart(&err, mysqlPtr.get()); ^~~~~~~ mysql_next_result [58/82] /usr/bin/c++ -DUSE_BROTLI -DUSE_OSSP_UUID=0 -DUSE_REDIS -I/home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/lib/inc -I/home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6 a37c2250f.clean/orm_lib/inc -I/home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/nosql_lib/redis/inc -I/home/sagarc/vcpkg/buildtrees/drogon/x64-linux-dbg -I/home/sagarc/vcpkg/b uildtrees/drogon/x64-linux-dbg/exports -isystem /home/sagarc/vcpkg/installed/x64-linux/include -isystem /home/sagarc/vcpkg/installed/x64-linux/include/uuid -isystem /usr/include/mysql -fPIC -g -std=c++17 -MD -MT CMakeFiles/drogon.dir/nosql_lib/redis/src/RedisConnection.cc.o -MF CMakeFiles/drogon.dir/nosql_lib/redis/src/RedisConnection.cc.o.d -o CMakeFiles/drogon.dir/nosql_lib/r edis/src/RedisConnection.cc.o -c /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/nosql_lib/redis/src/RedisConnection.cc [59/82] /usr/bin/c++ -DUSE_BROTLI -DUSE_OSSP_UUID=0 -DUSE_REDIS -I/home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/lib/inc -I/home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6 a37c2250f.clean/orm_lib/inc -I/home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/nosql_lib/redis/inc -I/home/sagarc/vcpkg/buildtrees/drogon/x64-linux-dbg -I/home/sagarc/vcpkg/b uildtrees/drogon/x64-linux-dbg/exports -isystem /home/sagarc/vcpkg/installed/x64-linux/include -isystem /home/sagarc/vcpkg/installed/x64-linux/include/uuid -isystem /usr/include/mysql -fPIC -g -std=c++17 -MD -MT CMakeFiles/drogon.dir/nosql_lib/redis/src/RedisClientImpl.cc.o -MF CMakeFiles/drogon.dir/nosql_lib/redis/src/RedisClientImpl.cc.o.d -o CMakeFiles/drogon.dir/nosql_lib/r edis/src/RedisClientImpl.cc.o -c /home/sagarc/vcpkg/buildtrees/drogon/src/v1.9.7-6a37c2250f.clean/nosql_lib/redis/src/RedisClientImpl.cc

:

JonLiu1993 commented 4 days ago

@sagarc02, I can't reproduce your error locally, can you provide your complete installation steps?

test@docker:~/test/vcpkg$ ./vcpkg install  drogon[mysql] --editable
Computing installation plan...
The following packages are already installed:
    drogon[core,orm,mysql]:x64-linux@1.9.7
drogon:x64-linux is already installed
Total install time: 9.7 us
The package drogon provides CMake targets:

    find_package(Drogon CONFIG REQUIRED)
    target_link_libraries(main PRIVATE Drogon::Drogon)