Skip to content
This repository has been archived by the owner on Apr 6, 2019. It is now read-only.

lib64/libcpp_redis.a(client.cpp.o): undefined reference to symbol '_ZSt15__once_callable@@GLIBCXX_3.4.11' #187

Open
ghost opened this issue Jul 4, 2018 · 0 comments

Comments

@ghost
Copy link

ghost commented Jul 4, 2018

Hello,

I tried to compile my little redis program static (-static-libstdc++) and get the follwing error message:

/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64/libcpp_redis.a(client.cpp.o): undefined reference to symbol '_ZSt15__once_callable@@GLIBCXX_3.4.11'
/usr/lib64/libstdc++.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

I compile the programm with the follwing g++ command:
gcc-7 -O3 -fPIC -Wall read_file_infos.cpp -lcpp_redis -ltacopie -pthread -lboost_system -lboost_filesystem -lmagic -lssl -lcrypto -licui18n -licuuc -licudata -o read_file_infos -static-libstdc++;

When I try to compile without static (-static-libstdc++) everithing works.

The g++ version:
gcc-7 (SUSE Linux) 7.3.1 20180307 [gcc-7-branch revision 258314]
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

My distribution is:
#cat /etc/issue
Welcome to openSUSE Leap 42.3 - Kernel \r (\l).

with kernel:
#uname -a
Linux 452dfe4a6a07 4.10.13-default #1 SMP Fri May 5 11:21:09 CEST 2017 x86_64 x86_64 x86_64 GNU/Linux

Can you please help me

Best regrads
B.-D.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants