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

Network-2.6.2.0 fails to compile inside the ghc-musl:cabal container #2

Open
adinapoli opened this issue Jul 7, 2015 · 4 comments
Open

Comments

@adinapoli
Copy link

Hello there,

I was trying to install stack within the ghc-musl:cabal container, but I've been hit by this error:

Configuring network-2.6.2.0...
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for an ANSI C-conforming const... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for unistd.h... (cached) yes
checking winsock2.h usability... no
checking winsock2.h presence... no
checking for winsock2.h... no
checking ws2tcpip.h usability... no
checking ws2tcpip.h presence... no
checking for ws2tcpip.h... no
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netinet/tcp.h usability... yes
checking netinet/tcp.h presence... yes
checking for netinet/tcp.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/uio.h usability... yes
checking sys/uio.h presence... yes
checking for sys/uio.h... yes
checking sys/un.h usability... yes
checking sys/un.h presence... yes
checking for sys/un.h... yes
checking linux/can.h usability... no
checking linux/can.h presence... no
checking for linux/can.h... no
checking net/if.h usability... yes
checking net/if.h presence... yes
checking for net/if.h... yes
checking for readlink... yes
checking for symlink... yes
checking for if_nametoindex... yes
checking for struct msghdr.msg_control... yes
checking for struct msghdr.msg_accrights... no
checking for struct sockaddr.sa_len... no
checking for in_addr_t in netinet/in.h... yes
checking for SO_PEERCRED and struct ucred in sys/socket.h... yes
checking for getpeereid in unistd.h... checking for getpeereid... no
checking for _head_libws2_32_a in -lws2_32... no
checking for getaddrinfo... yes
checking for gai_strerror... yes
checking whether AI_ADDRCONFIG is declared... yes
checking whether AI_ALL is declared... yes
checking whether AI_NUMERICSERV is declared... yes
checking whether AI_V4MAPPED is declared... yes
checking whether IPV6_V6ONLY is declared... yes
checking whether IPPROTO_IP is declared... yes
checking whether IPPROTO_TCP is declared... yes
checking whether IPPROTO_IPV6 is declared... yes
checking for sendfile in sys/sendfile.h... yes
checking for sendfile in sys/socket.h... no
checking for gethostent... yes
checking for accept4... yes
configure: creating ./config.status
config.status: creating network.buildinfo
config.status: creating include/HsNetworkConfig.h
configure: WARNING: unrecognized options: --with-compiler, --with-gcc
Building network-2.6.2.0...
Preprocessing library network-2.6.2.0...
In file included from dist/build/Network/Socket/Types_hsc_make.c:1:0:
Types.hsc: In function 'main':
Types.hsc:862:23: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr_can'
/usr/local/lib/ghc-7.8.4/template-hsc.h:35:10: note: in definition of macro 'hsc_const'
     if ((x) < 0)                                      \
          ^
Types.hsc:862:23: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr_can'
/usr/local/lib/ghc-7.8.4/template-hsc.h:36:41: note: in definition of macro 'hsc_const'
         hsc_printf ("%lld", (long long)(x));          \
                                         ^
Types.hsc:862:23: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr_can'
/usr/local/lib/ghc-7.8.4/template-hsc.h:38:50: note: in definition of macro 'hsc_const'
         hsc_printf ("%llu", (unsigned long long)(x));
                                                  ^
Types.hsc:876:23: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr_can'
/usr/local/lib/ghc-7.8.4/template-hsc.h:35:10: note: in definition of macro 'hsc_const'
     if ((x) < 0)                                      \
          ^
Types.hsc:876:23: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr_can'
/usr/local/lib/ghc-7.8.4/template-hsc.h:36:41: note: in definition of macro 'hsc_const'
         hsc_printf ("%lld", (long long)(x));          \
                                         ^
Types.hsc:876:23: error: invalid application of 'sizeof' to incomplete type 'struct sockaddr_can'
/usr/local/lib/ghc-7.8.4/template-hsc.h:38:50: note: in definition of macro 'hsc_const'
         hsc_printf ("%llu", (unsigned long long)(x));
                                                  ^
In file included from /usr/local/lib/ghc-7.8.4/template-hsc.h:4:0,
                 from dist/build/Network/Socket/Types_hsc_make.c:1:
Types.hsc:944:22: error: invalid use of undefined type 'struct sockaddr_can'
Types.hsc:944:5: note: in expansion of macro 'hsc_poke'
Types.hsc:971:22: error: invalid use of undefined type 'struct sockaddr_can'
Types.hsc:971:5: note: in expansion of macro 'hsc_peek'
compiling dist/build/Network/Socket/Types_hsc_make.c failed (exit code 1)
command was: /usr/bin/gcc -c dist/build/Network/Socket/Types_hsc_make.c -o dist/build/Network/Socket/Types_hsc_make.o -fno-stack-protector -D__GLASGOW_HASKELL__=708 -Dlinux_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Dlinux_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -Iinclude -DCALLCONV=ccall -D_GNU_SOURCE -I/usr/local/lib/ghc-7.8.4/unix-2.7.0.1/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/usr/local/lib/ghc-7.8.4/time-1.4.2/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/usr/local/lib/ghc-7.8.4/bytestring-0.10.4.0/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/usr/local/lib/ghc-7.8.4/base-4.7.0.2/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/usr/local/lib/ghc-7.8.4/integer-gmp-0.5.1.0/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/usr/local/lib/ghc-7.8.4/include -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/usr/local/lib/ghc-7.8.4/include/
cabal: Error: some packages failed to install:
network-2.6.2.0 failed during the building phase. The exception was:
ExitFailure 1

Any idea about what can be causing this?

Many thanks,
Alfredo

@ghost
Copy link

ghost commented Dec 6, 2015

Fixed by @klao in network-2.6.2.1 (see haskell/network@6afe609) on May 31st 2015.

@adinapoli
Copy link
Author

Ah, that's great to hear, thank you guys!
On 6 Dec 2015 20:17, "Tuncer Ayaz" notifications@github.com wrote:

Fixed by @klao https://github.com/klao in network-2.6.2.1 (see
haskell/network@6afe609
haskell/network@6afe609)
on May 31st 2015.


Reply to this email directly or view it on GitHub
#2 (comment).

@ghost
Copy link

ghost commented Feb 27, 2016

Just to be clear, this being fixed, as I noted in #2 (comment), means it can be closed. Or is there something else?

@adinapoli
Copy link
Author

Hey!

I didn't have the chance to test this out, so I would suggest closing it: I
will reopen if I stumble upon this issue again.
On 27 Feb 2016 21:27, "Tuncer Ayaz" notifications@github.com wrote:

Just to be clear, this being fixed, as I noted in #2 (comment)
#2 (comment),
means it can be closed. Or is there something else?


Reply to this email directly or view it on GitHub
#2 (comment).

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