Segfault-Inc / Multicorn

Data Access Library
https://multicorn.org/
PostgreSQL License
700 stars 145 forks source link

Multicorn make fails, ld: cannot find -lpython2.7 #28

Closed johnmudd closed 11 years ago

johnmudd commented 11 years ago

$ git clone git://github.com/Kozea/Multicorn.git Cloning into 'Multicorn'... remote: Counting objects: 14232, done. remote: Compressing objects: 100% (7257/7257), done. remote: Total 14232 (delta 6690), reused 14147 (delta 6609) Receiving objects: 100% (14232/14232), 5.50 MiB | 2.10 MiB/s, done. Resolving deltas: 100% (6690/6690), done. $ cd Multicorn $ make Python version is 2.7 gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fpic -I/home/mudd/pkgs/Python-2.7.5.install/include/python2.7 -I/home/mudd/pkgs/Python-2.7.5.install/include/python2.7 -I. -I. -I/home/mudd/pkgs/postgresql-9.3.0.install/include/server -I/home/mudd/pkgs/postgresql-9.3.0.install/include/internal -I/home/mudd/pkgs/Python-2.7.5.install/include/python2.7 -I/home/mudd/pkgs/Python-2.7.5.install/include/python2.7 -c -o src/errors.o src/errors.c gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fpic -I/home/mudd/pkgs/Python-2.7.5.install/include/python2.7 -I/home/mudd/pkgs/Python-2.7.5.install/include/python2.7 -I. -I. -I/home/mudd/pkgs/postgresql-9.3.0.install/include/server -I/home/mudd/pkgs/postgresql-9.3.0.install/include/internal -I/home/mudd/pkgs/Python-2.7.5.install/include/python2.7 -I/home/mudd/pkgs/Python-2.7.5.install/include/python2.7 -c -o src/python.o src/python.c gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fpic -I/home/mudd/pkgs/Python-2.7.5.install/include/python2.7 -I/home/mudd/pkgs/Python-2.7.5.install/include/python2.7 -I. -I. -I/home/mudd/pkgs/postgresql-9.3.0.install/include/server -I/home/mudd/pkgs/postgresql-9.3.0.install/include/internal -I/home/mudd/pkgs/Python-2.7.5.install/include/python2.7 -I/home/mudd/pkgs/Python-2.7.5.install/include/python2.7 -c -o src/query.o src/query.c gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fpic -I/home/mudd/pkgs/Python-2.7.5.install/include/python2.7 -I/home/mudd/pkgs/Python-2.7.5.install/include/python2.7 -I. -I. -I/home/mudd/pkgs/postgresql-9.3.0.install/include/server -I/home/mudd/pkgs/postgresql-9.3.0.install/include/internal -I/home/mudd/pkgs/Python-2.7.5.install/include/python2.7 -I/home/mudd/pkgs/Python-2.7.5.install/include/python2.7 -c -o src/multicorn.o src/multicorn.c gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fpic -shared -o multicorn.so src/errors.o src/python.o src/query.o src/multicorn.o -L/home/mudd/pkgs/postgresql-9.3.0.install/lib -Wl,--as-needed -Wl,-rpath,'/home/mudd/pkgs/postgresql-9.3.0.install/lib',--enable-new-dtags -lpthread -ldl -lutil -lm -lpython2.7
/usr/bin/ld: cannot find -lpython2.7 collect2: error: ld returned 1 exit status make: *\ [multicorn.so] Error 1 $

johnmudd commented 11 years ago

I just repeated the failed gcc command and manually added the path to the python lib. Then ran make again and let it finish normally.

$ gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -fpic -shared -o multicorn.so src/errors.o src/python.o src/query.o src/multicorn.o -L/home/mudd/pkgs/postgresql-9.3.0.install/lib -Wl,--as-needed -Wl,-rpath,'/home/mudd/pkgs/postgresql-9.3.0.install/lib',--enable-new-dtags -lpthread -ldl -lutil -lm -L /home/mudd/pkgs/Python-2.7.5.install/lib -lpython2.7 $ make Python version is 2.7 ./preflight-check.sh cp sql/multicorn.sql sql/multicorn--1.0.0.sql $