make error, how can I fix it? - c

I am compiling a c project, everything is OK when commands, as aclocal, .../configure, so on.
when I run "make" command, it shows an error
lgomp -lrt -lpthread -fopenmp
make[3]: Leaving directory `/home/develop/slim/src'
make[2]: Leaving directory `/home/develop/slim/src'
make[1]: Leaving directory `/home/develop/slim/src'
Making all in lib
make[1]: Entering directory `/home/develop/slim/lib'
Cannot execute /home/develop/slim//bin/lmntal
make[1]: *** [array2D.il] Error 1
make[1]: Leaving directory `/home/develop/slim/lib'
make: *** [all-recursive] Error 1
I think "Cannot execute /home/develop/slim//bin/lmntal" is the problem. I am new at those stuff.
could anyone tell me how to fix the problem?
Thanks in advance

If it is someone elses code, you may need to set an environment variable or something similar.
The first thing to do is check the file is there:
ls /home/develop/slim/bin/lmntal
Then check permissions if it is there.
ls -ltr /home/develop/slim/bin/lmntal
Its very hard to give advise without the make file though.

Related

HTK compile error: make[1]: Nothing to be done for 'all'

Following the official HTK Unix/Linux installation guide, I had similar issues to the ones described in this thread when trying to run make all on HTK. I had initially been looking at the wrong Makefile (/htk-3.4.1/Makefile), as suggested by MadScientist. After fixing the extra indentation on line 77 in the correct Makefile (/htk-3.4.1/HLMTools/Makefile) generated by running ./configure --prefix=/tmp, the HTK compile error:
Makefile:77: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.
has disappeared, but I am still unable to compile on make all:
$ make all
(cd HTKTools && make all) \
|| case "" in *k*) fail=yes;; *) exit 1;; esac;
make[1]: Entering directory '/home/zeesy/htk-3.4.1/HTKTools'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/zeesy/htk-3.4.1/HTKTools'
(cd HLMTools && make all) \
|| case "" in *k*) fail=yes;; *) exit 1;; esac;
make[1]: Entering directory '/home/zeesy/htk-3.4.1/HLMTools'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/home/zeesy/htk-3.4.1/HLMTools'
Prior to make all, running ./configure --prefix=/tmp results in the error:
config.status: WARNING: HLMTools/Makefile.in seems to ignore the --datarootdir setting
for HTKLib, HLMLib, HTKTools and HLMTools. It also resets line 77 of the Makefile to quadruple indented tabs.
I have gcc-multilib installed. Based on this post, I installed libc6:i386 zlib1g:i386 lib32ncurses5 and lib32z1 in order to run this 32bit program on a 64bit computer.
Has anyone run into this problem? Step 4 of the VoxForge HTK install guide suggests that gcc 3.4 compiler compatibility modules are required.
As suggested by MadScientist, I was at first looking at the wrong Makefile. I had been looking at /htk-3.1.4/Makefile, when the file that needed to be edited was /htk-3.1.4/HLMTools/Makefile. A case of not reading the error messages thoroughly.
After getting the same error message for line 77
missing separator (did you mean TAB instead of 8 spaces?).
I ran Spaces to Tabs in Atom, and corrected the quadruple tab in the default Makefile.
The make all command initially ran successfully, but as I was unable to access ls /tmp/bin.linux I attempted make all again and received the second error message
make[1]: Nothing to be done for 'all'
The fix for this was to run make clean (see this post). However, Nikolay Shmyrev has pointed out that this error means that everything has compiled, there for there is 'nothing to be done'.
I'm now having problems accessing /tmp/bin.linux but will deal with that elsewhere.
SUMMARY: The make[1]: Nothing to be done for 'all' error means that everything has already compiled.

Error using make on Windows with MinGW

I'm fairly new to using "make" for anything, but I am forced to try and build some binaries with it for some C files (the code is not mine). It works for most of the files in the directory, but when it reaches the "usb" directory this happens:
make[1]: Entering directory 'C:/bios_memimage/usb'
/bin/rm -fr scraper.bin
process_begin: CreateProcess(NULL, /bin/rm -fr scraper.bin, ...) failed.
make (e=2): The system cannot find the file specified.
Makefile:10: recipe for target 'scraper.bin' failed
make[1]: *** [scraper.bin] Error 2
make[1]: Leaving directory 'C:/bios_memimage/usb'
Makefile.mingw:14: recipe for target 'subdirusb' failed
make: *** [subdirusb] Error 2
I'm unfamiliar with what "bin/rm -fr" means, and looking for it has not yielded much of anything. I can tell it's not creating the process, but what, exactly is it failing to find? And is there a remedy for it?
That line tries to delete certain filenames during the build.
https://unix.stackexchange.com/questions/153336/what-does-bin-rm-f-file-do-in-unix
Remove those lines in the makefile because they obviously will not work on windows. If the files must be deleted for the build to proceed, then replace the lines with windows equivalents.

Linking static lib (potracelib) with another lib, what to write in Makefile.am?

I need to link libpotrace and compile it into libgerbv. What should I write in Makefile.am? I tried various things like LDADD, LIBDIR, LDFLAGS etc., but I was not successful.
How my structure look like:
gerbv/gerbv-test -> files from git, master brach
gerbv/libs/potrace/potrace-test -> potrace -> files from sourceforge.com, latest release
I use Debian Jessie, I can compile both programs separately, both I did not figured out, how can I link potrace to gerbv and compile it. The header file (.h) is included properly, but I haven't had any success with linking .so or .a/la lib. Even no success with installed potrace in /usr/local/lib or /usr/lib.
Can anyone direct me? The best will be if you can download both programs, compile it without error and then write what you put into the gerbv/src/makefile.Am.
UPDATED
I dowloaded clean releases and did this ONLY this modifies:
/root/NBP/gerbv/gerbv-test/src/Makefile.am
added
libgerbv_la_LIBADD = libpotrace.la # src/Makefile.am:84: error: use 'libgerbv_la_LIBADD', not 'libgerbv_la_LDADD'
libgerbv_la_LIBDIR = /root/NBP/gerbv/libs/potrace/potrace-old/src/.libs
#libgerbv_la_DEPENDENCIES = libpotrace.la
/root/NBP/gerbv/gerbv-test/src/exportimage.c
added at the top
#include "../../libs/potrace/potrace-test/src/potracelib.h"
added into void exportimage_render_to_surface_and_destroy(...), this will test, if the shared lib is properly linked. exportimage.c is part of libgerbv where I need to include libpotrace.
char *v = potrace_version();
After doing this modifications I build it via:
libpotrace
root:~/NBP/gerbv/libs/potrace/potrace-test# autoreconf && ./configure --with-libpotrace && make
runs without a problem...
gerbv/libgerbv
root:~/NBP/gerbv/gerbv-test# autoreconf && ./configure && make
This results with:
...
make[3]: Entering directory '/root/NBP/gerbv/gerbv-test/src'
make[3]: *** No rule to make target 'libpotrace.la', needed by 'libgerbv.la'. Stop.
make[3]: Leaving directory '/root/NBP/gerbv/gerbv-test/src'
Makefile:498: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/root/NBP/gerbv/gerbv-test/src'
Makefile:472: recipe for target 'all-recursive' failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/root/NBP/gerbv/gerbv-test'
Makefile:401: recipe for target 'all' failed
make: *** [all] Error 2
Solved with this Makefile.am addition:
libgerbv_la_LIBADD = ../../libs/potrace/potrace/src/libpotrace.la
libgerbv_la_DEPENDENCIES = ../../libs/potrace/potrace/src/libpotrace.la

Systrace 1.6f Compliation error

I am trying to compile Systrace-1.6f on Ubuntu 12.04 32bit edition. I found below error.
root#sharma-VM:/home/sharma/Desktop/systrace-1.6f# make
make all-recursive
make[1]: Entering directory `/home/sharma/Desktop/systrace-1.6f'
Making all in .
make[2]: Entering directory `/home/sharma/Desktop/systrace-1.6f'
gcc -DHAVE_CONFIG_H -I. -Wall -c systrace-translate.c
In file included from systrace-translate.c:54:0:
linux_fcntl.h:90:2: error: unknown type name ‘linux_off_t’
linux_fcntl.h:91:2: error: unknown type name ‘linux_off_t’
linux_fcntl.h:92:2: error: unknown type name ‘linux_pid_t’
linux_fcntl.h:98:9: error: unknown type name ‘linux_loff_t’
linux_fcntl.h:99:9: error: unknown type name ‘linux_loff_t’
linux_fcntl.h:100:9: error: unknown type name ‘linux_pid_t’
make[2]: *** [systrace-translate.o] Error 1
make[2]: Leaving directory `/home/sharma/Desktop/systrace-1.6f'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/sharma/Desktop/systrace-1.6f'
make: *** [all] Error 2
Please kindly suggest me a solution for the above error.
This question about particular program is too specific to be asked on SO. However I came across the same problem and that is how I found it.
grep is your helper! You can grep -rsli linux_off_t to find out that it is in linux_types.h. Another question why it doesn't work, but if you just want to go further, insert the following lines
#undef _LINUX_TYPES_H
#include "linux_types.h"
somewhere in the beginning of linux_fcntl.h.
Then you'll come across yet another issue. Replace all references to cs with xcs. It took me a while since I used assembler last time. So I don't know if that is how this register is called these days but that is what I see for struct user_regs_struct in /usr/include/i386-linux-gnu/sys/user.h.
Even with all that it still does not pass the second regression test.
systrace has not been updated for quite a while and perhaps is not quite compatible with 3.x kernels as is. I am not a kernel expert though.

glibc not properly compiling

While compiling glibc 2.11, I get the following error. Any idea how to solve this.
In file included from ../sysdeps/unix/sysv/linux/syslog.c:10:
../misc/syslog.c: In function ‘__vsyslog_chk’:
../misc/syslog.c:123: sorry, unimplemented: inlining failed in call to ‘syslog’: function body not available
../misc/syslog.c:155: sorry, unimplemented: called from here
make[2]: *** [/home/alice/Desktop/glib-build/misc/syslog.o] Error 1
make[2]: Leaving directory `/home/alice/Desktop/glibc-2.11/misc'
make[1]: *** [misc/subdir_lib] Error 2
make[1]: Leaving directory `/home/alice/Desktop/glibc-2.11'
make: *** [all] Error 2
Apparently, this is a known problem with building glibc on Ubuntu. In essence:
glibc does not build with _FORTIFY_SOURCE enabled, and Ubuntu compiles stuff with -D_FORTIFY_SOURCE=2.
You need to disable this by undefining _FORTIFY_SOURCE. i.e. append -U_FORTIFY_SOURCE to your CFLAGS.

Resources