Hello Group,
I work on a windows machine and have installed ubuntu 20.04 as a dual boot. I am following the instructions in the tutorial video as is.
When i copy paste the following compile command in the website,
g++ -O3 -fopenmp -std=c++11 -Wno-return-type -fPIC -no-pie main.cpp -L ./ -l sparselizard -pthread -l dl -I headers -o slexe;
I expected it to compile but instead got a host of errors. I have put some lines below,
usr/bin/ld: .//libsparselizard.a(sl.o): in function `std::vector<std::shared_ptr<operation>, std::allocator<std::shared_ptr<operation> > >::operator=(std::vector<std::shared_ptr<operation>, std::allocator<std::shared_ptr<operation> > > const&) [clone .isra.0]':
sl.cpp:(.text+0x34b): undefined reference to `__libc_single_threaded'
/usr/bin/ld: sl.cpp:(.text+0x3aa): undefined reference to `__libc_single_threaded'
/usr/bin/ld: sl.cpp:(.text+0x4a4): undefined reference to `__libc_single_threaded'
/usr/bin/ld: sl.cpp:(.text+0x4e5): undefined reference to `__libc_single_threaded'
/usr/bin/ld: sl.cpp:(.text+0x5b3): undefined reference to `__libc_single_threaded'
/usr/bin/ld: .//libsparselizard.a(sl.o):sl.cpp:(.text+0x613): more undefined references to `__libc_single_threaded' follow
/usr/bin/ld: .//libsparselizard.a(sl.o): in function `std::vector<std::shared_ptr<operation>, std::allocator<std::shared_ptr<operation> > >::operator=(std::vector<std::shared_ptr<operation>, std::allocator<std::shared_ptr<operation> > > const&) [clone .isra.0]':
sl.cpp:(.text+0x84e): undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: .//libsparselizard.a(sl.o): in function `std::vector<vec, std::allocator<vec> >::operator=(std::vector<vec, std::allocator<vec> > const&) [clone .isra.0]':
sl.cpp:(.text+0x8cb): undefined reference to `__libc_single_threaded'
/usr/bin/ld: sl.cpp:(.text+0x92a): undefined reference to `__libc_single_threaded'
/usr/bin/ld: sl.cpp:(.text+0xa24): undefined reference to `__libc_single_threaded'
/usr/bin/ld: sl.cpp:(.text+0xa65): undefined reference to `__libc_single_threaded'
/usr/bin/ld: sl.cpp:(.text+0xb33): undefined reference to `__libc_single_threaded'
/usr/bin/ld: .//libsparselizard.a(sl.o):sl.cpp:(.text+0xb93): more undefined references to `__libc_single_threaded' follow
/usr/bin/ld: .//libsparselizard.a(sl.o): in function `std::vector<vec, std::allocator<vec> >::operator=(std::vector<vec, std::allocator<vec> > const&) [clone .isra.0]':
sl.cpp:(.text+0xdce): undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: .//libsparselizard.a(sl.o): in function `sl::exchange(std::vector<int, std::allocator<int> >, std::vector<densemat, std::allocator<densemat> >, std::vector<densemat, std::allocator<densemat> >)':
sl.cpp:(.text+0x2030): undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: sl.cpp:(.text+0x206a): undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: sl.cpp:(.text+0x2074): undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: sl.cpp:(.text+0x207e): undefined reference to `std::__throw_bad_array_new_length()'
/usr/bin/ld: .//libsparselizard.a(sl.o):sl.cpp:(.text+0x2088): more undefined references to `std::__throw_bad_array_new_length()' follow
/usr/bin/ld: .//libsparselizard.a(sl.o): in function `sl::t()':
sl.cpp:(.text+0x3165): undefined reference to `__libc_single_threaded'
See attachment for entire list of errors.
Is there any prerequisite to use the static library? I took the library from here,
Linux - Static library
(TUTORIAL VIDEO)
- Watch the tutorial video
- Download the static library here and open the folder in a terminal.
- Run 'g++ -O3 -fopenmp -std=c++11 -Wno-return-type -fPIC -no-pie
main.cpp -L ./ -l sparselizard -pthread -l dl -I headers -o slexe;'
- Run './slexe'
- Visualise the output .vtk file with ParaView
I have installed g++ , cmake, gfortran, gcc since i was trying to compile the source code earlier (which also i failed to do so)
Awaiting feedback!
- Arvind