Solved [Newbie] gmake doesn't recognize FreeBSD

I wanted to install GDC at my FreeBSD, but when I typed sudo gmake install, those error occurred:

Code:
/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);
         ^
/usr/home/vmware/gdc/gcc-7.3.0/libphobos/libdruntime/core/stdc/time.d:116:9: error: undefined identifier 'clock_t', did you mean function 'clock'?
 clock_t clock();
         ^
/usr/home/vmware/gdc/gcc-7.3.0/libphobos/libdruntime/core/stdc/time.d:118:9: error: undefined identifier 'time_t', did you mean function 'time'?
 double  difftime(time_t time1, time_t time0);
         ^
/usr/home/vmware/gdc/gcc-7.3.0/libphobos/libdruntime/core/stdc/time.d:120:9: error: undefined identifier 'tm'
 time_t  mktime(tm* timeptr);
         ^
/usr/home/vmware/gdc/gcc-7.3.0/libphobos/libdruntime/core/stdc/wchar_.d:83:5: error: undefined identifier 'FILE'
 int fwprintf(FILE* stream, in wchar_t* format, ...);
     ^
/usr/home/vmware/gdc/gcc-7.3.0/libphobos/libdruntime/core/stdc/stdio.d:1090:9: error: undefined identifier 'fpos_t'
     int fgetpos(FILE* stream, scope fpos_t * pos);
         ^
../../../../gcc-7.3.0/libphobos/libdruntime/core/demangle.d:2622:16: error: module core.stdc.stdio import 'snprintf' not found, did you mean function 'sprintf'?
         import core.stdc.stdio : snprintf;
                ^
/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:

Code:
 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.

and I've also tried this:

Code:
 vmware@localhost:~ % node -e 'console.log(os.platform())'
 freebsd

then why it says "Unsupported platform"?
 
It seems that there used to be a lang/gdc but it got removed because it remained broken for too long (note: I don't know if this was the same stuff you're trying to build).

Anyway, FreeBSD isn't Linux, I guess that got proven here once again :)
 
There are too many differences between Linux and FreeBSD way of handling even the rudimentary level stuff like locations of C compilers and related tools that you can't take a Linux Makefile and expect it to work. That's why we have ports(7).
 
Okay, so it seems GDC doesn't work on FreeBSD, then I have to work on DMD instead.
since I'm new here, I have to learn much more. I appriciate all of you for these advices.
 
Back
Top