I'm trying to compile SNNS (Stuttgart Neural Network Simulator) is a software simulator for neural networks on Unix, but I got the following error message:
Ignore possible error messages for the following command:
ranlib libfunc.a
END OF COMMANDS THAT MAY FAIL
make[3]: Leaving directory `/home/fer/Desktop/SNNSv4.3/kernel/sources'
end of (re)making kernel libraries
gcc snns2c.o snns2clib.o ../../kernel/sources/libkernel.a ../../kernel/sources/libfunc.a -lm -ll -o snns2c
/usr/bin/ld: cannot find -ll
collect2: ld returned 1 exit status
But I don't know what I need to install, do you have an idea about this problem?
I think -ll is referring to the lex library libl, as per this message. You may need to modify that make file to link against flex.
I solved this problem after installing flex from the distro's official repository.
Related
I have written my own .c and am trying to link it to the necessary files in rabbitmq-c, but am unable to do so.
I have rabbitmq-c and its examples running properly.
I am using a centos 7 machine.
I have tried the advice of the answer on the post Build against rabbitmq-c
However,
When issuing the last step from that page
gcc -Llibrabbitmq/.libs -g -Wall -o test test.o -lrabbitmq
I get the error
"collect2: error: ld returned 1 exit status" and then a list of undefined references. The undefined references all begin with "die" if it has to do with me missing something specific.
Help would be greatly appreciated
I'm a beginner of programming. I am using Eclipse CDT for C programming. When I build any program, the console window shows the below message. Please tell me a specific way so that I could solve this problem.
Console window:
Info: Configuration "Debug" uses tool-chain "MinGW GCC" that is unsupported on this system, attempting to build anyway.
Info: Internal Builder is used for build
gcc -O0 -g3 -Wall -c -fmessage-length=0 -o test.o "..\\test.c"
gcc -o test.exe test.o
c:/mingw/bin/../lib/gcc/i686-pc-mingw32/4.9.2/../../../../i686-pc-mingw32/bin/ld.exe: cannot open output file test.exe: Permission denied
collect2.exe: error: ld returned 1 exit status
00:33:35 Build Finished (took 2s.385ms)
USUALLY(in my experience), LD errors result from you not including the libraries or linkers necessary. Go to your project, right click, select properties, under C build go to settings, GCC C compiler and includes and add the libraries.
Your operating system simply does not allow to modify a file while it is in use, so the compilation fails, because compiler can't remove the old executable and place a new one. To solve this, simply restart eclipse program.
I'm going through the tutorial on making an OS on http://wiki.osdev.org/Bare_Bones. When I try to link boot.o and kernel.o using this command: i686-elf-gcc -T linker.ld -o myos.bin -ffreestanding -O2 -nostdlib boot.o kernel.o -lgcc , I just get this error:
collect2: fatal error: cannot find 'ld'
compilation terminated.
I just installed fresh Ubuntu 15.10 that with gcc-5.2.1 and binutils-2.25.1 .
I have searched the internet for answers but nothing helped.
I also got once the same error during a pentest while I was trying to compile my exploit on the victim server.
In my case, the directory where the "ld" program was located had not been defined in the PATH environment variable, so I simply added it.
eg. export PATH=$PATH:/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin
I had this error while hacking a remote machine and trying to use gcc to compile an exploit on the victim machine.
I simply copied the program ld to /tmp/, the working directory where i was compiling my exploit exploit.c by running
cp /usr/bin/ld /tmp/ld
followed by the original gcc compile command and the compile worked.
I searched a lot to fix this issue and nothing worked but lastly i uninstalled MinGw and reinstalled it then did edited the environment variables again and then uninstalled and reinstalled vs code extensions then it worked.
I working on open source GHDL project for my project purpose installed ghdl-0.29-2.143svn.4.fc16.src.rpm consisting of ghdl 0.29 and gcc 4.3.4 through rpm -i and rpmbuild -ba command successfully.
In ghdl folder, I edited one ada program then I did make and make install : no errors but it creates problem changes in gcc version 4.6.3 (default) to 4.3.4 and no gcc program execution gave error:
error: C compiler cannot create executables
See `config.log' for more details."
In config.log file /usr/bin/ld: cannot find crtbegin.o: No such file or directory
/usr/bin/ld: cannot find -lgcc
/usr/bin/ld: cannot find -lgcc_s
collect2: ld returned 1 exit status
Thanks in advance
Regards
Raghu
Have you tried reinstalling glibc? That might work.
I;m trying to compile GnuTLS. When I thy to configure the package I get this error:
configure:8820: gcc -std=gnu99 -o conftest -g -O2 conftest.c -lnettle -lhogweed -lgmp >&5
/usr/bin/ld: cannot find -lhogweed
collect2: ld returned 1 exit status
I searched google for hogweed but there is no such a package? How I can fix this problem?
When linking with libraries you remove the lib from their name and append it to -l
ie for example libcrypto library will be linked by passing option -lcrypto
in your case its is -lhogweed that is missing. That means libhogweed library is missing.
A simple Google search of 'libhogweed' shows that its a part of 'GNU Nettle cryptographic library'. So you can install this and fix your problem.
I think you need to install the Nettle cryptographic library. As you didn't post your OS, I can't give more details.
More information on Nettle and Hogweed: http://www.lysator.liu.se/~nisse/nettle/nettle.html#Linking
According to this message, you need to build Nettle after you install GMP. Try to rebuild Nettle and see if it gets built.