I'm following a short bnfc example, to generate an haskell parser. When I launch the make command I get these errors:
latex DocCalc.tex; dvips DocCalc.dvi -o DocCalc.ps
/bin/sh: 1: latex: not found
/bin/sh: 1: dvips: not found
make: *** [all] Error 127
I don't have latex installed, neither divps (what is the last?). So I removed the line:
latex DocCalc.tex; dvips DocCalc.dvi -o DocCalc.ps
in the make file, because I don't know exactly the names of the needed packages to install, and because I don't need documetation files. So I relaunch the make command, and this time I get these errors, after the building phase:
Linking TestCalc ...
/usr/bin/ld: --hash-size=31: unknown option
/usr/bin/ld: use the --help option for usage information
collect2: error: ld returned 1 exit status
make: *** [all] Error 1
Can you help me to understand what I'm missing?
As kosmikus said, it's a problem caused from ghc and the gold linker.
I resolved my problem reading this question
Related
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
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.
I am trying to compile clang 3.9 on a 32 bit scientific linux.
The compilation process fails at 93% with the following error:
[ 93%] Linking CXX executable ../../bin/clang
/lib/ld-linux.so.2: could not read symbols: Memory exhausted
collect2: error: ld returned 1 exit status
gmake[2]: *** [bin/clang-3.9] Error 1
gmake[1]: *** [tools/driver/CMakeFiles/clang.dir/all]
Error 2 gmake: *** [all] Error 2
My machine has 8GB of RAM, and looking with top the memory usage evolution during linkage, I see that it fails after 3GB, which is the process virtual memory limit on 32bit linux.
I saw that for a quite similar problem, someone advised to compile the Release version, so I tried, but it fails with the same type of error (even if apparently going a little further):
[ 93%] Linking CXX executable ../../bin/clang
collect2: error: ld terminated with signal 11 [Segmentation fault]
/opt/rh/devtoolset-2/root/usr/libexec/gcc/i686-redhat-linux/4.8.2/ld: can not read symbols: Memory exhausted
gmake[2]: *** [bin/clang-3.9] Error 1
gmake[2]: *** Deleting file `bin/clang-3.9'
gmake[1]: *** [tools/driver/CMakeFiles/clang.dir/all] Error 2
gmake: *** [all] Error 2
Any ideas?
In GCC the following flags help ld in limited RAM environment:
-Wl,--no-keep-memory -Wl,--reduce-memory-overheads
I am trying to do some performance analysis of HTTP/1.1 and HTTP /2. But I have not been successful in installing the later one. I need both the protocols from the same implementation (e.g. H2O). The first problem I got while installing H2O is the openssl version in ubuntu 14.04. The I updated the version to 1.0.2 as suggested by 1. Then I got the following error messages:
In function `h2o_socket_ssl_get_selected_protocol':
/tmp/h2o/lib/common/socket.c:499: undefined reference to `SSL_get0_alpn_selected'
CMakeFiles/h2o.dir/lib/common/socket.c.o: In function `h2o_ssl_register_alpn_protocols':
/tmp/h2o/lib/common/socket.c:542: undefined reference to `SSL_CTX_set_alpn_select_cb'
collect2: error: ld returned 1 exit status
make[2]: *** [h2o] Error 1
make[1]: *** [CMakeFiles/h2o.dir/all] Error 2
make: *** [all] Error 2
Can anybody please help me here.
Try using Nginx. There is a lot more support for it. H2O is a little more complicated to setup and the docs aren't as well written.
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.