#3076 closed defect (fixed)
BUG: honeyd fails to build under 10.4
Reported by: | trodemaster@… | Owned by: | macports-tickets@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.0 |
Keywords: | Cc: | jherek@…, ryan@… | |
Port: |
Description
I'm running a 1.0 version of port on tiger. Unable to build honeyd this is the output...
nextbook:~ root# port install honeyd ---> Fetching libdnet ---> Attempting to fetch libdnet-1.8.tar.gz from http://voxel.dl.sourceforge.net/libdnet ---> Attempting to fetch libdnet-1.8.tar.gz from http://kent.dl.sourceforge.net/libdnet ---> Verifying checksum(s) for libdnet ---> Extracting libdnet ---> Configuring libdnet ---> Building libdnet with target all ---> Staging libdnet into destroot ---> Packaging tgz archive for libdnet 1.8_0 ---> Installing libdnet 1.8_0 ---> Activating libdnet 1.8_0 ---> Cleaning libdnet ---> Fetching libevent ---> Attempting to fetch libevent-1.0c.tar.gz from http://monkey.org/~provos/ ---> Verifying checksum(s) for libevent ---> Extracting libevent ---> Configuring libevent ---> Building libevent with target all ---> Staging libevent into destroot ---> Packaging tgz archive for libevent 1.0c_0 ---> Installing libevent 1.0c_0 ---> Activating libevent 1.0c_0 ---> Cleaning libevent ---> Fetching honeyd ---> Attempting to fetch honeyd-0.4.tar.gz from http://niels.xtdnet.nl/honeyd/ ---> Attempting to fetch honeyd-0.4.tar.gz from http://distfiles-od.opendarwin.org/ ---> Verifying checksum(s) for honeyd ---> Extracting honeyd ---> Configuring honeyd ---> Building honeyd with target all Error: Target com.apple.build returned: shell command "cd "/opt/local/var/db/dports/build/ file._opt_local_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_net_honeyd/work/ honeyd-0.4" && make all" returned error 2 Command output: gcc -DHAVE_CONFIG_H -I. -I. -I. -Icompat -I/opt/local/include -I/opt/local/include -I/opt/local/include -Dsocklen_t=int -Wall -g -c honeyd.c In file included from /opt/local/include/dnet/os.h:26,
from /opt/local/include/dnet.h:12, from honeyd.c:61:
/usr/include/sys/socket.h:99: error: two or more data types in declaration specifiers honeyd.c: In function 'honeyd_init': honeyd.c:188: warning: unused variable 'on' make: * [honeyd.o] Error 1
redid port install with the -d and got this error
make: * [honeyd.o] Error 1 Error: Target com.apple.build returned: shell command "cd "/opt/local/var/db/dports/build/ file._opt_local_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_net_honeyd/work/ honeyd-0.4" && make all" returned error 2 Command output: gcc -DHAVE_CONFIG_H -I. -I. -I. -Icompat -I/opt/local/include -I/opt/local/include -I/opt/local/include -Dsocklen_t=int -Wall -g -c honeyd.c In file included from /opt/local/include/dnet/os.h:26,
from /opt/local/include/dnet.h:12, from honeyd.c:61:
/usr/include/sys/socket.h:99: error: two or more data types in declaration specifiers honeyd.c: In function 'honeyd_init': honeyd.c:188: warning: unused variable 'on' make: * [honeyd.o] Error 1
Change History (6)
comment:1 Changed 20 years ago by toby@…
severity: | major → normal |
---|
comment:2 Changed 20 years ago by snu@…
Summary: | honeyd fails to build under 10.4 → BUG: honeyd fails to build under 10.4 |
---|
comment:3 Changed 19 years ago by ryan@…
Cc: | ryan@… added |
---|
comment:4 Changed 19 years ago by toby@…
Cc: | jherek@… added |
---|
* Bug 4955 has been marked as a duplicate of this bug. *
comment:5 Changed 19 years ago by markd@…
(In reply to comment #2)
* Bug 4955 has been marked as a duplicate of this bug. *
Committed honeyd 1.5a just now and it compiles on 10.4.5 now. This bug can be closed now.
comment:6 Changed 19 years ago by blb@…
Resolution: | → fixed |
---|---|
Status: | new → closed |
Resolving per comment 3.
I can get rid of the socket.h error by chaning to the line the Makefile from: CPPFLAGS = -Dsocklen_t=int to CPPFLAGS =
I am probably supposed to fix that in the config file, since the Makefile is generated, right? I haven't figure that out yet.
However, I then start to get errors about FUNCTION :
your-o3q7xtm3hm:/opt/local/var/db/dports/build/file._opt_local_var_db_dports_sources_rsync.rsync.opendarwin.org_dpupdate_dports_net_honeyd/work/honeyd-0.4 ryanlrussell$ sudo make gcc -DHAVE_CONFIG_H -I. -I. -I. -Icompat -I/opt/local/include -I/opt/local/include -I/opt/local/include -Wall -g -c command.c command.c: In function 'cmd_fork': command.c:273: error: parse error before string constant command.c:275: error: parse error before string constant command.c:278: error: parse error before string constant command.c:286: error: parse error before string constant make: * [command.o] Error 1
I found this discussion, which tells me what is going wrong there: http://seclists.org/lists/honeypots/2005/Jul-Sep/0035.html Summary: Newer GCC's treat FUNCTION differently, and you can't use it like a macro anymore.
I went to go look for any patches for honeyd, and I see that honeyd is all the way up to 1.0, and darwinports is at 0.4., and there were a number of intermediate releases. Hence, it might make sense to start over at 1.0.
But, if that's not feasible, here are the uses of FUNCTION is the 0.4 codebase: command.c: err(1, FUNCTION": dup2"); command.c: err(1, FUNCTION": dup2"); command.c: err(1, FUNCTION": dup2"); command.c: err(1, FUNCTION": execv(%s)", execcmd); config.c: err(1, "%s: calloc", FUNCTION); config.c: err(1, "%s: strdup", FUNCTION); config.c: err(1, "%s: calloc", FUNCTION); honeyd.c: syslog(LOG_WARNING, "%s: malloc: %m", FUNCTION); Binary file honeyd.o matches personality.c: err(1, "%s: calloc", FUNCTION); personality.c: err(1, "%s: stdup", FUNCTION); personality.c: err(1, "%s: malloc", FUNCTION); personality.c: err(1, "%s: strdup", FUNCTION); router.c: err(1, "%s: calloc", FUNCTION); router.c: err(1, "%s: calloc", FUNCTION); tcp.c: warn("%s: getsockopt for %d", FUNCTION, fd); tcp.c: warnx("%s: getsockopt: %s", FUNCTION, strerror(error));
To my eye, it looks like the problematic uses are all in command.c. In the 1.0 code, it appears that func is used instead in similar code chunks.
Please let me know if any of the extra information should be filed in seperate bugs. My vote would be for starting over with the 1.0 code.