LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > *BSD
User Name
Password
*BSD This forum is for the discussion of all BSD variants.
FreeBSD, OpenBSD, NetBSD, etc.

Notices

Reply
 
Search this Thread
Old 04-15-2009, 01:52 PM   #1
hedpe
Member
 
Registered: Jan 2005
Location: Pittsburgh
Distribution: Ubuntu
Posts: 378

Rep: Reputation: 30
help building mod_python in freebsd, error: cannot find -lpython2.6


Hi all, I am trying to build mod_python via "portinstall mod_python" but I keep getting the error: "cannot find -lpython2.6"

I have libpython2.6.so:
Code:
lrwxr-xr-x  1 root  wheel  17 Apr 15 13:17 /usr/local/lib/libpython2.6.so -> libpython2.6.so.1
Code:
--->  Upgrading 'mod_python-3.3.1' to 'mod_python-3.3.1_2' (www/mod_python3)
--->  Building '/usr/ports/www/mod_python3'
===>  Cleaning for mod_python-3.3.1_2

===>  Vulnerability check disabled, database not found

===>  Extracting for mod_python-3.3.1_2

=> MD5 Checksum OK for mod_python-3.3.1.tgz.

=> SHA256 Checksum OK for mod_python-3.3.1.tgz.

===>  Patching for mod_python-3.3.1_2

===>  Applying FreeBSD patches for mod_python-3.3.1_2

===>   mod_python-3.3.1_2 depends on file: /usr/local/bin/python2.6 - found

===>   mod_python-3.3.1_2 depends on file: /usr/local/sbin/apxs - found

===>  Configuring for mod_python-3.3.1_2

checking for gcc... cc

checking for C compiler default output file name... a.out

checking whether the C compiler works... yes

checking whether we are cross compiling... no

checking for suffix of executables... 

checking for suffix of object files... o

checking whether we are using the GNU C compiler... yes

checking whether cc accepts -g... yes

checking for cc option to accept ANSI C... none needed

checking for ar... ar

checking for a BSD-compatible install... /usr/bin/install -c -o root -g wheel

checking whether make sets $(MAKE)... yes

checking for main in -lm... yes

checking for an ANSI C-conforming const... yes

checking your blood pressure... a bit high, but we can proceed

configure: checking whether apxs is available...

checking for --with-apxs... /usr/local/sbin/apxs executable, good

checking Apache version... 2.2.11

checking for Apache libexec directory... /usr/local/libexec/apache22

checking for Apache include directory... -I/usr/local/include/apache22

checking for --with-python... /usr/local/bin/python2.6

checking Python version... 2.6

checking Python install prefix... /usr/local

checking checking where python libraries are installed... /usr/local/lib/python2.6

checking for Py_NewInterpreter in -lpython2.6... yes

checking what libraries Python was linked with... -lpython2.6 -lpython2.6 -lutil -lm -lthr            

checking linker flags used to link Python... 

checking where Python include files are... -I/usr/local/include/python2.6

checking for --with-python-src... no

checking for --with-mutex-dir... no

Using MUTEX_DIR /tmp

checking for --with-max-locks... no

Using 8 MAX_LOCKS.

checking for --with-flex... no

configure: WARNING: flex no not found

  You can generally ignore this warning unless you need to regenerate

  psp_parser.c from psp_parse.l.  If you do need regenerate psp_parser.c,

  use --with-flex to specify the location of flex.

  See the README for more information.

configure: creating ./config.status

config.status: creating Makefile

config.status: creating src/Makefile

config.status: creating Doc/Makefile

config.status: creating src/include/mod_python.h

config.status: creating test/Makefile

config.status: creating test/testconf.py

config.status: creating dist/setup.py

config.status: creating dist/Makefile

===>  Building for mod_python-3.3.1_2



Compiling for DSO.



/usr/local/sbin/apxs -I/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/include -I/usr/local/include/apache22 -I/usr/local/include/python2.6 -c mod_python.c _apachemodule.c requestobject.c tableobject.c util.c  serverobject.c connobject.c filterobject.c hlist.c  hlistobject.c finfoobject.c -L/usr/local/lib/python2.6/config  -Wl,--export-dynamic -lm  -lpython2.6 -lpython2.6 -lutil -lm -lthr

/usr/local/build-1/libtool --silent --mode=compile cc -prefer-pic -O -pipe -march=athlon64 -I/usr/include   -I/usr/local/include -I/usr/local/include/apache22  -I/usr/local/include/apr-1   -I/usr/local/include/apr-1 -I/usr/local/include -I/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/include -I/usr/local/include/apache22 -I/usr/local/include/python2.6  -c -o mod_python.lo mod_python.c && touch mod_python.slo

mod_python.c: In function 'python_init':

mod_python.c:826: warning: initialization from incompatible pointer type

mod_python.c: In function 'get_interpreter':

mod_python.c:290: warning: passing argument 1 of 'make_obcallback' discards qualifiers from pointer target type

/usr/local/build-1/libtool --silent --mode=compile cc -prefer-pic -O -pipe -march=athlon64 -I/usr/include   -I/usr/local/include -I/usr/local/include/apache22  -I/usr/local/include/apr-1   -I/usr/local/include/apr-1 -I/usr/local/include -I/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/include -I/usr/local/include/apache22 -I/usr/local/include/python2.6  -c -o _apachemodule.lo _apachemodule.c && touch _apachemodule.slo

/usr/local/build-1/libtool --silent --mode=compile cc -prefer-pic -O -pipe -march=athlon64 -I/usr/include   -I/usr/local/include -I/usr/local/include/apache22  -I/usr/local/include/apr-1   -I/usr/local/include/apr-1 -I/usr/local/include -I/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/include -I/usr/local/include/apache22 -I/usr/local/include/python2.6  -c -o requestobject.lo requestobject.c && touch requestobject.slo

/usr/local/build-1/libtool --silent --mode=compile cc -prefer-pic -O -pipe -march=athlon64 -I/usr/include   -I/usr/local/include -I/usr/local/include/apache22  -I/usr/local/include/apr-1   -I/usr/local/include/apr-1 -I/usr/local/include -I/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/include -I/usr/local/include/apache22 -I/usr/local/include/python2.6  -c -o tableobject.lo tableobject.c && touch tableobject.slo

tableobject.c:329: warning: initialization from incompatible pointer type

tableobject.c:1092: warning: initialization from incompatible pointer type

/usr/local/build-1/libtool --silent --mode=compile cc -prefer-pic -O -pipe -march=athlon64 -I/usr/include   -I/usr/local/include -I/usr/local/include/apache22  -I/usr/local/include/apr-1   -I/usr/local/include/apr-1 -I/usr/local/include -I/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/include -I/usr/local/include/apache22 -I/usr/local/include/python2.6  -c -o util.lo util.c && touch util.slo

/usr/local/build-1/libtool --silent --mode=compile cc -prefer-pic -O -pipe -march=athlon64 -I/usr/include   -I/usr/local/include -I/usr/local/include/apache22  -I/usr/local/include/apr-1   -I/usr/local/include/apr-1 -I/usr/local/include -I/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/include -I/usr/local/include/apache22 -I/usr/local/include/python2.6  -c -o serverobject.lo serverobject.c && touch serverobject.slo

serverobject.c:387: warning: initialization from incompatible pointer type

/usr/local/build-1/libtool --silent --mode=compile cc -prefer-pic -O -pipe -march=athlon64 -I/usr/include   -I/usr/local/include -I/usr/local/include/apache22  -I/usr/local/include/apr-1   -I/usr/local/include/apr-1 -I/usr/local/include -I/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/include -I/usr/local/include/apache22 -I/usr/local/include/python2.6  -c -o connobject.lo connobject.c && touch connobject.slo

/usr/local/build-1/libtool --silent --mode=compile cc -prefer-pic -O -pipe -march=athlon64 -I/usr/include   -I/usr/local/include -I/usr/local/include/apache22  -I/usr/local/include/apr-1   -I/usr/local/include/apr-1 -I/usr/local/include -I/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/include -I/usr/local/include/apache22 -I/usr/local/include/python2.6  -c -o filterobject.lo filterobject.c && touch filterobject.slo

/usr/local/build-1/libtool --silent --mode=compile cc -prefer-pic -O -pipe -march=athlon64 -I/usr/include   -I/usr/local/include -I/usr/local/include/apache22  -I/usr/local/include/apr-1   -I/usr/local/include/apr-1 -I/usr/local/include -I/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/include -I/usr/local/include/apache22 -I/usr/local/include/python2.6  -c -o hlist.lo hlist.c && touch hlist.slo

/usr/local/build-1/libtool --silent --mode=compile cc -prefer-pic -O -pipe -march=athlon64 -I/usr/include   -I/usr/local/include -I/usr/local/include/apache22  -I/usr/local/include/apr-1   -I/usr/local/include/apr-1 -I/usr/local/include -I/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/include -I/usr/local/include/apache22 -I/usr/local/include/python2.6  -c -o hlistobject.lo hlistobject.c && touch hlistobject.slo

/usr/local/build-1/libtool --silent --mode=compile cc -prefer-pic -O -pipe -march=athlon64 -I/usr/include   -I/usr/local/include -I/usr/local/include/apache22  -I/usr/local/include/apr-1   -I/usr/local/include/apr-1 -I/usr/local/include -I/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/include -I/usr/local/include/apache22 -I/usr/local/include/python2.6  -c -o finfoobject.lo finfoobject.c && touch finfoobject.slo

finfoobject.c:278: warning: 'intargfunc' is deprecated

finfoobject.c:278: warning: initialization from incompatible pointer type

/usr/local/build-1/libtool --silent --mode=link cc -o mod_python.la  -rpath /usr/local/libexec/apache22 -module -avoid-version    finfoobject.lo hlistobject.lo hlist.lo filterobject.lo connobject.lo serverobject.lo util.lo tableobject.lo requestobject.lo _apachemodule.lo mod_python.lo -L/usr/local/lib/python2.6/config -Wl,--export-dynamic -lm -lpython2.6 -lpython2.6 -lutil -lm -lthr

ln -s ../lib/python/mod_python mod_python

ln -s ../src src

`psp_parser.c' is up to date.

/usr/local/bin/python2.6 setup.py build

running build

running build_py

creating build

creating build/lib.freebsd-7.0-RELEASE-p3-amd64-2.6

creating build/lib.freebsd-7.0-RELEASE-p3-amd64-2.6/mod_python

copying /usr/ports/www/mod_python3/work/mod_python-3.3.1/lib/python/mod_python/testhandler.py -> build/lib.freebsd-7.0-RELEASE-p3-amd64-2.6/mod_python

copying /usr/ports/www/mod_python3/work/mod_python-3.3.1/lib/python/mod_python/Cookie.py -> build/lib.freebsd-7.0-RELEASE-p3-amd64-2.6/mod_python

copying /usr/ports/www/mod_python3/work/mod_python-3.3.1/lib/python/mod_python/publisher.py -> build/lib.freebsd-7.0-RELEASE-p3-amd64-2.6/mod_python

copying /usr/ports/www/mod_python3/work/mod_python-3.3.1/lib/python/mod_python/__init__.py -> build/lib.freebsd-7.0-RELEASE-p3-amd64-2.6/mod_python

copying /usr/ports/www/mod_python3/work/mod_python-3.3.1/lib/python/mod_python/util.py -> build/lib.freebsd-7.0-RELEASE-p3-amd64-2.6/mod_python

copying /usr/ports/www/mod_python3/work/mod_python-3.3.1/lib/python/mod_python/cgihandler.py -> build/lib.freebsd-7.0-RELEASE-p3-amd64-2.6/mod_python

copying /usr/ports/www/mod_python3/work/mod_python-3.3.1/lib/python/mod_python/apache.py -> build/lib.freebsd-7.0-RELEASE-p3-amd64-2.6/mod_python

copying /usr/ports/www/mod_python3/work/mod_python-3.3.1/lib/python/mod_python/importer.py -> build/lib.freebsd-7.0-RELEASE-p3-amd64-2.6/mod_python

copying /usr/ports/www/mod_python3/work/mod_python-3.3.1/lib/python/mod_python/psp.py -> build/lib.freebsd-7.0-RELEASE-p3-amd64-2.6/mod_python

copying /usr/ports/www/mod_python3/work/mod_python-3.3.1/lib/python/mod_python/Session.py -> build/lib.freebsd-7.0-RELEASE-p3-amd64-2.6/mod_python

copying /usr/ports/www/mod_python3/work/mod_python-3.3.1/lib/python/mod_python/cache.py -> build/lib.freebsd-7.0-RELEASE-p3-amd64-2.6/mod_python

copying /usr/ports/www/mod_python3/work/mod_python-3.3.1/lib/python/mod_python/python22.py -> build/lib.freebsd-7.0-RELEASE-p3-amd64-2.6/mod_python

running build_ext

building 'mod_python._psp' extension

creating build/temp.freebsd-7.0-RELEASE-p3-amd64-2.6

creating build/temp.freebsd-7.0-RELEASE-p3-amd64-2.6/usr

creating build/temp.freebsd-7.0-RELEASE-p3-amd64-2.6/usr/ports

creating build/temp.freebsd-7.0-RELEASE-p3-amd64-2.6/usr/ports/www

creating build/temp.freebsd-7.0-RELEASE-p3-amd64-2.6/usr/ports/www/mod_python3

creating build/temp.freebsd-7.0-RELEASE-p3-amd64-2.6/usr/ports/www/mod_python3/work

creating build/temp.freebsd-7.0-RELEASE-p3-amd64-2.6/usr/ports/www/mod_python3/work/mod_python-3.3.1

creating build/temp.freebsd-7.0-RELEASE-p3-amd64-2.6/usr/ports/www/mod_python3/work/mod_python-3.3.1/src

cc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -O -pipe -march=athlon64 -fPIC -I/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/include -I/usr/local/include/python2.6 -c /usr/ports/www/mod_python3/work/mod_python-3.3.1/src/psp_string.c -o build/temp.freebsd-7.0-RELEASE-p3-amd64-2.6/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/psp_string.o

cc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -O -pipe -march=athlon64 -fPIC -I/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/include -I/usr/local/include/python2.6 -c /usr/ports/www/mod_python3/work/mod_python-3.3.1/src/psp_parser.c -o build/temp.freebsd-7.0-RELEASE-p3-amd64-2.6/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/psp_parser.o

psp_parser.c:1436: warning: 'yyunput' defined but not used

cc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -O -pipe -march=athlon64 -fPIC -I/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/include -I/usr/local/include/python2.6 -c /usr/ports/www/mod_python3/work/mod_python-3.3.1/src/_pspmodule.c -o build/temp.freebsd-7.0-RELEASE-p3-amd64-2.6/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/_pspmodule.o

/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/_pspmodule.c:32: warning: 'yy_init_globals' defined but not used

gcc -shared -O -pipe -march=athlon64 build/temp.freebsd-7.0-RELEASE-p3-amd64-2.6/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/psp_string.o build/temp.freebsd-7.0-RELEASE-p3-amd64-2.6/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/psp_parser.o build/temp.freebsd-7.0-RELEASE-p3-amd64-2.6/usr/ports/www/mod_python3/work/mod_python-3.3.1/src/_pspmodule.o -lpython2.6 -o build/lib.freebsd-7.0-RELEASE-p3-amd64-2.6/mod_python/_psp.so

/usr/bin/ld: cannot find -lpython2.6

error: command 'gcc' failed with exit status 1

*** Error code 1



Stop in /usr/ports/www/mod_python3/work/mod_python-3.3.1/dist.

*** Error code 1



Stop in /usr/ports/www/mod_python3/work/mod_python-3.3.1.

*** Error code 1



Stop in /usr/ports/www/mod_python3.

** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portinstall.45460.0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=mod_python-3.3.1 UPGRADE_PORT_VER=3.3.1 make FETCH_BEFORE_ARGS=-q
** Fix the problem and try again.
** Listing the failed packages (*:skipped / !:failed)
	! www/mod_python3 (mod_python-3.3.1)	(new compiler error)
--->  Packages processed: 0 done, 0 ignored, 0 skipped and 1 failed
 
Old 04-16-2009, 09:01 AM   #2
kentyler
Member
 
Registered: Dec 2008
Location: Cleveland Ohio
Distribution: CentOS
Posts: 235

Rep: Reputation: 36
It looks like your /usr/local/lib is not in the ld.so.conf or library path. If you add it then the linker should find it after running ldconfig -v.

You could copy the library to /usr/lib also and do ldconfig -v

The scripts can find it because they look everyplace by default, the linker can't because it looks in place that are defined in the config.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FreeBSD 7.0 - kernel building very slow ivanatora *BSD 1 05-19-2008 02:22 AM
mod_python - is there an equivalent to $_SERVER['PHP_SELF'] in mod_python? BrianK Programming 2 04-28-2008 10:46 PM
apache/mod_python problem: ImportError: No module named mod_python.apache BrianK Linux - Software 2 10-10-2007 06:13 PM
mod_python error blong4life Linux - Software 0 06-26-2007 12:15 PM
mod_python config error darthtux Programming 1 05-21-2005 07:27 PM


All times are GMT -5. The time now is 01:04 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration