as per the docs on https://wiki.dlang.org/Building_under_Posix and https://dlang.org/dmd-freebsd.html, make fails to build phobos.
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 37: Could not find ../dmd/src/osmodel.mak
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 39: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 41: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 44: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 47: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 49: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 51: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 52: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 53: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 54: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 55: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 84: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 86: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 87: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 88: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 88: warning: duplicate script for target "(,)" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 85: warning: using previous script for "(,)" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 89: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 89: warning: duplicate script for target "(,)" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 85: warning: using previous script for "(,)" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 90: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 92: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 95: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 96: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 97: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 98: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 99: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 107: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 111: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 112: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 113: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 115: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 119: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 120: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 120: warning: duplicate script for target "(release,debug)" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 112: warning: using previous script for "(release,debug)" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 121: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 123: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 125: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 127: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 130: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 131: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 131: warning: duplicate script for target "(,)" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 85: warning: using previous script for "(,)" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 132: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 132: warning: duplicate script for target "(,)" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 85: warning: using previous script for "(,)" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 133: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 133: warning: duplicate script for target "(,)" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 85: warning: using previous script for "(,)" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 134: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 138: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 149: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 150: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 150: warning: duplicate script for target "(,)" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 85: warning: using previous script for "(,)" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 154: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 154: warning: duplicate script for target "(,)" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 85: warning: using previous script for "(,)" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 155: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 155: warning: duplicate script for target "(,)" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 85: warning: using previous script for "(,)" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 156: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 156: warning: duplicate script for target "(,)" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 85: warning: using previous script for "(,)" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 158: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 158: warning: duplicate script for target "(,)" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 85: warning: using previous script for "(,)" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 159: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 159: warning: duplicate script for target "(,)" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 85: warning: using previous script for "(,)" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 160: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 162: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 279: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 281: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 283: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 290: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 292: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 296: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 323: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 332: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 348: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 355: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 366: warning: duplicate script for target "generated//release//unittest/test_runner" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 353: warning: using previous script for "generated//release//unittest/test_runner" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 368: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 390: warning: duplicate script for target "%.test" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 385: warning: using previous script for "%.test" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 433: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 434: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 435: warning: duplicate script for target "ifeq" ignored
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 40: warning: using previous script for "ifeq" defined here
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 436: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 443: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 445: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 452: Missing dependency operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 454: Need an operator
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 458: Need an operator
make: Unknown modifier ' '
make: "/usr/home/search-master/dmd2/src/phobos/posix.mak" line 484: Need an operator
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/home/search-master/dmd2/src/phobos
if i compile with gmake then this is what i get:
$ gmake -f posix.mak DMD=~/dmd2/freebsd/bin64/dmd
awk: can't open file ../dmd/VERSION
source line number 1
awk: can't open file ../dmd/VERSION
source line number 1
posix.mak:37: ../dmd/src/osmodel.mak: No such file or directory
gmake: *** No rule to make target '../dmd/src/osmodel.mak'. Stop.
Comment #1 by mengukagan — 2017-09-23T09:31:14Z
by the way, this happened when i tried compiling phobos from the distribution rather than git.
i did checkout dmd, phobos and druntime. gmake ran perfectly and everything compiled.
Comment #2 by issues.dlang — 2017-10-03T19:09:36Z
So, what's the bug then? dmd, phobos, etc. are written to build with GNU's make on POSIX systems, and Digital Mars' make on Windows. That means using gmake on FreeBSD rather than make. The wiki should be updated to reflect the fact that gmake is needed on FreeBSD (or probably any POSIX system that isn't Linux), but that's not a bug in Phobos or dmd or any of that. Using BSD make for FreeBSD would mean either having different makefiles for FreeBSD and Linux rather than sharing them like we do now, or it would mean forcing Linux users to install and use BSD's make.
Comment #3 by mengukagan — 2017-10-08T16:55:44Z
(In reply to Jonathan M Davis from comment #2)
> So, what's the bug then? dmd, phobos, etc. are written to build with GNU's
> make on POSIX systems, and Digital Mars' make on Windows. That means using
> gmake on FreeBSD rather than make. The wiki should be updated to reflect the
> fact that gmake is needed on FreeBSD (or probably any POSIX system that
> isn't Linux), but that's not a bug in Phobos or dmd or any of that. Using
> BSD make for FreeBSD would mean either having different makefiles for
> FreeBSD and Linux rather than sharing them like we do now, or it would mean
> forcing Linux users to install and use BSD's make.
this was the first time i compiled dmd, druntime and phobos myself. i've always used pre-compiled versions or installed through brew or apt.
when you download from dlang.org web site and intuitively try compiling it (let's say after you've changed some stuff on phobos), nothing works out. when you check out all the projects separately into a dir and compile, it compiles without any issues. i believe it's core team's decision to think of it as a bug or not.