Trouble compiling FB rtlib under latest MinGW

For other topics related to the FreeBASIC project or its community.
counting_pine
Site Admin
Posts: 6176
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Trouble compiling FB rtlib under latest MinGW

Postby counting_pine » Oct 29, 2013 18:29

Hi,
having just set up a new build system from scratch following the instructions at http://www.freebasic.net/wiki/DevBuild#MingwBuild, I am coming across the following error:

Code: Select all

In file included from src/rtlib/static/../fb_unicode.h:65:0,
                 from src/rtlib/static/../fb.h:298,
                 from src/rtlib/static/fbrt0.c:3:
c:\mingw\include\wchar.h:644:2: error: unknown type name 'dev_t'
  dev_t    st_dev; /* Equivalent to drive number 0=A 1=B ... */
  ^
compilation terminated due to -Wfatal-errors.
make: *** [lib/freebasic/win32/fbrt0.o] Error 1


Compiling without -Wfatal-errors gives me the additional error messages:

Code: Select all

c:\mingw\include\wchar.h:645:2: error: unknown type name 'ino_t'
  ino_t    st_ino; /* Always zero ? */
  ^
c:\mingw\include\wchar.h:646:2: error: unknown type name 'mode_t'
  mode_t    st_mode; /* See above constants */
  ^
c:\mingw\include\wchar.h:650:2: error: unknown type name 'dev_t'
  dev_t    st_rdev; /* Seems useless (not even filled in) */
dkl
Site Admin
Posts: 3210
Joined: Jul 28, 2005 14:45
Location: Germany

Re: Trouble compiling FB rtlib under latest MinGW

Postby dkl » Oct 29, 2013 18:54

I saw this too a while ago and reported it at:
http://sourceforge.net/p/mingw/bugs/2039/

It definitely is a problem with the new MinGW headers and their support for _NO_OLDNAMES which FB is using. (Perhaps MinGW is deprecating _NO_OLDNAMES, I don't know; in that case we'd need to fix the FB rtlib)

The easiest work-around seemed to be to adjust that wchar.h and add the '_' underscore prefixes to those typedef names.
counting_pine
Site Admin
Posts: 6176
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Trouble compiling FB rtlib under latest MinGW

Postby counting_pine » Oct 29, 2013 21:48

Yes, that's fixed it. Thanks.
I couldn't comment on a general solution; I can't really find a definitive page about _NO_OLDNAMES anywhere.
It seems like your bug report has slipped through the attention cracks, which is a shame.
integer
Posts: 385
Joined: Feb 01, 2007 16:54
Location: usa

Re: Trouble compiling FB rtlib under latest MinGW

Postby integer » Jan 22, 2014 4:43

counting_pine wrote:Hi,
having just set up a new build system from scratch following the instructions at http://www.freebasic.net/wiki/DevBuild#MingwBuild, I am coming across the following error:

Code: Select all

In file included from src/rtlib/static/../fb_unicode.h:65:0,
                 from src/rtlib/static/../fb.h:298,
                 from src/rtlib/static/fbrt0.c:3:
c:\mingw\include\wchar.h:644:2: error: unknown type name 'dev_t'
  dev_t    st_dev; /* Equivalent to drive number 0=A 1=B ... */
  ^
compilation terminated due to -Wfatal-errors.
make: *** [lib/freebasic/win32/fbrt0.o] Error 1


That's what I get.
Then a dialog box appears:

[code=powershell file=Untitled.bas]Windows - No Disk
Exception Processing Message
c0000013 Parameters 75b6b8c 4 75b6b8c 75b6b8c
[Cancel] [Try Again] [Continue]

[/code]after a dozen or so clicks on Continue it stops with this:

    compilation terminated due to -Wfatal-errors.
    make: ***[lib/freebasic/fbrt0.o] Error 1

The underscore has been prefixed to the typedef names mentioned above.

I have turned off the pc & removed the directories required for the compilation.
I have changed the order of the operations, but after more than a dozen tries,
there seems to be no way to get past the fbrt0.o line.

Any suggestions:

OS: Windows XP (build 2600, Service Pack 3)
running on Compaq Presario
counting_pine
Site Admin
Posts: 6176
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Trouble compiling FB rtlib under latest MinGW

Postby counting_pine » Jan 22, 2014 8:52

It probably isn't related to the original problem if you've fixed that. Try searching the error message.

Return to “Community Discussion”

Who is online

Users browsing this forum: No registered users and 1 guest