Skip to content

network-3.1.2.5 not building on MacOS Big Sur #518

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

Closed
goldfirere opened this issue Nov 11, 2021 · 6 comments
Closed

network-3.1.2.5 not building on MacOS Big Sur #518

goldfirere opened this issue Nov 11, 2021 · 6 comments

Comments

@goldfirere
Copy link

I can't seem to build network-3.1.2.5; the build hangs in the preprocessing stage. Here is my output:

rae:22:03:09 ~/temp/cab/network-3.1.2.5> cabal -v build
this build was affected by the following (project) config files:
Build profile: -w ghc-8.10.5 -O1
In order, the following will be built:
 - network-3.1.2.5 (lib:network) (first run)
creating /Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build
creating /Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/tmp
creating
/Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5
creating
/Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5/cache
Using self-exec internal setup method with build-type Configure and args:
["act-as-setup","--build-type=Configure","--","build","--verbose=2","--builddir=/Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5","lib:network"]
/Users/rae/.cabal/store/ghc-8.10.1/cbl-nstll-3.4.0.0-e668434b/bin/cabal
act-as-setup --build-type=Configure -- build --verbose=2
--builddir=/Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5
lib:network
Reading parameters from
/Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5/build/network.buildinfo
Component build order: library
/Users/rae/local/bin/ghc-pkg init /Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5/package.conf.inplace
creating
/Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5/build
creating
/Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5/build/autogen
creating
/Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5/build/autogen
Preprocessing library for network-3.1.2.5..
creating
/Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5/build/Network/Socket/ByteString
/Users/rae/local/bin/hsc2hs '@/Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5/build/Network/Socket/ByteString/hsc2hs-response64704-0.txt'
^Ccompiling /Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5/build/Network/Socket/ByteString/IO_hsc_make.c failed (exit code -2)
rsp file was: "/Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5/build/Network/Socket/ByteString/hsc2hscall64706-0.rsp"
command was: /Library/Developer/CommandLineTools/usr/bin/gcc -c /Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5/build/Network/Socket/ByteString/IO_hsc_make.c -o /Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5/build/Network/Socket/ByteString/IO_hsc_make.o -D__GLASGOW_HASKELL__=810 -Ddarwin_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Ddarwin_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -Iinclude -I/Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5/build/include -I/Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5/build/autogen -I/Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5/build/global-autogen -include /Users/rae/Dropbox/work/temp/cab/network-3.1.2.5/dist-newstyle/build/x86_64-osx/ghc-8.10.5/network-3.1.2.5/build/autogen/cabal_macros.h -I/Users/rae/local/stow/ghc-8.10.5/lib/ghc-8.10.5/unix-2.7.2.2/include -I/Users/rae/local/stow/ghc-8.10.5/lib/ghc-8.10.5/time-1.9.3/include -I/Users/rae/local/stow/ghc-8.10.5/lib/ghc-8.10.5/bytestring-0.10.12.0/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include -I/Users/rae/local/stow/ghc-8.10.5/lib/ghc-8.10.5/base-4.14.2.0/include -I/Users/rae/local/stow/ghc-8.10.5/lib/ghc-8.10.5/integer-gmp-1.0.3.0/include -I/Users/rae/local/stow/ghc-8.10.5/lib/ghc-8.10.5/include -I/Users/rae/local/stow/ghc-8.10.5/lib/ghc-8.10.5/include/
error: In file included from IO.hsc:5:
In file included from include/HsNet.h:37:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:134:25: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
double   atof(const char *);
                         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:134:25: note: insert '_Nullable' if the pointer may be null
double   atof(const char *);
                         ^
                          _Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:134:25: note: insert '_Nonnull' if the pointer should never be null
double   atof(const char *);
                         ^
                          _Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:135:22: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
int      atoi(const char *);
                         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:135:22: note: insert '_Nullable' if the pointer may be null
int      atoi(const char *);
                         ^
                          _Nullable
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:135:22: note: insert '_Nonnull' if the pointer should never be null
int      atoi(const char *);
                         ^
                          _Nonnull
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:136:23: warning: pointer is missing a nullability type specifier (_Nonnull, _Nullable, or _Null_unspecified) [-Wnullability-completeness]
long     atol(const char *);
                         ^
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/stdlib.h:136:23: note: insert '_Nullable' if the pointer may be null
long     atol(const char *);
                         ^
                          _Nullable
/Library/Developer/CommandLineT
rae:22:03:42 ~/temp/cab/network-3.1.2.5> 

Note the ^C about halfway down. The build hung (I waited maybe a minute, with no signs of life), and so I pressed Ctrl+C. Then, all the output we see afterwards appears.

I have no idea how to begin debugging this, but I'm happy to help by offering further information about my system if you have any questions.

@kazu-yamamoto
Copy link
Collaborator

Since I switched to Monterey, I don't have Big Sur anymore. But I am/was able to built network both on Monterey and BIg Sur.

@goldfirere
Copy link
Author

Thanks, @kazu-yamamoto. Do you (or anyone else) have any suggestions for where I can look to learn more? I have no clue why this would hang. It appears that the hanging happens in hsc2hs, but I'm not sure.

@kazu-yamamoto
Copy link
Collaborator

I don't know why you are using /Library/Developer/CommandLineTools/usr/bin/gcc. I'm using /usr/bin/gcc. Do you install the right version of Xcode for your macOS?

FYI: If I remember correctly, I did xcode-select --install.

@goldfirere
Copy link
Author

I've done xcode-select --install a number of times, along with various other well- and ill-advised things to get my machine working. I don't know why I had /Library/Developer/CommandLineTools/usr/bin in my PATH. I've fixed this, and now using /usr/bin/gcc, I get the same result. :(

Thanks for the suggestion!

@goldfirere
Copy link
Author

This works on ghc-9.2.1. I have not tried other GHCs in the 8.10 series.

@goldfirere
Copy link
Author

And it works for 8.10.7. Must have been some GHC/Mac strangeness. Closing.

Many thanks for the attempt to help, @kazu-yamamoto!

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

2 participants