When I am trying to compile a C code in HP-UX I am getting the following error :
gcc -g -O2 -o autocode /disk1/peru-dev/NIKIRATOOLS/FLEX/lib/hpux64/libfl.a grammer.o tokens.o pgen.o javapgen.o
ld: Mismatched Data ABI. Expected None but found EF_IA_64_ABI64 in file /disk1/peru-dev/NIKIRATOOLS/FLEX/lib/hpux64/libfl.a[libmain.o]
Fatal error.
collect2: ld returned 1 exit status
gmake[1]: *** [autocode] Error 1
I am not able to understand this "Mismatched Data ABI" error. Please help me out.
Related
I get the following error while compiling xpdf using make. I've tried using the command:
LIBS=-lm make
However, it doesn't work. I know the problem is that the c compiler cannot recognise the math symbols in the source code because the math library is not available to it, but I don't know how to fix it.
[ 71%] Linking CXX executable pdftohtml
/usr/bin/ld: CMakeFiles/xpdf_objs.dir/Gfx.cc.o: undefined reference to symbol 'acos##GLIBC_2.2.5'
//usr/lib64/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[2]: *** [xpdf/CMakeFiles/pdftohtml.dir/build.make:219: xpdf/pdftohtml] Error 1
make[1]: *** [CMakeFiles/Makefile2:428: xpdf/CMakeFiles/pdftohtml.dir/all] Error 2
make: *** [Makefile:130: all] Error 2
I have put my Makefile and makeLists.txt on pastebin for more information
I realised I had to use the g++ compiler instead of gcc after reading the man page for gcc which stated:
The usual way to run GCC is to run the executable called gcc, or
machine-gcc when cross-compiling, or machine-gcc-version to run a
specific
version of GCC. When you compile C++ programs, you should invoke GCC as g++ instead.
I am stuck with this error:
mpif90 -o /Users/manfredo/Desktop/ED2/ED/build/ed_2.1-opt edmain.o -L/opt/local/lib/libgcc/ -lstdc++ -I/Users/manfredo/Desktop/ED2/ED/src/include -I/opt/local/include /Users/manfredo/Desktop/ED2/ED/build/ed_2.1-opt.a -lm -lz -L/opt/local/lib -lhdf5 -lhdf5_fortran
Undefined symbols for architecture x86_64:
"_calchydrosubsurface_", referenced from:
_ed_model_ in ed_2.1-opt.a(ed_model.o)
...
other similar errors
...
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make[1]: *** [/Users/manfredo/Desktop/ED2/ED/build/ed_2.1-opt] Error 1
make: *** [all] Error 2
I have tried adding -stdlib=libstdc++ or including the libraries lstdc++ or lstc++.6 as suggested here or here and I had already posted a question about the same error but still not able to fix it.
The compilation with mpif is needed. Any help will be appreciated.
I have the following problem compiling a C project into Linux Ubuntu 12.04 shell
I first execute:
make clean
and it work well
Thene I execute:
make all
and then I obtain the following error message:
gcc -L/usr/local/default/jre/lib/i386/client -o "atmosfs" ./bbfs.o ./cimeparser.o ./settingsparser.o ./log.o ./hashtable.o ./jniHelper.o ./decodeError.o -lpthread -lxml2 -lfuse -ljvm -lrt -ldl
/usr/bin/ld: cannot find -ljvm
collect2: ld returned 1 exit status
make: *** [atmosfs] Errore 1
As you can see the error is:
/usr/bin/ld: cannot find -ljvm
What can I do to try to solve this issue?
Tnx
I am currently trying to install rng-tools on OSX, as I have a specific need for it to speed up a certain simulator that I am currently using. At first, I faced the problem of not having argp, so I installed argp-standalone from Homebrew. However, I still receive the following error message when trying to make rng-tools:
gcc -g -O2 -o rngtest stats.o rngtest.o librngd.a
Undefined symbols for architecture x86_64:
"_argp_parse", referenced from:
_main in rngtest.o
"_argp_usage", referenced from:
_parse_opt in rngtest.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
make[2]: *** [rngtest] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
I checked /usr/local/include/argp.h and it does seem to contain the correct function definitions referenced in rngtest.c, so any thoughts on what might be the problem?
I just needed rngtest which I managed to compile on OSX using this https://github.com/fproulx/rngtest (which also needs brew install argp-standalone). I made that into a homebrew formula which can be obtained here: https://github.com/oderwat/homebrew-experiments
I'm trying to compile cgminer on Mac, and the compilation cannot complete, citing "ld: library not found for -lrt"
Exact terminal output:
CCLD cgminer
ld: library not found for -lrt
collect2: ld returned 1 exit status
make[1]: *** [cgminer] Error 1
make: *** [install-recursive] Error 1
Any solution for how to install the linker library via command line?