astra-vision / weather-particle-simulator

Implementation of Fast Reactive Control for Illumination Through Rain and Snow (de Charette et al., 2012)
Other
10 stars 3 forks source link

Runtime error: ./AHLSimulation: symbol lookup error: ./AHLSimulation: undefined symbol: _ZN5osgDB14writeImageFileERKN3osg5ImageERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKNS_7OptionsE #5

Closed cjm-cai closed 1 week ago

cjm-cai commented 2 years ago

Hello,

First of all, thank you very much for this software. I've used the rain-rendering repo already, but I'd like to use more than just the default rain sim that's provided.

I'm trying to setup the environment in Ubuntu 20.04.4 and I get the following error when running

./AHLSimulation: symbol lookup error: ./AHLSimulation: undefined symbol: _ZN5osgDB14writeImageFileERKN3osg5ImageERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEPKNS_7OptionsE

Could somebody with a successful build post the compiler versions they're using? I've had to play around with various versions of gcc, clang, etc. because using the default cc-4.7.4 and c++-4.7.4 compilers led to many cmake errors. I also added the flag to cmake -DCMAKE_CXX_FLAGS="-std=c++11". I'm aware I'm using old build tools, but using the up-to-date versions of these compilers throws many errors for me because these libraries are quite old.

For building opencv-3.2.0 from source, I run cmake with

cmake -DWITH_QT=ON -DWITH_OPENGL=ON -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DENABLE_PRECOMPILED_HEADERS=OFF -DCMAKE_C_COMPILER=/usr/bin/clang -DCMAKE_CXX_COMPILER=/usr/bin/clang++ -DCMAKE_CXX_FLAGS="-std=c++11" -DCUDA_NVCC_FLAGS="-std=c++11" ..

clang version 10.0.0-4ubuntu1 Target: x86_64-pc-linux-gnu Thread model: posix InstalledDir: /usr/bin

and running make with

make -j4 CC=clang CXX=clang++

for building osg, I ran cmake with

cmake -DCMAKE_C_COMPILER=/usr/bin/gcc -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_CXX_FLAGS="-std=c++11" ..

with

gcc (Ubuntu/Linaro 4.7.3-12ubuntu1) 4.7.3 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

and

g++ (Ubuntu/Linaro 4.7.3-12ubuntu1) 4.7.3 Copyright (C) 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

and then running make with

make -j4 CC=gcc CXX=g++

and for boost-1.62.0 I followed the guide directly.

If you have any insights as to why this isn't working, please do let me know. I would appreciate if someone would post the exact versions of their build tools.

rdecharette commented 1 year ago

Hello,

so sorry for the extreme delay, this issue went below my radar. Did you manage to solve this or shall I investigate ?

Not sure I updated anything since my last compilation of this project, but I currently have:

$ gcc --version
gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0

$ cmake --version 
cmake version 3.16.3

$ make --version
GNU Make 4.2.1

Let me know if I can help further.