[Issue 22573] DMD compiler errors on Illumos/Solaris

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Dec 8 12:16:32 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=22573

--- Comment #3 from jkruth at telecolumbus.net ---
(In reply to Iain Buclaw from comment #2)
> (In reply to Iain Buclaw from comment #1)
> > The dmd backend has only ever been ported to Solaris i[3456]86, IIRC.  So
> > it's likely that config is not being set-up correctly for x86_64.
> Nope, it's a typo.
> 
> https://github.com/dlang/dmd/blob/master/src/dmd/backend/backconfig.d#L245
> 
> Raisea pull to fix that, my guess is that should be `(EX_SOLARIS |
> EX_SOLARIS64)`.

This fixes the above issue.
However another one appears:


---                                                                             
DMD v2.098.0-317-g9d1027cfb-dirty                                               
predefs   DigitalMars LittleEndian D_Version2 all D_SIMD Posix ELFv1 Solaris
CppRuntime_Gcc D_InlineAsm_X86_64 X86_64 D_LP64 D_PIC D_ModuleInfo D_Exceptions
D_TypeInfo D_HardFloat                                
binary    ../dmd/generated/solaris/release/64/dmd                               
version   v2.098.0-317-g9d1027cfb-dirty                                         
config                                                                          
DFLAGS    (none)                                                                
---                                                                             
core.exception.AssertError at src/dmd/backend/elfobj.d(1609): Assertion failure    
----------------                                                                
../../../../libphobos/libdruntime/core/exception.d:582 onAssertError [0x7eb764] 
src/dmd/backend/elfobj.d:1609 _Z15ElfObj_ehtablesP6SymboljS0_ [0x7ca2ed]        
src/dmd/backend/obj.d-mixin-322:325 _ZN3Obj8ehtablesEP6SymboljS1_ [0x684910]    
src/dmd/eh.d:69 _Z16except_gentablesv [0x683a9d]                                
src/dmd/backend/cgcod.d:658 _Z6codgenP6Symbol [0x710430]                        
src/dmd/backend/out.d:1478 _Z10writefunc2P6Symbol [0x70e320]
src/dmd/backend/out.d:1137 _Z9writefuncP6Symbol [0x70da98]
src/dmd/glue.d:1154 _Z25FuncDeclaration_toObjFileP15FuncDeclarationb [0x69a8de]
src/dmd/toobj.d:311 _ZN9toObjFile9ToObjFile5visitEP15FuncDeclaration [0x6b0c46]
src/dmd/func.d:2685 _ZN15FuncDeclaration6acceptEP7Visitor [0x417b74]
src/dmd/toobj.d:346 __lambda3 [0x6b1c68]
src/dmd/dsymbol.d:104 void
dmd.dsymbol.foreachDsymbol(dmd.root.array.Array!(dmd.dsymbol.Dsymbol).Array*,
void delegate(dmd.dsymbol.Dsymbol)) [0x461253]
src/dmd/toobj.d:346 _ZN9toObjFile9ToObjFile5visitEP16ClassDeclaration
[0x6b1479]
src/dmd/dclass.d:1000 _ZN16ClassDeclaration6acceptEP7Visitor [0x4178d1]
src/dmd/toobj.d:1003 _Z9toObjFileP7Dsymbolb [0x431391]
src/dmd/glue.d:504 _Z10genObjFileP6Moduleb [0x696801]
src/dmd/glue.d:231 _Z18obj_write_deferredP7Library [0x697309]
src/dmd/glue.d:138 void dmd.glue.generateCodeAndWrite(dmd.dmodule.Module[],
const(char)*[], const(char)[], const(char)[], bool, bool, bool, bool, bool)
[0x43face]
src/dmd/mars.d:597 int dmd.mars.tryMain(ulong, const(char)**, ref
dmd.globals.Param) [0x442055]
src/dmd/mars.d:1020 _Dmain [0x44dc6d]
gmake: *** [posix.mak:377: generated/solaris/release/64/libdruntime.a] Fehler 1


It calls the ElfObj_ehtables function which just asserts(0) and causes the
error, see here:

https://github.com/dlang/dmd/blob/master/src/dmd/backend/elfobj.d#L1607

--


More information about the Digitalmars-d-bugs mailing list