Failed compiling Dualsphysics
HI, I am trying to compile Dualsphysics. However, I got some link error, as shown below
/usr/local/bin/ld: ../lib/linux_gcc/libjvtklib_64.a(JVtkPolyData.o): in function `JVtk::JVtkPolyData::LoadFileVtk(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
JVtkPolyData.cpp:(.text+0x2716): undefined reference to `std::__istream_extract(std::istream&, char*, long)'
/usr/local/bin/ld: JVtkPolyData.cpp:(.text+0x2932): undefined reference to `std::__istream_extract(std::istream&, char*, long)'
/usr/local/bin/ld: JVtkPolyData.cpp:(.text+0x2b7f): undefined reference to `std::__istream_extract(std::istream&, char*, long)'
/usr/local/bin/ld: JVtkPolyData.cpp:(.text+0x2ba0): undefined reference to `std::__istream_extract(std::istream&, char*, long)'
/usr/local/bin/ld: JVtkPolyData.cpp:(.text+0x2c04): undefined reference to `std::__istream_extract(std::istream&, char*, long)'
/usr/local/bin/ld: ../lib/linux_gcc/libjvtklib_64.a(JVtkArray.o):JVtkArray.cpp:(.text+0x6bed): more undefined references to `std::__istream_extract(std::istream&, char*, long)' follow
collect2: error: ld returned 1 exit status
It is weird that i can not find the file named JVtkPolyData.cpp
Besides, also failed when i compile the DSPH_V4.0_LiquidGas,
/usr/local/bin/ld: JSph.o: in function `JSph::~JSph()':
JSph.cpp:(.text+0x1e60): undefined reference to `JWaveGen::~JWaveGen()'
/usr/local/bin/ld: JSph.o: in function `JSph::SavePartData(unsigned int, unsigned int, unsigned int const*, tdouble3 const*, tfloat3 const*, float const*, unsigned int, tdouble3 const*, JSph::StInfoPartPlus const*)':
JSph.cpp:(.text+0x9b52): undefined reference to `JFormatFiles2::SaveCsv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, tfloat3 const*, unsigned int, JFormatFiles2::StScalarData const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/usr/local/bin/ld: JSph.cpp:(.text+0x9c69): undefined reference to `JFormatFiles2::SaveVtk(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, tfloat3 const*, unsigned int, JFormatFiles2::StScalarData const*)'
/usr/local/bin/ld: JSph.o: in function `JSph::SavePartDataMP(unsigned int, unsigned int, unsigned int const*, tdouble3 const*, tfloat3 const*, float const*, unsigned short const*, unsigned int, tdouble3 const*, JSph::StInfoPartPlus const*)':
JSph.cpp:(.text+0xb10f): undefined reference to `JFormatFiles2::SaveCsv(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, tfloat3 const*, unsigned int, JFormatFiles2::StScalarData const*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/usr/local/bin/ld: JSph.cpp:(.text+0xb21e): undefined reference to `JFormatFiles2::SaveVtk(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, unsigned int, tfloat3 const*, unsigned int, JFormatFiles2::StScalarData const*)'
/usr/local/bin/ld: JSph.o: in function `JSph::SaveDomainVtk(unsigned int, tdouble3 const*) const':
JSph.cpp:(.text+0xb605): undefined reference to `JFormatFiles2::SaveVtkBoxes(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned int, tfloat3 const*, float)'
/usr/local/bin/ld: JSph.o: in function `JSph::SaveMapCellsVtk(float) const':
JSph.cpp:(.text+0xbdcd): undefined reference to `JFormatFiles2::SaveVtkCells(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, tfloat3 const&, tuint3 const&, float)'
/usr/local/bin/ld: JSph.o: in function `JSph::LoadCaseConfig()':
JSph.cpp:(.text+0x15d14): undefined reference to `JWaveGen::JWaveGen(JLog2*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, JXml*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/local/bin/ld: JSph.cpp:(.text+0x15eb7): undefined reference to `JWaveGen::ConfigPaddle(unsigned short, unsigned short, unsigned int, unsigned int)'
/usr/local/bin/ld: JSphCpu.o: in function `JSphCpu::RunMotion(double)':
JSphCpu.cpp:(.text+0x9522e): undefined reference to `JWaveGen::GetMotion(unsigned int, double, double, tdouble3&, tmatrix4d&, unsigned int&, unsigned int&)'
/usr/local/bin/ld: JSphCpu.o: in function `JSphCpu::InitRun()':
JSphCpu.cpp:(.text+0x969d2): undefined reference to `JWaveGen::Init(double, tfloat3, bool, TpCellOrder, float, double, float, float, int, tdouble3, tdouble3, tdouble3)'
/usr/local/bin/ld: JSphCpu.cpp:(.text+0x96a30): undefined reference to `JWaveGen::VisuConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/usr/local/bin/ld: JSphGpu.o: in function `JSphGpu::InitRun()':
JSphGpu.cpp:(.text+0x5c70): undefined reference to `JWaveGen::Init(double, tfloat3, bool, TpCellOrder, float, double, float, float, int, tdouble3, tdouble3, tdouble3)'
/usr/local/bin/ld: JSphGpu.cpp:(.text+0x5cce): undefined reference to `JWaveGen::VisuConfig(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
/usr/local/bin/ld: JSphGpu.o: in function `JSphGpu::RunMotion(double)':
JSphGpu.cpp:(.text+0x885f): undefined reference to `JWaveGen::GetMotion(unsigned int, double, double, tdouble3&, tmatrix4d&, unsigned int&, unsigned int&)'
collect2: error: ld returned 1 exit status
How can i solve the problems, my environment is gcc-8.4.0, cuda-10.2
Debug Trace
Notice |
rich is deprecated. Use FormatService::renderHtml($content, Formats\RichFormat::FORMAT_KEY) instead. #0 [internal function]: gdn_ErrorHandler(16384, 'rich is depreca...', '/var/www/forums...', 950, Array) #1 /var/www/forums-dual-sphysics-org/library/core/functions.general.php(950): trigger_error('rich is depreca...', 16384) #2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1729): deprecated('rich', 'FormatService::...') #3 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::rich('[{"insert":"HI,...') #4 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(197): Gdn_Format::to('[{"insert":"HI,...', 'Rich') #5 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->index('2573', 'failed-compilin...', '') #6 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array) #7 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch() #8 {main} |
Notice |
rich is deprecated. Use FormatService::renderHtml($content, Formats\RichFormat::FORMAT_KEY) instead. #0 [internal function]: gdn_ErrorHandler(16384, 'rich is depreca...', '/var/www/forums...', 950, Array) #1 /var/www/forums-dual-sphysics-org/library/core/functions.general.php(950): trigger_error('rich is depreca...', 16384) #2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1729): deprecated('rich', 'FormatService::...') #3 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::rich('[{"insert":"HI,...') #4 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(24): Gdn_Format::to('[{"insert":"HI,...', 'Rich') #5 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/discussion.php(89): formatBody(Object(stdClass)) #6 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/index.php(31): include('/var/www/forums...') #7 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(778): include('/var/www/forums...') #8 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(1382): Gdn_Controller->fetchView('', false, false) #9 /var/www/forums-dual-sphysics-org/library/core/class.pluggable.php(217): Gdn_Controller->xRender() #10 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(310): Gdn_Pluggable->__call('render', Array) #11 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->index('2573', 'failed-compilin...', '') #12 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array) #13 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch() #14 {main} |
Notice |
rich is deprecated. Use FormatService::renderHtml($content, Formats\RichFormat::FORMAT_KEY) instead. #0 [internal function]: gdn_ErrorHandler(16384, 'rich is depreca...', '/var/www/forums...', 950, Array) #1 /var/www/forums-dual-sphysics-org/library/core/functions.general.php(950): trigger_error('rich is depreca...', 16384) #2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1729): deprecated('rich', 'FormatService::...') #3 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::rich('[{"insert":{"me...') #4 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(24): Gdn_Format::to('[{"insert":{"me...', 'Rich') #5 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(170): formatBody(Object(stdClass)) #6 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/comments.php(19): writeComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 1) #7 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/index.php(53): include('/var/www/forums...') #8 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(778): include('/var/www/forums...') #9 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(1382): Gdn_Controller->fetchView('', false, false) #10 /var/www/forums-dual-sphysics-org/library/core/class.pluggable.php(217): Gdn_Controller->xRender() #11 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(310): Gdn_Pluggable->__call('render', Array) #12 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->index('2573', 'failed-compilin...', '') #13 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array) #14 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch() #15 {main} |
Notice |
rich is deprecated. Use FormatService::renderHtml($content, Formats\RichFormat::FORMAT_KEY) instead. #0 [internal function]: gdn_ErrorHandler(16384, 'rich is depreca...', '/var/www/forums...', 950, Array) #1 /var/www/forums-dual-sphysics-org/library/core/functions.general.php(950): trigger_error('rich is depreca...', 16384) #2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1729): deprecated('rich', 'FormatService::...') #3 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::rich('[{"insert":"\\n"...') #4 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(24): Gdn_Format::to('[{"insert":"\\n"...', 'Rich') #5 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(170): formatBody(Object(stdClass)) #6 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/comments.php(19): writeComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 2) #7 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/index.php(53): include('/var/www/forums...') #8 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(778): include('/var/www/forums...') #9 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(1382): Gdn_Controller->fetchView('', false, false) #10 /var/www/forums-dual-sphysics-org/library/core/class.pluggable.php(217): Gdn_Controller->xRender() #11 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(310): Gdn_Pluggable->__call('render', Array) #12 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->index('2573', 'failed-compilin...', '') #13 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array) #14 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch() #15 {main} |
Notice |
rich is deprecated. Use FormatService::renderHtml($content, Formats\RichFormat::FORMAT_KEY) instead. #0 [internal function]: gdn_ErrorHandler(16384, 'rich is depreca...', '/var/www/forums...', 950, Array) #1 /var/www/forums-dual-sphysics-org/library/core/functions.general.php(950): trigger_error('rich is depreca...', 16384) #2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1729): deprecated('rich', 'FormatService::...') #3 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::rich('[{"insert":{"me...') #4 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(24): Gdn_Format::to('[{"insert":{"me...', 'Rich') #5 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(170): formatBody(Object(stdClass)) #6 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/comments.php(19): writeComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 3) #7 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/index.php(53): include('/var/www/forums...') #8 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(778): include('/var/www/forums...') #9 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(1382): Gdn_Controller->fetchView('', false, false) #10 /var/www/forums-dual-sphysics-org/library/core/class.pluggable.php(217): Gdn_Controller->xRender() #11 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(310): Gdn_Pluggable->__call('render', Array) #12 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->index('2573', 'failed-compilin...', '') #13 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array) #14 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch() #15 {main} |
Notice |
rich is deprecated. Use FormatService::renderHtml($content, Formats\RichFormat::FORMAT_KEY) instead. #0 [internal function]: gdn_ErrorHandler(16384, 'rich is depreca...', '/var/www/forums...', 950, Array) #1 /var/www/forums-dual-sphysics-org/library/core/functions.general.php(950): trigger_error('rich is depreca...', 16384) #2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1729): deprecated('rich', 'FormatService::...') #3 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::rich('[{"insert":{"me...') #4 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(24): Gdn_Format::to('[{"insert":{"me...', 'Rich') #5 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(170): formatBody(Object(stdClass)) #6 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/comments.php(19): writeComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 4) #7 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/index.php(53): include('/var/www/forums...') #8 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(778): include('/var/www/forums...') #9 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(1382): Gdn_Controller->fetchView('', false, false) #10 /var/www/forums-dual-sphysics-org/library/core/class.pluggable.php(217): Gdn_Controller->xRender() #11 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(310): Gdn_Pluggable->__call('render', Array) #12 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->index('2573', 'failed-compilin...', '') #13 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array) #14 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch() #15 {main} |
Notice |
rich is deprecated. Use FormatService::renderHtml($content, Formats\RichFormat::FORMAT_KEY) instead. #0 [internal function]: gdn_ErrorHandler(16384, 'rich is depreca...', '/var/www/forums...', 950, Array) #1 /var/www/forums-dual-sphysics-org/library/core/functions.general.php(950): trigger_error('rich is depreca...', 16384) #2 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1729): deprecated('rich', 'FormatService::...') #3 /var/www/forums-dual-sphysics-org/library/core/class.format.php(1479): Gdn_Format::rich('[{"insert":{"me...') #4 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(24): Gdn_Format::to('[{"insert":{"me...', 'Rich') #5 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/helper_functions.php(170): formatBody(Object(stdClass)) #6 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/comments.php(19): writeComment(Object(stdClass), Object(DiscussionController), Object(Gdn_Session), 5) #7 /var/www/forums-dual-sphysics-org/applications/vanilla/views/discussion/index.php(53): include('/var/www/forums...') #8 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(778): include('/var/www/forums...') #9 /var/www/forums-dual-sphysics-org/library/core/class.controller.php(1382): Gdn_Controller->fetchView('', false, false) #10 /var/www/forums-dual-sphysics-org/library/core/class.pluggable.php(217): Gdn_Controller->xRender() #11 /var/www/forums-dual-sphysics-org/applications/vanilla/controllers/class.discussioncontroller.php(310): Gdn_Pluggable->__call('render', Array) #12 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(862): DiscussionController->index('2573', 'failed-compilin...', '') #13 /var/www/forums-dual-sphysics-org/library/core/class.dispatcher.php(279): Gdn_Dispatcher->dispatchController(Object(Gdn_Request), Array) #14 /var/www/forums-dual-sphysics-org/index.php(29): Gdn_Dispatcher->dispatch() #15 {main} |
Comments
@imartinezestevez @jmdalonso
@joost
The gcc version you are using is different than the version used to compile the precompiled libraries. Try to include the following option in the Makefile: CCFLAGS+=-D_GLIBCXX_USE_CXX11_ABI=0
@imartinezestevez
I'm facing the same issue. The suggested solution did not work. Which gcc version was used for the precompiled libraries?
@imartinezestevez
Nevermind. I got it to compile with GCC 11