[Bro-Dev] #686: Python linker path problem

Bro Tracker bro at tracker.bro-ids.org
Thu Nov 17 16:39:35 PST 2011


#686: Python linker path problem
---------------------+--------------------
 Reporter:  robin    |      Owner:
     Type:  Problem  |     Status:  new
 Priority:  Normal   |  Milestone:  Bro2.0
Component:  Bro      |    Version:
 Keywords:           |
---------------------+--------------------
 This is on FreeBSD 8.1 with the python27 port installed and current
 master:

 {{{
 Scanning dependencies of target _SubnetTree
 [ 76%] Building CXX object
 aux/broctl/aux/pysubnettree/CMakeFiles/_SubnetTree.dir/SubnetTreePYTHON_wrap.cxx.o
 [ 76%] Building CXX object
 aux/broctl/aux/pysubnettree/CMakeFiles/_SubnetTree.dir/SubnetTree.cc.o
 [ 76%] Building C object
 aux/broctl/aux/pysubnettree/CMakeFiles/_SubnetTree.dir/patricia.c.o
 Linking CXX shared module _SubnetTree.so
 /usr/bin/ld: cannot find -lpython2.7
 *** Error code 1
 }}}

 Adding `-L/usr/local/lib` to `LDFLAGS` solves the problem.

 {{{

 # python --version
 Python 2.7.2
 # for i in --prefix --exec-prefix --includes --libs --cflags --ldflags; do
 python-config $i; done
 /usr/local
 /usr/local
 -I/usr/local/include/python2.7 -I/usr/local/include/python2.7
 -lutil -lm -lpython2.7
 -I/usr/local/include/python2.7 -I/usr/local/include/python2.7 -fno-strict-
 aliasing -O2 -pipe -fno-strict-aliasing -DNDEBUG -O2 -pipe -fno-strict-
 aliasing
 -L/usr/local/lib/python2.7/config -lutil -lm -lpython2.7 -Wl,--export-
 dynamic
 # ls -al /usr/local/lib/libpython*
 -r-xr-xr-x  1 root  wheel  2914926 Nov 17 14:12
 /usr/local/lib/libpython2.7.a
 lrwxr-xr-x  1 root  wheel       17 Nov 17 14:13
 /usr/local/lib/libpython2.7.so -> libpython2.7.so.1
 -r-xr-xr-x  1 root  wheel  1682880 Nov 17 14:13
 /usr/local/lib/libpython2.7.so.1

 }}}

-- 
Ticket URL: <http://tracker.bro-ids.org/bro/ticket/686>
Bro Tracker <http://tracker.bro-ids.org/bro>
Bro Issue Tracker



More information about the bro-dev mailing list