Bug 14572 – cannot build dmd from source anymore: 'g++ -m64: No such file or directory'
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Mac OS X
Creation time
2015-05-11T08:13:00Z
Last change time
2017-07-22T12:35:37Z
Assigned to
nobody
Creator
timothee.cour2
Comments
Comment #0 by timothee.cour2 — 2015-05-11T08:13:42Z
git clone git://github.com/D-Programming-Language/dmd.git
cd dmd
make -f posix.mak MODEL=64
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src -f posix.mak
no cpu specified, assuming X86
dmd idgen.d
g++ -m64: No such file or directory
--- errorlevel 255
make[1]: *** [idgen] Error 255
make: *** [all] Error 2
(on OSX 10.10.3)
Comment #1 by dlang-bugzilla — 2015-05-12T19:17:26Z
I can't reproduce this.
Check the configuration of your host D compiler.
Try building with Digger. If it works with Digger, then the issue lies with your host D compiler.
Comment #2 by code — 2015-05-15T02:38:51Z
g++ -m64: No such file or directory
This error comes from the linker invocation of dmd.
Probably happens because the makefile or so exports CC.
Comment #3 by timothee.cour2 — 2015-05-16T02:45:55Z
it happens when user has
export CC=clang
in his ~/.zshrc / ~/.bashrc for example, and then calls the makefile.
Note that the makefile sets CC to g++ (a hack to allow the .c files to be treated as .cpp files); which I think is problematic. a better way would be to call
$(CXX) -x c++ some_badly_named_cpp_file.c
Comment #4 by bugzilla — 2015-05-22T06:44:42Z
(In reply to Timothee Cour from comment #3)
> $(CXX) -x c++ some_badly_named_cpp_file.c
Is "-x c++" supported on both clang and gcc?