build fails complaining about object.d
John-Colvin opened this issue · 5 comments
John-Colvin commented
% make
dmd -c -ofobj/sdmd.o sdlib/d/rt/eh.d sdlib/d/rt/object.d sdlib/d/rt/dwarf.d -m64 -I/usr/include/dmd/druntime/import -I/usr/include/dmd/phobos -Isdlib
Error: `TypeInfo_Struct` not found. object.d may be incorrectly installed or corrupt.
dmd 2.097.2, macos. Same result on linux and with older compilers.
maxhaton commented
I also had this issue. In my case it's because dmd is finding the sdc object.d
and thinking it's the object.d
.
So basically needs
DMD_BIN_PATH ?= $(dir $(shell which $(DMD)))
NATIVE_DMD_IMPORTS ?= -I$(DMD_BIN_PATH)../../src/phobos -I$(DMD_BIN_PATH)../../src/druntime/import
or similar in sdmd.mak
deadalnix commented
I never ran into that problem. In what condition does DMD gets confused?
maxhaton commented
If you use dmd on linux via the install.sh script and source
blah blah, then druntime and phobos are not in /usr/include/dmd/druntime/import
so the import points at nothing whereas there is an import to something (sdrt) which has an object.d
in it.
You could also move/hide the object.d
deadalnix commented
This is good.