Systrace 1.6f Compliation error - c

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.

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.

How to fix 'ld: library not found for -lglib-2.0'

I have to do a compiler with flex and bison for a school project.
They give to me example of new language but I can't compile them..
The code is working fine for other people so the problem come from my Mac. The problem appears when I try to compile with make command, he say "ld: library not found for -lglib-2.0".
I installed "Glib" already but this don't solve the problem.
make
[ 20%] Linking C executable facile
ld: library not found for -lglib-2.0
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [facile] Error 1
make[1]: *** [CMakeFiles/facile.dir/all] Error 2
make: *** [all] Error 2
I need to compile the code to work after on the project.
Thanks you

What does this linking error mean when installing portmidi?

After I configured the cmake file for portmidi, and proceeded to use make to make the necessary files, I encountered this error during compilation:
- Build files have been written to: /home/mycomputername
/Desktop/portmedia/portmidi
[ 2%] Linking C shared library /Release/libpmjni.so
/usr/bin/x86_64-linux-gnu-ld: cannot open output file /Release/libpmjni.so: No such file or directory
collect2: error: ld returned 1 exit status
pm_common/CMakeFiles/pmjni.dir/build.make:251: recipe for target '/Release/libpmjni.so' failed
make[2]: *** [/Release/libpmjni.so] Error 1
CMakeFiles/Makefile2:87: recipe for target 'pm_common/CMakeFiles/pmjni.dir/all' failed
make[1]: *** [pm_common/CMakeFiles/pmjni.dir/all] Error 2
Makefile:129: recipe for target 'all' failed
make: *** [all] Error 2
I'm quite confused. I've tried to insert the flags -fpic in the cxx-flags section of ccmake and change the default java install paths to no avail. Quite frankly, I think it has to do with the messing up of execution order, but I don't know where.
Any help will be greatly appreciated.
Apparently, there was some configuring to do in the directories that CMake points to in ccmake configuration. I just redownloaded the files and unzipped it into a newly made portmedia directory. Also, to make sure that you don't get any hiccups in making pm_defaults, refer to Nate's answer. To quote:
Apparently, one of the Makefiles generated by ccmake is broken. I was able to fix the issue by running
sed -i 's/pm_java\/pm_java/pm_java/' build.make
in the pm_java/CMakeFiles/pmdefaults_target.dir/ subdirectory of the
project after running ccmake . (on Ubuntu, though). (The sed
command replaces all occurrences of pm_java/pm_java by pm_java.)
Everything compiles, and I can even run pmdefaults from the
Release directory using
java -Djava.library.path=. -jar pmdefaults.jar

make error, how can I fix it?

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.

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