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

Build failing when linking libidris_rts in MSYS2 MinGW64 terminal #45

Closed
edwinb opened this issue May 20, 2020 · 1 comment
Closed

Build failing when linking libidris_rts in MSYS2 MinGW64 terminal #45

edwinb opened this issue May 20, 2020 · 1 comment
Labels
Installation Issue Problem compiling or running Idris status: upstream Upstream issue

Comments

@edwinb
Copy link
Collaborator

edwinb commented May 20, 2020

Issue by arabelladonna
Sunday Apr 05, 2020 at 20:29 GMT
Originally opened as edwinb/Idris2-boot#267


Opening a new issue as directed to here: https://github.com/edwinb/Idris2/issues/78#issuecomment-609474846

My attempts to build Idris 2 in the MSYS2 MinGW64 terminal are failing when linking libidris_rts. I've tried both the 0.1.0 release and the repo. I've tried make install, make install-fromc, and make idris2. All end in the same error, which can be seen below.

EDIT: Forgot to mention that I've also tried building with GCC, which also failed, and that I'm using clang 9.0.1.

Using make idris2:

$ make idris2
Using Idris 1 version: 1.3.2
Building Idris 2 version: 0.1.0-59503712f
idris --build idris2.ipkg
Entering directory `.\src'
Leaving directory `.\src'
make -C dist
make[1]: Entering directory '/d/code/github/idris2/dist'
make -C rts
make[2]: Entering directory '/d/code/github/idris2/dist/rts'
make[2]: Nothing to be done for 'build'.
make[2]: Leaving directory '/d/code/github/idris2/dist/rts'
clang   idris2.c -o idris2 -I rts -L rts -lidris_rts -lgmp -lm
D:\Applications\msys64\mingw64\bin\ld: D:\Applications\msys64\tmp\idris2-06e9d9.o:idris2.c:(.text+0x811cbb): undefined reference to `__imp_listen'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$buf_htonl[buf_htonl]+0x1c): undefined reference to `__imp_htonl'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$buf_ntohl[buf_ntohl]+0x1c): undefined reference to `__imp_ntohl'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_socket[idrnet_socket]+0x24): undefined reference to `__imp_WSAStartup'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_socket[idrnet_socket]+0x56): undefined reference to `__imp_socket'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_getaddrinfo[idrnet_getaddrinfo]+0x69): undefined reference to `__imp_getaddrinfo'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_bind[idrnet_bind]+0x72): undefined reference to `__imp_getaddrinfo'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_bind[idrnet_bind]+0x93): undefined reference to `__imp_bind'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_connect[idrnet_connect]+0x72): undefined reference to `__imp_getaddrinfo'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_connect[idrnet_connect]+0x91): undefined reference to `__imp_connect'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_connect[idrnet_connect]+0xa5): undefined reference to `__imp_freeaddrinfo'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_sockaddr_ipv4[idrnet_sockaddr_ipv4]+0x2a): undefined reference to `__imp_inet_ntop'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_sockaddr_ipv4_port[idrnet_sockaddr_ipv4_port]+0xa): undefined reference to `__imp_ntohs'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_accept[idrnet_accept]+0x16): undefined reference to `__imp_accept'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_send[idrnet_send]+0x28): undefined reference to `__imp_send'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_send_buf[idrnet_send_buf]+0x3e): undefined reference to `__imp_htonl'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_send_buf[idrnet_send_buf]+0x6f): undefined reference to `__imp_send'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_recv[idrnet_recv]+0x48): undefined reference to `__imp_recv'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_recv_buf[idrnet_recv_buf]+0x18): undefined reference to `__imp_recv'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_recv_buf[idrnet_recv_buf]+0x34): undefined reference to `__imp_ntohl'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_sendto[idrnet_sendto]+0x76): undefined reference to `__imp_getaddrinfo'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_sendto[idrnet_sendto]+0xb1): undefined reference to `__imp_sendto'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_sendto[idrnet_sendto]+0xbe): undefined reference to `__imp_freeaddrinfo'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_sendto_buf[idrnet_sendto_buf]+0x83): undefined reference to `__imp_getaddrinfo'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_sendto_buf[idrnet_sendto_buf]+0xa2): undefined reference to `__imp_htonl'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_sendto_buf[idrnet_sendto_buf]+0xe4): undefined reference to `__imp_sendto'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_recvfrom[idrnet_recvfrom]+0xa2): undefined reference to `__imp_recvfrom'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_recvfrom_buf[idrnet_recvfrom_buf]+0x92): undefined reference to `__imp_recvfrom'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_recvfrom_buf[idrnet_recvfrom_buf]+0xb2): undefined reference to `__imp_ntohl'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$idrnet_get_recvfrom_port[idrnet_get_recvfrom_port]+0x13): undefined reference to `__imp_ntohs'
D:\Applications\msys64\mingw64\bin\ld: rts/libidris_rts.a(idris_net.o):idris_net.c:(.text$clean_sockets[clean_sockets]+0x3): undefined reference to `__imp_WSACleanup'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [Makefile:7: idris2] Error 1
make[1]: Leaving directory '/d/code/github/idris2/dist'
make: *** [Makefile:75: idris2-fromc] Error 2
@edwinb edwinb added the Installation Issue Problem compiling or running Idris label May 20, 2020
@gallais
Copy link
Member

gallais commented Feb 22, 2021

I am going to close this as it is idris2-boot specific.
Nowadays we don't need to use idris1 anymore and can jump
straight to make bootstrap.

@gallais gallais closed this as completed Feb 22, 2021
@gallais gallais added the status: upstream Upstream issue label Feb 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Installation Issue Problem compiling or running Idris status: upstream Upstream issue
Projects
None yet
Development

No branches or pull requests

2 participants