address-info

Ticket Change Details
Login
Overview

Artifact ID: e7feb738b44fa45a4c5052c24cfa7d8baeb781b85c286a07ed7d128f2c4c426f
Ticket: dfda165c8cb2b434793e1a1bf699bd5ed9274c1d
address-info doesn't compile on FreeBSD
User & Date: anonymous 2018-01-17 09:45:08
Changes

  1. Change foundin to "1.0.0"
  2. Change icomment to:

    Description

    Can't install the 'openssl' egg, because the compilation of 'address-info' on FreeBSD fails (diff for the fix is at the bottom)

    System

    /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 
    

    Build Error

    /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.
    

    Fix

    After apply this patch, i can install the 'openssl' egg and query 'https' sites with the 'http-client' egg.
    /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
     <#
    
  3. Change login to "anonymous"
  4. Change mimetype to "text/x-fossil-wiki"
  5. Change private_contact to "0c9697e66945f86ed04f0579c9cb2968061100a1"
  6. Change severity to "Important"
  7. Change status to "Open"
  8. Change title to "address-info doesn't compile on FreeBSD"
  9. Change type to "Build_Problem"