Euphoria Ticket #965: tdm gcc 5.1 source/be_machine.c:2542: undefined reference to `roundup'

tdm gcc 5.1.0 from http://tdm-gcc.tdragon.net

when linking eui.exe for 64 bit on windows 
/intobj/back/be_machine.o: In function `C allBack': 
/source/be_machine.c:2542: undefined reference to `roundup' 
/intobj/back/be_socket.o: In function `eu sock_getservbyport': 
/source/be_socket.c:1345: undefined reference to `NOT_USHORT_V ALUE' 
/intobj/back/be_socket.o: In function `eu sock_close': 
/source/be_socket.c:1573: undefined reference to `IS_SOCKET' 
more undefined references to `IS_SOCKET' follow 
gcc makefile for windows seems to be broken for many months.

I wasn't able to build 4.1 or 4.0 with simple make for many previous revisions. though I am able to make library interpreter ok with tdm gcc 4.9

eui -v works and I can run bin/bugreport.ex but most of the other demos silent exit. same with --debug

I am not able to build debug with no managed memory

build of previous revisions with tdm gcc 4.9 for 32 bits work ok

Details

Type: Bug Report Severity: Minor Category: Build System
Assigned To: unknown Status: New Reported Release: 6446:490db928fa10
Fixed in SVN #: View VCS: none Milestone: 4.1.0

1. Comment by jimcbrown Jan 14, 2017

Maybe tdm gcc 5.1 is broken with respect to use of the 'inline' keyword? Try removing the 'inline' keyword from their definitions ( at http://scm.openeuphoria.org/hg/euphoria/file/979ef64e0941/source/be_machine.c#l2376 and http://scm.openeuphoria.org/hg/euphoria/file/979ef64e0941/source/be_socket.c#l54 and http://scm.openeuphoria.org/hg/euphoria/file/979ef64e0941/source/be_socket.c#l35 ) and then doing a distclean and a build.

2. Comment by ne1uno Jan 14, 2017

same link error with MinGW64 gcc 6.3 from http://nuwen.net/mingw.html

I will look at the inline references. maybe they changed the header names?

why are we even static linking to sockets? shouldn't that be easy enough to lazy link at runtime? I never use them

3. Comment by jimcbrown Jan 14, 2017

Thanks to Shawn Pringle, we are doing a dynamic, run-time 'link' with function pointers.

See http://scm.openeuphoria.org/hg/euphoria/file/979ef64e0941/source/be_socket.c#l977 and http://scm.openeuphoria.org/hg/euphoria/file/979ef64e0941/source/be_socket.c#l1568 and http://scm.openeuphoria.org/hg/euphoria/file/979ef64e0941/source/be_socket.c#l942

The inline functions causing problems aren't external references but internal ones that do stuff like tell us if an Euphoria object represents a socket or not - stuff that can't be outsourced to an external third-party or OS library.

Search



Quick Links

User menu

Not signed in.

Misc Menu