ITpp ld cannot find -lfftw3 -llapack and -lblas - fortran

I install all the external directories required for ITPP compilation(cmake, Itpp-external, Itpp-4.3.0), but still currently facing an error as following:
administrator#ubuntu:~/Desktop/EEP_CC4B9_SBSD3B4_SP_DSTS_2$ make
`itpp-config --cflags`
g++ itpp_ctrl.o rsc_code.o Rayleigh.o irreg_conv_code.o punctured_nsc_code.o dsts.o conv_code.o puncturer.o sphere_packing.o rayleigh_channel.o fileser.o punctured_rsc_code.o softbit.o nsc_code.o robprob.o softsource.o repeater.o ITpp.o -o EEP_CC4B9_SBSD3B4_SP_DSTS.exe -l fftw3 -l lapack -l blas -litpp
/usr/bin/ld: cannot find -lfftw3
/usr/bin/ld: cannot find -llapack
/usr/bin/ld: cannot find -lblas
collect2: error: ld returned 1 exit status
Makefile:50: recipe for target 'EEP_CC4B9_SBSD3B4_SP_DSTS.exe' failed
make: *** [EEP_CC4B9_SBSD3B4_SP_DSTS.exe] Error 1
Install the external directories with Fortran compiler. Your response will be highly appreciated.

Related

error in compilation with ld : __stack_chk_guard##GLIBC_2.17

I am compiling some files on the odroidC2 board (armv8-64bit) running Ubuntu 16.04.1, and I got the following error:
odroid#odroid64:~/flext-master/tutorial/simple1$ g++ -fPIC -L/usr/lib -pthread -shared -Wl,-S -L/usr/local/src/pd/bin -L/usr/local/lib -o pd-linux/release-single/simple1.pd_linux pd-linux/release-single/main.opp -lflext-pd_s
/usr/bin/ld: /usr/local/lib/libflext-pd_s.a(libflext_pd_s_la-flxlet.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against external symbol `__stack_chk_guard##GLIBC_2.17' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: /usr/local/lib/libflext-pd_s.a(libflext_pd_s_la-flxlet.o)(.text+0x344): unresolvable R_AARCH64_ADR_PREL_PG_HI21 relocation against symbol `__stack_chk_guard##GLIBC_2.17'
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
As you can see the -fPIC option is present. So I don't understand why the compiler suggest to "recompile with -fPIC". Any Idea?
The problem is not in the pd-linux/release-single/main.opp (BTW, maybe .cpp?) that you're compiling with -fPIC, but in the libflext-pd_s.a archive that contains an object libflext_pd_s_la-flxlet.o which is not compiled with -fPIC, so you need to recompile flext library properly.

How to eliminate ld errors in ubuntu

I'm getting following errors after running make command:
/usr/bin/ld: cannot find -lGLESv2
/usr/bin/ld: cannot find -lepoxy
/usr/bin/ld: cannot find -lEGL
/usr/bin/ld: cannot find -lGLESv2
/usr/bin/ld: cannot find -lepoxy
/usr/bin/ld: cannot find -lEGL
/usr/bin/ld: cannot find -lGLESv2
/usr/bin/ld: cannot find -lepoxy
/usr/bin/ld: cannot find -lEGL
/usr/bin/ld: cannot find -laio
/usr/bin/ld: cannot find -lcurl
/usr/bin/ld: cannot find -lssh2
/usr/bin/ld: cannot find -lncursesw
/usr/bin/ld: cannot find -lSDL
collect2: error: ld returned 1 exit status
main/CMakeFiles/esesc.dir/build.make:163: recipe for target 'main/esesc' failed
make[2]: *** [main/esesc] Error 1
CMakeFiles/Makefile2:1041: recipe for target 'main/CMakeFiles/esesc.dir/all' failed
make[1]: *** [main/CMakeFiles/esesc.dir/all] Error 2
Makefile:75: recipe for target 'all' failed
make: *** [all] Error 2
I have tried to search online in these links:
ld cannot find an existing library
usr/bin/ld: cannot find -l<nameOfTheLibrary>
Here I see that every library has to be linked symbolically with the existing library but I'm unsure of doing that. Can anyone please suggest me any technique for doing this?
I know locate <library> and ln commands. Now how to eliminate the above errors using this? Can anyone please elaborate on this? Thanks in advance.
it means you didn't install needed dependencies.
did you install at least libs from this manual? https://github.com/masc-ucsc/esesc/blob/master/docs/Usage.md
sudo apt-get install libepoxy0 libepoxy-dev
should remove epoxy warning, for example
Your link command probably needs a -L to precede those -l.
Search your system for those libnames, for example GLESv2.
I use "locate GLESv2". (Note: locate uses what "sudo updatedb" updates)
On my Unbuntu, the following lines are reported by locate.
> /usr/lib/x86_64-linux-gnu/libGLESv2.so
> /usr/lib/x86_64-linux-gnu/mesa-egl/libGLESv2.so
> /usr/lib/x86_64-linux-gnu/mesa-egl/libGLESv2.so.2
> /usr/lib/x86_64-linux-gnu/mesa-egl/libGLESv2.so.2.0.0
For the so (the shared object library) found in the first dir, you might try adding the following to your build command.
-L/usr/lib/x86_64-linux-gnu
And repeat for any library name not yet resolved.
Here is an example from my Makefile - note the relative path to a collection of libraries I wrote in a directory "bag"
R01: dtb_acs.cc
rm -f dtb_acs
g++ -m64 -O3 -ggdb -std=c++14 -Wall-Wextra -Wshadow -Wnon-virtual-dtor
-pedantic -Wcast-align -Wcast-qual -Wconversion -Wpointer-arith -Wunused
-Woverloaded-virtual
-O0 dtb_acs.cc -o dtb_acs
-L../../bag -lbag_i686 -lposix_i686 -lrt -pthread
^^^^^^^^^^^ three -l<libname> are in the -L dir
If needed (because the effort did not resolve anything), try adding -l and a specific library, such as -llibGLESv2.so (or .a, as the case may be)
Good luck.

link to boost library

I am trying to build a project using Boost's Asio , but I am getting linking error:
g++ -o homework main.o -L/usr/lib64/qt-3.3/lib -L/usr/X11R6/lib64 -L/home/student/boost_1_46_1/libs -lboost_system -lqt-mt -lXext -lX11 -lm
/usr/bin/ld: cannot find -lboost_system
collect2: ld returned 1 exit status
make: *** [homework] Error 1
How can I resolve the problem?
I think it's a typo. You said -l boost_system in command line, while it should be -lboost_system.
Update:
Nope! I get my answer back. Just found that it's OK to pass -l <libname>. In fact it's equal to -l<libname>. As others said, double-check paths.

Messed up Berkeley DB error message with C++ build of Fix8 in CentOS Linux

I built BerkleyDB successfully with the instructions found at:
http://www.linuxfromscratch.org/blfs/view/svn/server/db.html
I am trying to build Fix8 (fix8.org) on my CentOS 6.3 with a required dependency of BerkleyDB but I get a failed error:
libtool: link: g++ -g -O2 -Wall -rdynamic -o .libs/f8c f8c.o f8cutils.o f8precomp.o
-lrt /home/caustic/dev/dakka-fix8-b0a60e9/runtime/.libs/libfix8.so -lcrypt
-lPocoFoundation -lPocoNet -lPocoUtil -ltbb -L/home/caustic/dev/dakka-fix8-b0a60e9
/runtime -ldb_cxx -lz -Wl,-rpath -Wl,/usr/local/lib
/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../..
/../libdb_cxx.so when searching for -ldb_cxx
/usr/bin/ld: skipping incompatible /usr/lib/libdb_cxx.so when searching for -ldb_cxx
/usr/bin/ld: cannot find -ldb_cxx
collect2: ld returned 1 exit status
make: *** [f8c] Error 1
When I "ls" the specified problem file, I get:
[root#hft x86_64-redhat-linux]# ls /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../.. /../libdb_cxx.so
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../libdb_cxx.so
[root#hft x86_64-redhat-linux]# ls -l /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../libdb_cxx.so
lrwxrwxrwx. 1 root root 16 Nov 23 17:36 /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../libdb_cxx.so -> libdb_cxx-5.3.so
I removed all older or conflicting instances of BerkleyDB using "yum remove". IS there any hints that can get me on track with this?
Thanks

Errors adding external lib in eclipse

I want to add an external library in eclipse,this how i proceed:
Projet/Properties/C++ Build/Gcc Linkers/libraries/,
-l /home/Jackie/CodingPackages/SB5/Src/GLTools/include/ and
-L /home/Jackie/CodingPackages/SB5/Src/GLTools/src/
this is the errors i got :
make all
Building target: Chap1
Invoking: GCC C++ Linker
g++ -L/home/prince/CodingPackages/SB5/Src/GLTools/src/ -o"Chap1" ./main.o -lglut -l/home/Jackie/CodingPackages/SB5/Src/GLTools/include/ -lGLU -lGL
/usr/bin/ld: fatal error: /home/Jackie/CodingPackages/SB5/Src/GLTools/include/: mmap offset 0 size 4096 failed: No such device
collect2: ld returned 1 exit status
Include directories are specified with -I (capital i)