[Newbie] GDC Install error at FreeBSD

Iain Buclaw ibuclaw at gdcproject.org
Tue Aug 14 22:24:48 UTC 2018


On 14 August 2018 at 09:27, namefag via Digitalmars-d
<digitalmars-d at puremagic.com> wrote:
> I wanted to install gdc at my FreeBSD,
> and it went peacefully until I typed "sudo gmake install"
> then this error happened:
>
> /usr/home/vmware/gdc/gcc-7.3.0/libphobos/libdruntime/core/stdc/stdlib.d:204:9:
> error: undefined identifier 'wchar_t'
>  int     mbtowc(scope wchar_t* pwc, scope const char* s, size_t n);
>          ^

<snip>

> /usr/home/vmware/gdc/gcc-7.3.0/libphobos/libdruntime/core/stdc/stdlib.d:82:6:
> error: static assert  "Unsupported platform"
>  else static assert( false, "Unsupported platform" );
>
> the last line was such confusing, 'cause when I saw stdlib.d file with vi,
> it said:
>
>  74 version(Windows)      enum RAND_MAX = 0x7fff;
>  75 else version(CRuntime_Glibc)  enum RAND_MAX = 0x7fffffff;
>  76 else version(Darwin)  enum RAND_MAX = 0x7fffffff;
>  77 else version(FreeBSD) enum RAND_MAX = 0x7fffffff;
>  78 else version(NetBSD)  enum RAND_MAX = 0x7fffffff;
>  79 else version(OpenBSD) enum RAND_MAX = 0x7fffffff;
>  80 else version(Solaris) enum RAND_MAX = 0x7fff;
>  81 else version(CRuntime_Bionic) enum RAND_MAX = 0x7fffffff;
>  82 else static assert( false, "Unsupported platform" );
>
> as you see, it HAS FreeBSD support! then why it says "Unsupported platform"?

The compiler doesn't predefine the FreeBSD version as this is
currently an untested configuration.

How readily available are you to patch gcc?

What you'll need to do is create a new source file, and hook it into
config.gcc for the FreeBSD path.


More information about the Digitalmars-d mailing list