Giter Site home page Giter Site logo

Comments (3)

rahulmalik87 avatar rahulmalik87 commented on August 13, 2024

for error
service/software/pstress/src/random_test.cpp: In function ‘bool execute_sql(std::string, Thd1*)’:
/service/software/pstress/src/random_test.cpp:1154:11: error: ‘put_time’ is not a member of ‘std’
ss << std::put_time(std::localtime(&in_time_t), "%Y-%m-%dT%X");

could you update the gcc to the latest version

https://stackoverflow.com/questions/14136833/stdput-time-implementation-status-in-gcc/14137287?noredirect=1#comment35569824_14142342

from pstress.

lemontree8801 avatar lemontree8801 commented on August 13, 2024

thx,when I upgrade gcc . last err is fix.
but now i got a new error

$ cmake . -DMYSQL=ON -DMYSQL_INCLUDE_DIR=/service/software/mysql_3306/include -DMYSQL_LIBRARY=/service/software/mysql_3306/lib  -DOPENSSL_INCLUDE_DIR=/usr/local/openssl/include/openssl
-- The C compiler identification is GNU 7.3.1
-- The CXX compiler identification is GNU 7.3.1
-- Check for working C compiler: /opt/rh/devtoolset-7/root/usr/bin/cc
-- Check for working C compiler: /opt/rh/devtoolset-7/root/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /opt/rh/devtoolset-7/root/usr/bin/c++
-- Check for working CXX compiler: /opt/rh/devtoolset-7/root/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found Git: /bin/git (found version "1.8.3.1") 
-- Performing Test COMPILER_SUPPORTS_CXX11
-- Performing Test COMPILER_SUPPORTS_CXX11 - Success
-- Architecture is x86_64
-- Found OpenSSL: /usr/local/lib64/libssl.so;/usr/lib64/libcrypto.so  
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found ZLIB: /usr/lib64/libz.so (found version "1.2.7") 
-- * PStress revision is: bddca5d
-- Configuring done
WARNING: Target "pstress-ms" requests linking to directory "/service/software/mysql_3306/lib".  Targets may link only to libraries.  CMake is dropping the item.
-- Generating done
-- Build files have been written to: /service/software/pstress
$ make install
Scanning dependencies of target inih++
[ 14%] Building C object src/third_party/inih++/lib/CMakeFiles/inih++.dir/ini.c.o
[ 28%] Building CXX object src/third_party/inih++/lib/CMakeFiles/inih++.dir/INIReader.cpp.o
Linking CXX static library libinih++.a
[ 28%] Built target inih++
Scanning dependencies of target pstress-ms
[ 42%] Building CXX object src/CMakeFiles/pstress-ms.dir/pstress.cpp.o
[ 57%] Building CXX object src/CMakeFiles/pstress-ms.dir/help.cpp.o
[ 71%] Building CXX object src/CMakeFiles/pstress-ms.dir/node.cpp.o
[ 85%] Building CXX object src/CMakeFiles/pstress-ms.dir/thread.cpp.o
[100%] Building CXX object src/CMakeFiles/pstress-ms.dir/random_test.cpp.o
Linking CXX executable pstress-ms
CMakeFiles/pstress-ms.dir/node.cpp.o: In function `Node::createGeneralLog()':
node.cpp:(.text+0x9f7): undefined reference to `mysql_get_client_info'
CMakeFiles/pstress-ms.dir/node.cpp.o: In function `Node::tryConnect()':
node.cpp:(.text+0x1667): undefined reference to `mysql_init'
node.cpp:(.text+0x16d0): undefined reference to `mysql_real_connect'
node.cpp:(.text+0x1711): undefined reference to `mysql_get_host_info'
node.cpp:(.text+0x1791): undefined reference to `mysql_query'
node.cpp:(.text+0x17a1): undefined reference to `mysql_get_server_info'
node.cpp:(.text+0x1829): undefined reference to `mysql_free_result'
node.cpp:(.text+0x1831): undefined reference to `mysql_close'
node.cpp:(.text+0x1894): undefined reference to `mysql_use_result'
node.cpp:(.text+0x18a8): undefined reference to `mysql_fetch_row'
node.cpp:(.text+0x18c6): undefined reference to `mysql_get_server_info'
node.cpp:(.text+0x1a7a): undefined reference to `mysql_errno'
node.cpp:(.text+0x1aa3): undefined reference to `mysql_error'
node.cpp:(.text+0x1aee): undefined reference to `mysql_errno'
node.cpp:(.text+0x1b15): undefined reference to `mysql_error'
node.cpp:(.text+0x1b4a): undefined reference to `mysql_close'
node.cpp:(.text+0x1b4f): undefined reference to `mysql_server_end'
node.cpp:(.text+0x1b89): undefined reference to `mysql_errno'
node.cpp:(.text+0x1bb1): undefined reference to `mysql_error'
node.cpp:(.text+0x1bfb): undefined reference to `mysql_errno'
node.cpp:(.text+0x1c21): undefined reference to `mysql_error'
node.cpp:(.text+0x1c55): undefined reference to `mysql_close'
node.cpp:(.text+0x1c5a): undefined reference to `mysql_server_end'
CMakeFiles/pstress-ms.dir/random_test.cpp.o: In function `db_branch()':
random_test.cpp:(.text+0xca): undefined reference to `mysql_get_client_info'
CMakeFiles/pstress-ms.dir/random_test.cpp.o: In function `execute_sql(std::string, Thd1*)':
random_test.cpp:(.text+0x1895): undefined reference to `mysql_real_query'
random_test.cpp:(.text+0x19f5): undefined reference to `mysql_store_result'
random_test.cpp:(.text+0x1a0f): undefined reference to `mysql_fetch_row'
random_test.cpp:(.text+0x1a3d): undefined reference to `mysql_free_result'
random_test.cpp:(.text+0x1a82): undefined reference to `mysql_num_fields'
random_test.cpp:(.text+0x1aa4): undefined reference to `mysql_fetch_row'
random_test.cpp:(.text+0x1c22): undefined reference to `mysql_num_rows'
random_test.cpp:(.text+0x1cb4): undefined reference to `mysql_error'
random_test.cpp:(.text+0x1d68): undefined reference to `mysql_error'
random_test.cpp:(.text+0x1d9b): undefined reference to `mysql_errno'
CMakeFiles/pstress-ms.dir/pstress.cpp.o: In function `main':
pstress.cpp:(.text.startup+0x741): undefined reference to `mysql_server_end'
CMakeFiles/pstress-ms.dir/help.cpp.o: In function `print_version()':
help.cpp:(.text+0x7b2e): undefined reference to `mysql_get_client_info'
CMakeFiles/pstress-ms.dir/thread.cpp.o: In function `Node::workerThread(int)':
thread.cpp:(.text+0x603): undefined reference to `mysql_init'
thread.cpp:(.text+0x639): undefined reference to `mysql_options'
thread.cpp:(.text+0x666): undefined reference to `mysql_real_connect'
thread.cpp:(.text+0x8a4): undefined reference to `mysql_close'
thread.cpp:(.text+0x8a9): undefined reference to `mysql_thread_end'
thread.cpp:(.text+0x16aa): undefined reference to `mysql_errno'
thread.cpp:(.text+0x16d5): undefined reference to `mysql_error'
thread.cpp:(.text+0x173c): undefined reference to `mysql_close'
thread.cpp:(.text+0x176e): undefined reference to `mysql_thread_end'
thread.cpp:(.text+0x1ae7): undefined reference to `mysql_errno'
thread.cpp:(.text+0x1b11): undefined reference to `mysql_error'
collect2: error: ld returned 1 exit status
make[2]: *** [src/pstress-ms] Error 1
make[1]: *** [src/CMakeFiles/pstress-ms.dir/all] Error 2
make: *** [all] Error 2

from pstress.

mohitj1988 avatar mohitj1988 commented on August 13, 2024

Dear user,
You have missed this warning message in the cmake
WARNING: Target "pstress-ms" requests linking to directory "/service/software/mysql_3306/lib". Targets may link only to libraries. CMake is dropping the item.

The issue is that -DMYSQL_LIBRARY expects the library name and not the directory where the libraries resides.
for ex - -DMYSQL_LIBRARY=/service/software/mysql_3306/lib/libmysqlclient.a will work fine for you

Another suggestion would be to instead of passing both Library and Include directory path, simply pass the basedir and cmake will find everything it needs.
for ex - cmake . -DMYSQL=ON -DBASEDIR=/service/software/mysql_3306/

from pstress.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.