Skip to content
New issue

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

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

Already on GitHub? # to your account

Configure: Error: cannot run config.sub #581

Open
jeffhappily opened this issue Jun 13, 2024 · 7 comments
Open

Configure: Error: cannot run config.sub #581

jeffhappily opened this issue Jun 13, 2024 · 7 comments

Comments

@jeffhappily
Copy link

I'm trying to stack build a project and I am getting this error:

network                 > configure: error: cannot run  //home/jeffhappily/Programming/my-server/stack-26498c94b43ec990/network-3.1.4.0/config.sub

Here's my stack and ghc version.

$ stack --version
Version 2.15.7, Git revision 75bb479f04755c1daf91ec8f445e17e2ba2ab7a3 x86_64 hpack-0.36.0

LTS Haskell 21.25 (ghc-9.4.8)

@kazu-yamamoto
Copy link
Collaborator

@jeffhappily Are you using Windows?

Possibly relating to #579

@kazu-yamamoto
Copy link
Collaborator

My bad.
A new version including #579 is not released yet.
So, are you using github version?
If so, you need autoreconf -i.

@jeffhappily
Copy link
Author

@kazu-yamamoto No, I'm using Fedora. Sorry I should've also mentioned this, I'm using telegram-bot-simple which depends on network-3.1.4.0.

@kazu-yamamoto
Copy link
Collaborator

It surprises me that config.sub cannot run on Linux.
I have no idea.

@jeffhappily
Copy link
Author

This issue is beyond my expertise. Could you please explain the root cause or what the error message means? I would appreciate your guidance on this.

@jeffhappily
Copy link
Author

I tried cloning this repo manually and encountered the same error:

$ autoconf
$ ./configure 
configure: error: cannot run  ./config.sub

After changing the permissions, it progressed further, but I'm not sure how relevant this is.

$ chmod +x config.sub
$ ./configure 
checking build system type... ./configure: line 2637: ./config.guess: Permission denied
configure: error: cannot guess build type; you must specify one
$ chmod +x config.guess
$ ./configure 
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-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 the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking for an ANSI C-conforming const... yes
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for limits.h... yes
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for sys/types.h... (cached) yes
checking for fcntl.h... yes
checking for sys/uio.h... yes
checking for sys/socket.h... yes
checking for netinet/in.h... yes
checking for netinet/tcp.h... yes
checking for sys/un.h... yes
checking for arpa/inet.h... yes
checking for netdb.h... yes
checking for net/if.h... yes
checking for netioapi.h... no
checking for struct ucred... yes
checking for gai_strerror... yes
checking for gethostent... yes
checking for accept4... yes
checking for getpeereid... no
checking for gcc options needed to detect all undeclared functions... none needed
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 whether SO_PEERCRED is declared... yes
checking for struct msghdr.msg_control... yes
checking for struct msghdr.msg_accrights... no
checking for struct sockaddr.sa_len... no
configure: creating ./network.buildinfo
configure: creating ./config.status
config.status: error: cannot find input file: `include/HsNetworkConfig.h.in'

@kazu-yamamoto
Copy link
Collaborator

Very strange.
This errors are specific to your environment.
Probably, no other people can reproduce this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants