HDF5 package error compile - centos6

I have compiled the HDF5 package by GCC 4.9.2, CentOS 6.8 and std=c++11, but I get error:
for package Linux 3.10 CentOS 7 x86_64 I get :
./host/src/hdf5/lib/libhdf5.so: undefined reference to `memcpy#GLIBC_2.14'
collect2: error: ld returned 1 exit status
for package Linux 2.6 CentOS 6 x86_64 I get :
/opt/rh/devtoolset-3/root/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/ld: warning: libsz.so.2, needed by ./host/src/hdf5/lib/libhdf5.so, not found (try using -rpath or -rpath-link)
./host/src/hdf5/lib/libhdf5.so: undefined reference to `SZ_encoder_enabled'
./host/src/hdf5/lib/libhdf5.so: undefined reference to `SZ_BufftoBuffCompress'
./host/src/hdf5/lib/libhdf5.so: undefined reference to `SZ_BufftoBuffDecompress'
collect2: error: ld returned 1 exit status
Any idea to slove this?
Thank you

The compiler complains that it is not finding SZ_... routines. szip is an optional library for HDF5 that you have to download separately.
Two options:
Re-configure hdf5 to disable szip
download, build and install szip

Related

Downgrade GNU make version from 4.1 to 3.81 or 3.82

Could anyone please let me know how to downgrade GNU package. I tried to download make-3.82.tar.gz file and extracted it and ran .configure. Then tried to run make got below error,
/glob/glob.c:577 undefined reference to '__alloca'
glob/libglob.a(glob.o):/path/glob/glob.c:728 more undefined reference to '__alloca' follow
collect2: error: ld returned 1 exit status.
Makefile: 359: recipe for target 'make' failed.
Thanks

How to set parameter to solve some compile error like below when make R?

when compile R from source, configure was completed and some error arised in make step. How to set the compile parameter?
OS is CentOS release 6.9. I used conda to install R originally. For some error when installing some packages, i want to install R from source. A post said that may be libicu version matter. But after setting pathway in CFLAGS and LDFLAGS to find libicu*, these error still occurred. What is the problem?
./configure --prefix=/pathto/R_3.6.0 --enable-R-shlib CPPFLAGS="-I/usr/include -I/path/zlib_1.2.11/include -I/path/bzip2-1.0.6/include -I/path/xz-5.2.4/include -I/path/pcre-8.43/include" LDFLAGS="-L/usr/lib -L/usr/lib64 -L/path/zlib_1.2.11/lib -L/path/bzip2-1.0.6/lib -L/path/xz-5.2.4/lib -L/path/pcre-8.43/lib -Wl,-rpath=/path/pcre-8.43/lib -Wl,-rpath=/path/xz-5.2.4/lib"
make
../../lib/libR.so: undefined reference to `ucol_strcollIter_58'
../../lib/libR.so: undefined reference to `u_getVersion_58'
../../lib/libR.so: undefined reference to `uloc_setDefault_58'
../../lib/libR.so: undefined reference to `ucol_close_58'
../../lib/libR.so: undefined reference to `ucol_getLocaleByType_58'
../../lib/libR.so: undefined reference to `ucol_setAttribute_58'
../../lib/libR.so: undefined reference to `u_versionToString_58'
../../lib/libR.so: undefined reference to `ucol_open_58'
../../lib/libR.so: undefined reference to `uiter_setUTF8_58'
../../lib/libR.so: undefined reference to `ucol_setStrength_58'
collect2: ld returned 1 exit status
make[3]: *** [Makefile:145: R.bin] Error 1
make[3]: Leaving directory '/software/R-3.6.0/src/main'
make[2]: *** [Makefile:136: R] Error 2
make[2]: Leaving directory '/software/R-3.6.0/src/main'
make[1]: *** [Makefile:28: R] Error 1
make[1]: Leaving directory '/software/R-3.6.0/src'
make: *** [Makefile:61: R] Error 1
i tried again and download icu4c-58_2-src.tgz. Without installing icu, uncompressing the file and specifying -L/path/to/icu/source/lib/ in LDFLAGS and make will succeed.
Thanks Ren, I successfully install R with this commander "./configure --prefix=/path/to/location LDFLAGS="-L/usr/local/lib" . Where /usr/local/lib is the directory icu installed (wget https://github.com/unicode-org/icu/archive/release-58-3.tar.gz). I think it is the problem that anaconda/lib also contained libicuio.so.* files. After specifying certain LDFLAGS, it worked.

Trying to compile R Package RSAP

I'm trying to compile the R Package RSAP using the command
R CMD INSTALL RSAP
The necessary SAP library SAP NW RFCSDK is located in C:\nwrfcsdk.
I'm building on Windows 10 64
R version 3.4 32 bit (I tired 64 as well)
R tools with mingw32
It does not compile but terminates with the following errors:
c:/Rtools/mingw_32/bin/gcc -shared -s -static-libgcc -o RSAP.dll tmp.def RSAP.o -L. -LC:/nwrfcsdk/lib -lsapnwrfc -llibsapucum -Ld:/Compiler/gcc-4.9.3/local330/lib/i386 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-34~1.0/bin/i386 -lR
RSAP.o:RSAP.c:(.text+0x4b): undefined reference to `RfcPing#8'
RSAP.o:RSAP.c:(.text+0x23a): undefined reference to `RfcUTF8ToSAPUC#24'
RSAP.o:RSAP.c:(.text+0x2d5): undefined reference to `RfcUTF8ToSAPUC#24'
RSAP.o:RSAP.c:(.text+0x369): undefined reference to `RfcUTF8ToSAPUC#24'
RSAP.o:RSAP.c:(.text+0x3ef): undefined reference to `RfcSAPUCToUTF8#24'
RSAP.o:RSAP.c:(.text+0x4b8): undefined reference to `RfcSAPUCToUTF8#24'
RSAP.o:RSAP.c:(.text+0x645): undefined reference to `RfcUTF8ToSAPUC#24'
RSAP.o:RSAP.c:(.text+0x6e3): undefined reference to `RfcUTF8ToSAPUC#24'
RSAP.o:RSAP.c:(.text+0x719): undefined reference to `RfcOpenConnection#12'
RSAP.o:RSAP.c:(.text+0x923): undefined reference to `RfcCloseConnection#8'
...
and so on until it stops with
collect2.exe: error: ld returned 1 exit status
keine DLL erzeugt
ERROR: compilation failed for package 'RSAP'
* removing 'C:/Users/jmueller/R/win-library/3.4/RSAP'
* restoring previous 'C:/Users/jmueller/R/win-library/3.4/RSAP'
What am I doing wrong? Any help is highly appreciated!
This is what happens when you try to build RSAP in the 32-bit environment of R using the 64-bit version of the SAP NW RFC SDK. I had the same problem and after executing the following command in the 64-bit environment of RGui (with the 64-bit version of SAP NW RFC SDK located in C:\nwrfcsdk) the undefined references were gone.
Command:
install.packages('RSAP', repos=c('http://piersharding.com/R'), type="source", configure.args=c('--with-nwrfcsdk-include=C:/nwrfcsdk/include --with-nwrfcsdk-lib=C:/nwrfcsdk/lib'))
as described in:
https://github.com/piersharding/RSAP/blob/master/INSTALL

Can't install rPython package in R

I'm using CentOS 6.4 and I'm trying to install the R package 'rPython'. It failed with following messages. Anybody knows how to fix this? Thanks!
/usr/bin/ld: /usr/local/lib/python2.7/config/libpython2.7.a(dictobject.o): relocation R_X86_64_32S against `PyDict_Type' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/python2.7/config/libpython2.7.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [rPython.so] Error 1
ERROR: compilation failed for package ‘rPython’
* removing ‘/usr/lib64/R/library/rPython’
It seems that the default installation of Python on RHEL / CentOS,
etc. is not "shared enabled", i.e., it does not include libpython*.so. Just the libpython*.a static library. This prevents some Python
applications to run properly. There are instructions in different
places, (e.g., here or here) indicating how to install Python as a shared library on CentOS and related Linux flavours.

Library of opencl not found?

I am trying to compile an opencl sample code but I am getting the following error
/usr/bin/ld: cannot find -lOpenCL
/usr/bin/ld: cannot find -loclUtil_x86_64
/usr/bin/ld: cannot find -lshrutil_x86_64
collect2: error: ld returned 1 exit status
make: *** [../../..//OpenCL//bin//linux/release/DeviceQuery] Error 1
I am using intel based machine ...
My make file is
EXECUTABLE := DeviceQuery
CCFILES := devQury.cpp
include ../common/common_opencl.mk
Any help would be of great help
Thanks ,
Piyush
Make sure that the OpenCL library (libOpenCL.so) is present in /usr/lib. This should have been put in place by the driver, so you shouldn't have to do anything.
If not then copy libOpenCL.so present in your cuda toolkit (lib64) to the above location.
sudo cp /usr/local/cuda-7.0/lib64/libOpenCL.so /usr/lib
This fixes the error
/usr/bin/ld: cannot find -lOpenCL
collect2: error: ld returned 1 exit status
Have you installed the OpenCL SDK from either Intel or AMD? If not then perhaps you should follow these instructions. If you have an SDK installed then your makefile is probably missing -L... in the compiler command line, where ... is the path to the lib folder in the OpenCL SDK that should contain a file libOpenCL.a or something similar.

Resources