Overview
Artifact ID: | e7feb738b44fa45a4c5052c24cfa7d8baeb781b85c286a07ed7d128f2c4c426f |
---|---|
Ticket: | dfda165c8cb2b434793e1a1bf699bd5ed9274c1d
address-info doesn't compile on FreeBSD |
User & Date: | anonymous 2018-01-17 09:45:08 |
Changes
- foundin changed to: "1.0.0"
- icomment:
<h1>Description</h1> Can't install the 'openssl' egg, because the compilation of 'address-info' on FreeBSD fails (diff for the fix is at the bottom) <h1>System</h1> <pre> /tmp/address-info⟩ uname -v FreeBSD 11.1-STABLE #2 r327415+2236b971aa20(stable/11): Mon Jan 1 08:40:18 CET 2018 root@main.locweb:/usr/obj/usr/src/sys/J </pre> <h1>Build Error</h1> <pre> /tmp/address-info⟩ chicken-install -n retrieving ... checking platform for `address-info' ... checking dependencies for `address-info' ... install order: ("address-info") installing address-info: ... changing current directory to . '/usr/local/bin/csi' -bnq -setup-mode -e "(require-library setup-api)" -e "(import setup-api)" -e "(setup-error-handling)" -e "(extension-name-and-version '(\"address-info\" \"\"))" -e "(keep-intermediates #t)" -e "(setup-install-mode #f)" 'address-info.setup' '/usr/local/bin/csc' -feature compiling-extension -setup-mode -k -s -O2 -d1 address-info.scm -j address-info address-info.c:72:47: error: incomplete definition of type 'struct sockaddr_in' port = ((struct sockaddr_in *)info->ai_addr)->sin_port; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ address-info.c:72:19: note: forward declaration of 'struct sockaddr_in' port = ((struct sockaddr_in *)info->ai_addr)->sin_port; ^ address-info.c:75:48: error: incomplete definition of type 'struct sockaddr_in6' port = ((struct sockaddr_in6 *)info->ai_addr)->sin6_port; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ address-info.c:75:19: note: forward declaration of 'struct sockaddr_in6' port = ((struct sockaddr_in6 *)info->ai_addr)->sin6_port; ^ address-info.c:97:37: error: incomplete definition of type 'struct sockaddr_in' src = &((struct sockaddr_in *)src)->sin_addr; ~~~~~~~~~~~~~~~~~~~~~~~~~~~^ address-info.c:97:19: note: forward declaration of 'struct sockaddr_in' src = &((struct sockaddr_in *)src)->sin_addr; ^ address-info.c:98:9: error: invalid application of 'sizeof' to an incomplete type 'struct sockaddr_in' len = sizeof(struct sockaddr_in); ^ ~~~~~~~~~~~~~~~~~~~~ address-info.c:97:19: note: forward declaration of 'struct sockaddr_in' src = &((struct sockaddr_in *)src)->sin_addr; ^ address-info.c:101:38: error: incomplete definition of type 'struct sockaddr_in6' src = &((struct sockaddr_in6 *)src)->sin6_addr; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^ address-info.c:101:19: note: forward declaration of 'struct sockaddr_in6' src = &((struct sockaddr_in6 *)src)->sin6_addr; ^ address-info.c:102:9: error: invalid application of 'sizeof' to an incomplete type 'struct sockaddr_in6' len = sizeof(struct sockaddr_in6); ^ ~~~~~~~~~~~~~~~~~~~~~ address-info.c:101:19: note: forward declaration of 'struct sockaddr_in6' src = &((struct sockaddr_in6 *)src)->sin6_addr; ^ 6 errors generated. </pre> <h1>Fix</h1> After apply this patch, i can install the 'openssl' egg and query 'https' sites with the 'http-client' egg. <pre> /tmp/address-info⟩ diff -u address-info.scm.orig address-info.scm --- address-info.scm.orig 2018-01-17 10:29:02.007032000 +0100 +++ address-info.scm 2018-01-17 10:29:56.393419000 +0100 @@ -50,6 +50,7 @@ # include <sys/socket.h> # include <netdb.h> # include <arpa/inet.h> +# include <netinet/in.h> #endif <# </pre>
- login: "anonymous"
- mimetype: "text/x-fossil-wiki"
- private_contact changed to: "0c9697e66945f86ed04f0579c9cb2968061100a1"
- severity changed to: "Important"
- status changed to: "Open"
- title changed to: "address-info doesn't compile on FreeBSD"
- type changed to: "Build_Problem"