Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to build on FreeBSD 12.0 (GHC 8.0.2) #9

Open
nbrk opened this issue Jul 15, 2018 · 0 comments
Open

Failed to build on FreeBSD 12.0 (GHC 8.0.2) #9

nbrk opened this issue Jul 15, 2018 · 0 comments

Comments

@nbrk
Copy link

nbrk commented Jul 15, 2018

Hello,

Command stack build fails on FreeBSD 12 / GHC 8.0.2 with following errors:

Preprocessing library network-fancy-0.2.4...
/usr/home/nbrk/download/soft/network-fancy/Fancy.hsc:518:5: error: offsetof of incomplete type 'struct sockaddr_in'
    hsc_ptr (struct sockaddr_in, sin_addr);
    ^        ~~~~~~
/usr/local/lib/ghc-8.0.2/template-hsc.h:80:24: note: expanded from macro 'hsc_ptr'
                (long) offsetof (t, f));
                       ^         ~
/usr/include/stddef.h:73:32: note: expanded from macro 'offsetof'
#define offsetof(type, member)  __offsetof(type, member)
                                ^          ~~~~
/usr/include/sys/cdefs.h:484:34: note: expanded from macro '__offsetof'
#define __offsetof(type, field)  __builtin_offsetof(type, field)
                                 ^                  ~~~~
/usr/home/nbrk/download/soft/network-fancy/Fancy.hsc:518:21: note: forward declaration of 'struct sockaddr_in'
    hsc_ptr (struct sockaddr_in, sin_addr);
                    ^
/usr/home/nbrk/download/soft/network-fancy/Fancy.hsc:519:5: error: offsetof of incomplete type 'struct sockaddr_in'
    hsc_peek (struct sockaddr_in, sin_port);
    ^         ~~~~~~
/usr/local/lib/ghc-8.0.2/template-hsc.h:72:24: note: expanded from macro 'hsc_peek'
                (long) offsetof (t, f));
                       ^         ~
/usr/include/stddef.h:73:32: note: expanded from macro 'offsetof'
#define offsetof(type, member)  __offsetof(type, member)
                                ^          ~~~~
/usr/include/sys/cdefs.h:484:34: note: expanded from macro '__offsetof'
#define __offsetof(type, field)  __builtin_offsetof(type, field)
                                 ^                  ~~~~
/usr/home/nbrk/download/soft/network-fancy/Fancy.hsc:518:21: note: forward declaration of 'struct sockaddr_in'
    hsc_ptr (struct sockaddr_in, sin_addr);
                    ^
/usr/home/nbrk/download/soft/network-fancy/Fancy.hsc:521:5: error: offsetof of incomplete type 'struct sockaddr_in'
    hsc_ptr (struct sockaddr_in, sin_addr);
    ^        ~~~~~~
/usr/local/lib/ghc-8.0.2/template-hsc.h:80:24: note: expanded from macro 'hsc_ptr'
                (long) offsetof (t, f));
                       ^         ~
/usr/include/stddef.h:73:32: note: expanded from macro 'offsetof'
#define offsetof(type, member)  __offsetof(type, member)
                                ^          ~~~~
/usr/include/sys/cdefs.h:484:34: note: expanded from macro '__offsetof'
#define __offsetof(type, field)  __builtin_offsetof(type, field)
                                 ^                  ~~~~
/usr/home/nbrk/download/soft/network-fancy/Fancy.hsc:518:21: note: forward declaration of 'struct sockaddr_in'
    hsc_ptr (struct sockaddr_in, sin_addr);
                    ^
/usr/home/nbrk/download/soft/network-fancy/Fancy.hsc:522:5: error: offsetof of incomplete type 'struct sockaddr_in6'
    hsc_peek (struct sockaddr_in6, sin6_port);
    ^         ~~~~~~
/usr/local/lib/ghc-8.0.2/template-hsc.h:72:24: note: expanded from macro 'hsc_peek'
                (long) offsetof (t, f));
                       ^         ~
/usr/include/stddef.h:73:32: note: expanded from macro 'offsetof'
#define offsetof(type, member)  __offsetof(type, member)
                                ^          ~~~~
/usr/include/sys/cdefs.h:484:34: note: expanded from macro '__offsetof'
#define __offsetof(type, field)  __builtin_offsetof(type, field)
                                 ^                  ~~~~
/usr/home/nbrk/download/soft/network-fancy/Fancy.hsc:522:22: note: forward declaration of 'struct sockaddr_in6'
    hsc_peek (struct sockaddr_in6, sin6_port);
                     ^
/usr/home/nbrk/download/soft/network-fancy/Fancy.hsc:541:5: error: offsetof of incomplete type 'struct sockaddr_in'
    hsc_peek (struct sockaddr_in, sin_port);
    ^         ~~~~~~
/usr/local/lib/ghc-8.0.2/template-hsc.h:72:24: note: expanded from macro 'hsc_peek'
                (long) offsetof (t, f));
                       ^         ~
/usr/include/stddef.h:73:32: note: expanded from macro 'offsetof'
#define offsetof(type, member)  __offsetof(type, member)
                                ^          ~~~~
/usr/include/sys/cdefs.h:484:34: note: expanded from macro '__offsetof'
#define __offsetof(type, field)  __builtin_offsetof(type, field)
                                 ^                  ~~~~
/usr/home/nbrk/download/soft/network-fancy/Fancy.hsc:518:21: note: forward declaration of 'struct sockaddr_in'
    hsc_ptr (struct sockaddr_in, sin_addr);
                    ^
/usr/home/nbrk/download/soft/network-fancy/Fancy.hsc:544:5: error: offsetof of incomplete type 'struct sockaddr_in6'
    hsc_peek (struct sockaddr_in6, sin6_port);
    ^         ~~~~~~
/usr/local/lib/ghc-8.0.2/template-hsc.h:72:24: note: expanded from macro 'hsc_peek'
                (long) offsetof (t, f));
                       ^         ~
/usr/include/stddef.h:73:32: note: expanded from macro 'offsetof'
#define offsetof(type, member)  __offsetof(type, member)
                                ^          ~~~~
/usr/include/sys/cdefs.h:484:34: note: expanded from macro '__offsetof'
#define __offsetof(type, field)  __builtin_offsetof(type, field)
                                 ^                  ~~~~
/usr/home/nbrk/download/soft/network-fancy/Fancy.hsc:522:22: note: forward declaration of 'struct sockaddr_in6'
    hsc_peek (struct sockaddr_in6, sin6_port);
                     ^
6 errors generated.
compiling .stack-work/dist/x86_64-freebsd/Cabal-1.24.2.0/build/Network/Fancy_hsc_make.c failed (exit code 1)
command was: /usr/bin/cc -c .stack-work/dist/x86_64-freebsd/Cabal-1.24.2.0/build/Network/Fancy_hsc_make.c -o .stack-work/dist/x86_64-freebsd/Cabal-1.24.2.0/build/Network/Fancy_hsc_make.o -fno-stack-protector -fno-stack-protector -D__GLASGOW_HASKELL__=800 -Dfreebsd_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Dfreebsd_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -DCALLCONV=ccall -DSAFE_ON_WIN=unsafe -DCALLCONV=ccall -DSAFE_ON_WIN=unsafe -I.stack-work/dist/x86_64-freebsd/Cabal-1.24.2.0/build/autogen -include .stack-work/dist/x86_64-freebsd/Cabal-1.24.2.0/build/autogen/cabal_macros.h -I/usr/local/lib/ghc-8.0.2/bytestring-0.10.8.1/include -I/usr/local/include -I/usr/local/lib/ghc-8.0.2/base-4.9.1.0/include -I/usr/local/include -I/usr/local/lib/ghc-8.0.2/integer-gmp-1.0.0.1/include -I/usr/local/lib/ghc-8.0.2/include -I/usr/local/lib/ghc-8.0.2/include/

--  While building custom Setup.hs for package network-fancy-0.2.4 using:
      /usr/home/nbrk/.stack/setup-exe-cache/x86_64-freebsd/Cabal-simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2 --builddir=.stack-work/dist/x86_64-freebsd/Cabal-1.24.2.0 build lib:network-fancy --ghc-options " -ddump-hi -ddump-to-file"
    Process exited with code: ExitFailure 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant