|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
shc unistd.h:239: error: syntax error before '&' token
Hello i'm trying to use the SHC scripts encryption tool datsi.fi.upm.es/~frosal/sources/shc.html
when i run "make" the program compiles successfully but it asks me to run the "make test" which issue an error message Code:
shc: cc -Wall -O6 match.x.c -o match.x In file included from match.x.c:123: /usr/include/unistd.h:239: error: syntax error before '&' token ./shc: Undefined error: 0 *** Error code 1 Stop in /home/laraaj/shc-3.8.7 (line 43 of Makefile). does anyone have any idea what's wrong, i only have this problem on BSD while it works perfectly on Linux. |
|
|||
Quote:
Linux != OpenBSD. If you compare the hier(7) manpages between Linux & any of the *BSD family, you will see that there are significant differences. Likewise, while there are some common libraries between the two platforms, there are also differences here too. The error cited in your OP looks like the effect of compiler differences. You did not specify which version of OpenBSD is being used, but I suspect the gcc version is 3.x. Most Linux distro's I have limited knowledge have moved to 4.x. OpenBSD 4.8 is the first version which uses 4.x as its default. Your other choice is to determine whether gcc 4.x is available in the packages/ports tree of whatever version of OpenBSD you are running & install the appropriate packages. The choice is yours. Be aware that in general, this site only provides limited porting support. Porting can be very involved, & it requires significant experience. Unfortunately, supporting porting efforts generally requires significant knowledge of the problem domain, & to expect this level of support is not always realistic. However on occasion, regulars find particular problems interesting to explore. So, take these comments & determine the compiler versions used. If you want to continue porting this application, you should download a snapshot of OpenBSD 4.8-current which may provide you with a compatible compiler similar to what you have on Linux. |
|
|||
Thanks alot for your quick replay.
shc is a very lightweight program all it does is to convert a shell script into a C binary program that runs and invoke the specified shell then feed it the encrypted commands from the original script. the BSD's i tried to compile the program on are all remote server i can access through ssh accounts. one of them is Openbsd version 4.7 with gcc version 3.3.5 (propolice). here is a part of the make file of the program i think it's already made to run on all Unix compatible operating systems not just Linux. Code:
# Makefile # INSTALL_PATH = /usr/local # For SCO CFLAGS = -b elf -O -D_SVID # For IRIX CFLAGS = -xansi -fullwarn -O3 -g0 # For Solaris CFLAGS = -fast -xO4 -s -v -Xa # For HPUX CFLAGS = -Wall -O -Ae # For OSF1 CFLAGS = -w -verbose -fast -std1 -g0 # For GNU C compiler CFLAGS = -Wall -O6 # -pedantic SHELL = /bin/sh all: shc ask_for_test shc: shc.c $(CC) $(CFLAGS) $@.c -o $@ same error message before and may have any idea how to solve it or if it doesn't have any solutions. after checking the header file /usr/include/unistd.h line 239. "int rfork(int opts);" i think there is something wrong with a call to rfork function. |
|
|||
Quote:
http://openports.se/devel/gmake |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Error with kdeaccessibility... | valorisa | OpenBSD Packages and Ports | 3 | 10th June 2009 08:58 PM |
help error | darken | FreeBSD General | 1 | 21st September 2008 09:28 PM |
VLC run error | mfaridi | OpenBSD Packages and Ports | 14 | 29th May 2008 05:38 PM |
error kde | darken | FreeBSD General | 1 | 5th May 2008 08:45 PM |
relayd (and hoststated) give syntax error for 'check script' | gwl | OpenBSD Security | 2 | 2nd May 2008 04:53 PM |