snazzy-d/sdc

build fails complaining about object.d

John-Colvin opened this issue · 5 comments

% 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.

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

I never ran into that problem. In what condition does DMD gets confused?

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

I think this is fixed in deb3afd

Can you confirm?

This is good.