BIC-MNI / minc-toolkit

Metaproject uniting all the available minc tools
GNU General Public License v3.0
37 stars 15 forks source link

PCRE needs --disable-shared removed for liboobicpl.so to link #16

Closed gdevenyi closed 5 years ago

gdevenyi commented 10 years ago

Configure for PCRE includes --disable-shared, with that included linking fails, removing that and rebuilding PCRE fixes the problem.

Linking CXX executable create_lines
liboobicpl.so: undefined reference to `pcrecpp::RE::Init(char const*, pcrecpp::RE_Options const*)'
collect2: ld returned 1 exit status
make[2]: *** [oobicpl/create_lines] Error 1
make[1]: *** [oobicpl/CMakeFiles/create_lines.dir/all] Error 2
make: *** [all] Error 2
vfonov commented 10 years ago

Which OS /compiler are you using?

I haven’t seen this problem on Debian 6,7 , Ubuntu 10,12,14, MacOSX, CentOS 6.2 or Fedora 20 .

Maybe try compiling with -fkeep-inline-functions option ?

gdevenyi commented 10 years ago

Had this problem on Debian 6, @pipitone has experienced this on Ubuntu 12.04.

I can try with that option, but I still need to change build to get it to work.

Is there anything detrimental to making this change? I would've expected the build to "just work"

vfonov commented 10 years ago

Right now it just works on several other platforms.

rdvincent commented 10 years ago

I have not seen this problem on either Ubuntu 12.04 or 14.04.

gdevenyi commented 10 years ago

For more info, here's the cmake config I've been using for the build:

   cmake -DCMAKE_INSTALL_PREFIX="/opt/quarantine/minc-toolkit/1.0.04/build/" \
         -DMT_BUILD_C3D="ON" \
         -DMT_BUILD_MINC_ANTS="ON" \
         -DMT_BUILD_ITK_TOOLS="ON" \
         -DMT_BUILD_SHARED_LIBS="ON" \
         -DMT_BUILD_VISUAL_TOOLS="ON" \
     -DUSE_SYSTEM_GLUT="OFF" ../
rdvincent commented 10 years ago

I just built successfully on 12.04 with that config, so there must be something else affecting your build.

gdevenyi commented 10 years ago

This is on: Distributor ID: Debian Description: Debian GNU/Linux 6.0.9 (squeeze) Release: 6.0.9 Codename: squeeze

gdevenyi commented 10 years ago

Needed this for 1.9.06 as well.

gdevenyi commented 5 years ago

Stale