6

I'm trying to use make but I keep getting this error. Tried make clean, updating cpp and some other stuff.

cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
creating build/lib.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-PPrPZj/python2.7-2.7.15=. -fstack-protector-strong -Wformat -Werror=format-security -Wl,-Bsymbolic-functions -Wl,-z,relro -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-PPrPZj/python2.7-2.7.15=. -fstack-protector-strong -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/lhapdf.o -L/home/adrian/Desktop/LHAPDF-6.2.3/src/.libs -lstdc++ -lLHAPDF -o build/lib.linux-x86_64-2.7/lhapdf.so
/usr/bin/ld: cannot find -lstdc++
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Makefile:485: recipe for target 'all-local' failed
make[2]: * [all-local] Error 1
make[2]: Leaving directory '/home/adrian/Desktop/LHAPDF-6.2.3/wrappers/python'
Makefile:376: recipe for target 'all-recursive' failed
make[1]: * [all-recursive] Error 1
make[1]: Leaving directory '/home/adrian/Desktop/LHAPDF-6.2.3/wrappers'
Makefile:509: recipe for target 'all-recursive' failed
make: * [all-recursive] Error 1

Also, before that I have several:

nothing could be done for ''All...''
Eliah Kagan
  • 117,780
  • It looks like you're trying to make a C++ program using gcc - is g++ installed on your system? Is this your own Makefile, or part of some downloaded software? – steeldriver Nov 05 '19 at 11:28
  • 1
    Welcome to [ubuntu.se]! What does the command apt list --installed libstdc++\* return on your machine? Please [edit] your question to include the output. Also, what project are you trying to build? – Melebius Nov 05 '19 at 11:39
  • I have the 9.2.0 versions of gcc/g++. The makefile comes from LHAPDF, a program for particle physics. For apt list --installed libstdc++\* I get: adrian@adrian-VirtualBox:~$ apt list --installed libstdc++\* Listing... Done libstdc++-9-dev/bionic,now 9.2.1-17ubuntu1~18.04.1 amd64 [installed,automatic] libstdc++6/bionic,now 9.2.1-17ubuntu1~18.04.1 amd64 [installed]. – SrslyReadABook Nov 05 '19 at 12:15
  • 3
    Fixed by removing libstdc and installing again, and aparently this made build-essential to install more things ( i ran it again but i was almost sure i had already done it) – SrslyReadABook Nov 05 '19 at 13:47
  • 1
    Great you solved it! Consider posting an answer or closing your question. – Melebius Nov 05 '19 at 14:20
  • @Melebius libstdc++-9-dev/focal-updates,focal-security,now 9.4.0-1ubuntu1~20.04.1 armhf [installed,automatic] libstdc++-arm-none-eabi-newlib/focal,now 15:9-2019-q4-0ubuntu1+12build2 all [installed,automatic] libstdc++6/focal-updates,focal-security,now 10.3.0-1ubuntu1~20.04 armhf [installed] – CS QGB Dec 18 '22 at 12:20

0 Answers0