[Bro-Dev] #402: [PATCH] -fPIC is needed for FreeBSD/amd64

Bro Tracker bro at tracker.icir.org
Mon Feb 21 20:26:51 PST 2011


#402: [PATCH] -fPIC is needed for FreeBSD/amd64
-----------------------+-----------------------
  Reporter:  leres     |      Owner:  jsiwek
      Type:  Problem   |     Status:  assigned
  Priority:  Normal    |  Milestone:
 Component:  Broccoli  |    Version:  git/devel
Resolution:            |   Keywords:
-----------------------+-----------------------
Changes (by jsiwek):

 * owner:  kreibich => jsiwek
 * status:  new => assigned


Comment:

 The way the ./configure --help options are explained is definitely
 misleading.  --enable-static/shared only really apply to the libbroccoli
 library.  I'll change the wording.

 The _broccoli_intern.so you see being linked in your error is for the
 python bindings and that's done by SWIG.  It will always be represented in
 CMake terms as a MODULE.  From
 http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:add_library:

 > MODULE libraries are plugins that are not linked into other targets but
 may be loaded dynamically at runtime using dlopen-like functionality

 So I think you're taking the right approach in trying to get libbroccoli.a
 compiled with -fPIC, but I'm not sure right now why your patch didn't
 work.  Feel free to race me to a solution.

 Though, generally speaking, I want to say that if you are creating the
 python bindings module, then it may be better (i.e. more flexibly) to link
 it against a shared libbroccoli.so (and then this issue with -fPIC
 shouldn't be an issue because all shared libs on x86_64 should require
 PIC-enabling).

-- 
Ticket URL: <http://tracker.icir.org/bro/ticket/402#comment:2>
Bro Tracker <http://tracker.icir.org/bro>
Bro Issue Tracker



More information about the bro-dev mailing list