Skip to content

Build fails on OpenBSD #63

Open
Open

Description

@sternenseemann

Not sure, if this is even intended. Just reporting it to be sure.

Configuring library for socket-0.8.2.0..
Preprocessing library for socket-0.8.2.0..
AddressInfo.hsc:169:16: error: use of undeclared identifier 'AI_ALL'
    hsc_const (AI_ALL);
               ^
AddressInfo.hsc:169:16: error: use of undeclared identifier 'AI_ALL'
AddressInfo.hsc:169:16: error: use of undeclared identifier 'AI_ALL'
AddressInfo.hsc:190:16: error: use of undeclared identifier 'AI_V4MAPPED'
    hsc_const (AI_V4MAPPED);
               ^
AddressInfo.hsc:190:16: error: use of undeclared identifier 'AI_V4MAPPED'
AddressInfo.hsc:190:16: error: use of undeclared identifier 'AI_V4MAPPED'
6 errors generated.
compiling dist/build/System/Socket/Internal/AddressInfo_hsc_make.c failed (exit code 1)
command was: /usr/bin/cc -c dist/build/System/Socket/Internal/AddressInfo_hsc_make.c -o dist/build/System/Socket/Internal/AddressInfo_hsc_make.o -fno-pie -nopie -Wno-unused-command-line-argument -Wno-expansion-to-defined -fno-stack-protector -fno-pie -nopie -Wno-unused-command-line-argument -Wno-expansion-to-defined -fno-stack-protector -fno-pie -nopie -Wno-unused-command-line-argument -Wno-expansion-to-defined -Wl,-z,wxneeded -Wl,-z,wxneeded -D__GLASGOW_HASKELL__=806 -Dopenbsd_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Dopenbsd_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -Iplatform/linux/include -Idist/build/platform/linux/include -Idist/build/autogen -Idist/build/global-autogen -include dist/build/autogen/cabal_macros.h -I/usr/local/lib/ghc/bytestring-0.10.8.2/include -I/usr/local/include -I/usr/local/lib/ghc/base-4.12.0.0/include -I/usr/local/include -I/usr/local/lib/ghc/integer-gmp-1.0.2.0/include -I/usr/local/lib/ghc/include -I/usr/local/include -I/usr/local/lib/ghc/include/
cabal: Failed to build socket-0.8.2.0.

Activity

  1. sternenseemann commented on Oct 29, 2019

    @sternenseemann
    ContributorAuthor

    Okay, it seems like OpenBSD's netdb.h doesn't contain those flags although POSIX requires it.

    I guess then this more or less an non-issue for haskell-socket? Feel free to close, if so.

  2. cgohla commented on Oct 29, 2021

    @cgohla

    Okay, it seems like OpenBSD's netdb.h doesn't contain those flags although POSIX requires it.

    I guess then this more or less an non-issue for haskell-socket? Feel free to close, if so.

    I just ran into this very problem myself. Defining AI_ALL and AI_V4MAPPED as 0x0000000 allowed me to compile it.

    Running the test suite we get some failures, that I haven't looked into too much yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions