[Issue 22491] New: Multiple building issues using dmd or ldc2 on new Fedora 35

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 8 05:33:18 UTC 2021


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

          Issue ID: 22491
           Summary: Multiple building issues using dmd or ldc2 on new
                    Fedora 35
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: animuspexus at protonmail.com

Created attachment 1832
  --> https://issues.dlang.org/attachment.cgi?id=1832&action=edit
how working app looks

With Fedora 35, multiple problems with building D programs appeared.

example #1:
----------

fedora 35 + 'dnf install ldc' + 'dnf install [dmd.rpm from dlang.org]'

in this setup, dub can't build with --build=release using any of --compiler=dmd
or --compiler=ldc2.

for dmd: compilation simply ends with "/usr/bin/dmd failed with exit code -11."
message

for ldc2: compilation ends with this trace:

=============================================================
 #0 0x00007f7901b3c1b6 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/usr/lib64/llvm12/lib/libLLVM-12.so+0xc001b6)
 #1 0x00007f7901b3a0a4 llvm::sys::RunSignalHandlers()
(/usr/lib64/llvm12/lib/libLLVM-12.so+0xbfe0a4)
 #2 0x00007f7901b3a226 (/usr/lib64/llvm12/lib/libLLVM-12.so+0xbfe226)
 #3 0x00007f790045b760 __restore_rt (/lib64/libc.so.6+0x42760)
 #4 0x00000000005d392e StatementSemanticVisitor::visit(TryCatchStatement*)
(/usr/bin/ldc2+0x5d392e)
 #5 0x000000000053d8cf Semantic3Visitor::visit(FuncDeclaration*)
(/usr/bin/ldc2+0x53d8cf)
 #6 0x0000000000541eba Semantic3Visitor::visit(CtorDeclaration*)
(/usr/bin/ldc2+0x541eba)
 #7 0x000000000053b6ec Semantic3Visitor::visit(AggregateDeclaration*)
(/usr/bin/ldc2+0x53b6ec)
 #8 0x000000000053bc42 Semantic3Visitor::visit(Module*)
(/usr/bin/ldc2+0x53bc42)
 #9 0x000000000053bb0a
SemanticTimeTraceVisitor<Semantic3Visitor*>::visit(Module*)
(/usr/bin/ldc2+0x53bb0a)
#10 0x00000000006245a5 mars_mainBody(Param&, Array<char const*>&, Array<char
const*>&) (/usr/bin/ldc2+0x6245a5)
#11 0x000000000082c102 cppmain() (/usr/bin/ldc2+0x82c102)
#12 0x00007f7900a1818c _D2rt6dmain212_d_run_main2UAAamPUQgZiZ6runAllMFZv
(/lib64/libdruntime-ldc-shared.so.97+0xde18c)
#13 0x00007f7900a17fa5 _d_run_main2
(/lib64/libdruntime-ldc-shared.so.97+0xddfa5)
#14 0x00007f7900a17dfe _d_run_main
(/lib64/libdruntime-ldc-shared.so.97+0xdddfe)
#15 0x00000000005240cd main (/usr/bin/ldc2+0x5240cd)
#16 0x00007f7900446560 __libc_start_call_main (/lib64/libc.so.6+0x2d560)
#17 0x00007f790044660c __libc_start_main at GLIBC_2.2.5 (/lib64/libc.so.6+0x2d60c)
#18 0x0000000000526475 _start (/usr/bin/ldc2+0x526475)
ldc2 failed with exit code -11.
=============================================================



example #2:
----------

I'm doing 'dub fetch dmd' and 'dub fetch dub'. afterwards, I'm building both
dub and dmd with 'dub build' and installing both new executables to local bin

after this, dub can't build self with following messages:

=============================================================
dub build
Performing "debug" build using /home/animuspexus/bin/dmd for x86_64.
dub 1.27.0: building configuration "application"...
source/dub/dependency.d(779,2): Deprecation: Usage of the `body` keyword is
deprecated. Use `do` instead.
source/dub/packagemanager.d(275,2): Deprecation: Usage of the `body` keyword is
deprecated. Use `do` instead.
source/dub/semver.d(106,1): Deprecation: Usage of the `body` keyword is
deprecated. Use `do` instead.
Serializing composite type BuildRequirements which has no serializable fields
Serializing composite type BuildOptions which has no serializable fields
Linking...
/usr/bin/ld:
.dub/build/application-debug-linux.posix-x86_64-dmd_v2.098.0-205AD86DD0478553471DA77AF866DC71/dub.o:
in function
`_D3std8internal4math11biguintcore7BigUint__T17fromDecimalStringTSQCl9algorithm9iteration__T16FilterBidiResultSQEe6bigint6BigInt__T6__ctorTSQFh3utf__T10byCodeUnitTAyaZQrFQhZ14ByCodeUnitImplZQChMFNcQCgZ9__lambda6TQCvZQEuZQGtMFNaNlNfQGkZb':
/usr/include/dmd/phobos/std/internal/math/biguintcore.d:592: undefined
reference to
`_D4core8internal5array8capacity__T22_d_arraysetlengthTImplHTAkTkZ18_d_arraysetlengthTFNaNbNeNkMKQBkmZm'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
/home/animuspexus/bin/dmd failed with exit code 1.
=============================================================


but example form #1 still builds ok with simple "dub build". 
but with "dub build --build=release" it fail with this messages:


=============================================================
dub build --build=release --compiler=`which dmd`
WARNING: A deprecated branch based version specification is used for the
dependency dtk. Please use numbered versions instead. Also note that you can
still use the dub.selections.json file to override a certain dependency to use
a branch instead.
Performing "release" build using /home/animuspexus/bin/dmd for x86_64.
bindbc-loader 1.0.1: target for configuration "noBC" is up to date.
bindbc-freetype 1.0.2: target for configuration "dynamic" is up to date.
bindbc-sdl 1.0.1: target for configuration "dynamic" is up to date.
taggedalgebraic 0.11.22: target for configuration "library" is up to date.
eventcore 0.9.17: target for configuration "epoll" is up to date.
stdx-allocator 2.77.5: target for configuration "library" is up to date.
vibe-core 1.20.0: target for configuration "epoll" is up to date.
observable 1.0.3: target for configuration "library" is up to date.
dtk ~master: building configuration "platform-sdl-desktop"...
creating property "text"
using freetype font manager
generating redraw_x for Button
generating redraw_x for ButtonCheck
generating redraw_x for ButtonRadio
generating redraw_x for Form
generating redraw_x for Layout
connectToFontFile_onAfterChanged
connectToFontFace_onAfterChanged
connectToFontColor_onAfterChanged
connectToFontSize_onAfterChanged
connectToFontItalic_onAfterChanged
connectToFontBold_onAfterChanged
connectToLayoutLines_onAfterChanged
connectToLayoutChars_onAfterChanged
connectToDrawBewelAndBackground_onAfterChanged
connectToBewelBackgroundColor_onAfterChanged
connectToMultiline_onAfterChanged
connectToVirtualWrapByChar_onAfterChanged
connectToVirtualWrapByWord_onAfterChanged
connectToForceMonowidth_onAfterChanged
connectToTextSelectable_onAfterChanged
connectToTextEditable_onAfterChanged
generating redraw_x for TextEntry
---
ERROR: This is a compiler bug.
Please report it via https://issues.dlang.org/enter_bug.cgi
with, preferably, a reduced, reproducible example and the information below.
DustMite (https://github.com/CyberShadow/DustMite/wiki) can help with the
reduction.
---
DMD v2.098.0

predefs   SDL_204 BindSDL_Static SDL_Image BindFT_Static
DTK_PLATFORM_SDL_DESKTOP Have_dtk Have_bindbc_freetype Have_bindbc_sdl
Have_observable Have_bindbc_loader Have_vibe_core Have_eventcore
Have_stdx_allocator EventcoreEpollDriver Have_taggedalgebraic DigitalMars
LittleEndian D_Version2 all D_SIMD Posix ELFv1 linux CRuntime_Glibc
CppRuntime_Gcc D_InlineAsm_X86_64 X86_64 D_LP64 D_PIC D_ModuleInfo D_Exceptions
D_TypeInfo D_HardFloat
binary    /home/animuspexus/bin/dmd
version   v2.098.0

config    /etc/dmd.conf
DFLAGS    -I/usr/include/dmd/phobos -I/usr/include/dmd/druntime/import
-L-L/usr/lib64 -L--export-dynamic -fPIC
---
core.exception.AssertError at src/dmd/statementsem.d(3973): Assertion failure
----------------
??:? _d_assertp [0x90cdd4]
src/dmd/statementsem.d:3973
_ZN24StatementSemanticVisitor5visitEP17TryCatchStatement [0x796084]
src/dmd/statement.d:1582 _ZN17TryCatchStatement6acceptEP7Visitor [0x7874a9]
src/dmd/statementsem.d:143 _Z17statementSemanticP9StatementP5Scope [0x788a6f]
src/dmd/semantic3.d:582 _ZN16Semantic3Visitor5visitEP15FuncDeclaration
[0x77f7a3]
src/dmd/semantic3.d:1455 _ZN16Semantic3Visitor5visitEP15CtorDeclaration
[0x782fde]
src/dmd/func.d:3678 _ZN15CtorDeclaration6acceptEP7Visitor [0x714e35]
src/dmd/semantic3.d:82 _Z9semantic3P7DsymbolP5Scope [0x77e221]
src/dmd/semantic3.d:1515 _ZN16Semantic3Visitor5visitEP20AggregateDeclaration
[0x78322e]
src/dmd/parsetimevisitor.d:90
_ZN16ParseTimeVisitorI10ASTCodegenE5visitEP16ClassDeclaration [0x7796d5]
src/dmd/dclass.d:1000 _ZN16ClassDeclaration6acceptEP7Visitor [0x621049]
src/dmd/semantic3.d:82 _Z9semantic3P7DsymbolP5Scope [0x77e221]
src/dmd/semantic3.d:195 _ZN16Semantic3Visitor5visitEP6Module [0x77e618]
src/dmd/dmodule.d:1452 _ZN6Module6acceptEP7Visitor [0x647641]
src/dmd/semantic3.d:82 _Z9semantic3P7DsymbolP5Scope [0x77e221]
src/dmd/mars.d:499 int dmd.mars.tryMain(ulong, const(char)**, ref
dmd.globals.Param) [0x5d1224]
src/dmd/mars.d:1023 _Dmain [0x5d2f65]
/home/animuspexus/bin/dmd failed with exit code 1.
=============================================================


dub build --compiler=ldc2
compiles ok

dub build --compiler=ldc2 --build=release
fails:


=============================================================

dub build --compiler=ldc2 --build=release --force
WARNING: A deprecated branch based version specification is used for the
dependency dtk. Please use numbered versions instead. Also note that you can
still use the dub.selections.json file to override a certain dependency to use
a branch instead.
Performing "release" build using /usr/bin/ldc2 for x86_64.
bindbc-loader 1.0.1: building configuration "noBC"...
bindbc-freetype 1.0.2: building configuration "dynamic"...
bindbc-sdl 1.0.1: building configuration "dynamic"...
taggedalgebraic 0.11.22: building configuration "library"...
eventcore 0.9.17: building configuration "epoll"...
stdx-allocator 2.77.5: building configuration "library"...
vibe-core 1.20.0: building configuration "epoll"...
observable 1.0.3: building configuration "library"...
dtk ~master: building configuration "platform-sdl-desktop"...
creating property "text"
using freetype font manager
generating redraw_x for Button
generating redraw_x for ButtonCheck
generating redraw_x for ButtonRadio
generating redraw_x for Form
generating redraw_x for Layout
connectToFontFile_onAfterChanged
connectToFontFace_onAfterChanged
connectToFontColor_onAfterChanged
connectToFontSize_onAfterChanged
connectToFontItalic_onAfterChanged
connectToFontBold_onAfterChanged
connectToLayoutLines_onAfterChanged
connectToLayoutChars_onAfterChanged
connectToDrawBewelAndBackground_onAfterChanged
connectToBewelBackgroundColor_onAfterChanged
connectToMultiline_onAfterChanged
connectToVirtualWrapByChar_onAfterChanged
connectToVirtualWrapByWord_onAfterChanged
connectToForceMonowidth_onAfterChanged
connectToTextSelectable_onAfterChanged
connectToTextEditable_onAfterChanged
generating redraw_x for TextEntry
 #0 0x00007f41f7c331b6 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
(/usr/lib64/llvm12/lib/libLLVM-12.so+0xc001b6)
 #1 0x00007f41f7c310a4 llvm::sys::RunSignalHandlers()
(/usr/lib64/llvm12/lib/libLLVM-12.so+0xbfe0a4)
 #2 0x00007f41f7c31226 (/usr/lib64/llvm12/lib/libLLVM-12.so+0xbfe226)
 #3 0x00007f41f6552760 __restore_rt (/lib64/libc.so.6+0x42760)
 #4 0x00000000005d392e StatementSemanticVisitor::visit(TryCatchStatement*)
(/usr/bin/ldc2+0x5d392e)
 #5 0x000000000053d8cf Semantic3Visitor::visit(FuncDeclaration*)
(/usr/bin/ldc2+0x53d8cf)
 #6 0x0000000000541eba Semantic3Visitor::visit(CtorDeclaration*)
(/usr/bin/ldc2+0x541eba)
 #7 0x000000000053b6ec Semantic3Visitor::visit(AggregateDeclaration*)
(/usr/bin/ldc2+0x53b6ec)
 #8 0x000000000053bc42 Semantic3Visitor::visit(Module*)
(/usr/bin/ldc2+0x53bc42)
 #9 0x000000000053bb0a
SemanticTimeTraceVisitor<Semantic3Visitor*>::visit(Module*)
(/usr/bin/ldc2+0x53bb0a)
#10 0x00000000006245a5 mars_mainBody(Param&, Array<char const*>&, Array<char
const*>&) (/usr/bin/ldc2+0x6245a5)
#11 0x000000000082c102 cppmain() (/usr/bin/ldc2+0x82c102)
#12 0x00007f41f6b0f18c _D2rt6dmain212_d_run_main2UAAamPUQgZiZ6runAllMFZv
(/lib64/libdruntime-ldc-shared.so.97+0xde18c)
#13 0x00007f41f6b0efa5 _d_run_main2
(/lib64/libdruntime-ldc-shared.so.97+0xddfa5)
#14 0x00007f41f6b0edfe _d_run_main
(/lib64/libdruntime-ldc-shared.so.97+0xdddfe)
#15 0x00000000005240cd main (/usr/bin/ldc2+0x5240cd)
#16 0x00007f41f653d560 __libc_start_call_main (/lib64/libc.so.6+0x2d560)
#17 0x00007f41f653d60c __libc_start_main at GLIBC_2.2.5 (/lib64/libc.so.6+0x2d60c)
#18 0x0000000000526475 _start (/usr/bin/ldc2+0x526475)
/usr/bin/ldc2 failed with exit code -11.
=============================================================



the example code is here:
https://github.com/AnimusPEXUS/dtk/tree/cebcd5a7b3bd9000c6ddac2ed271883aa51d205b

- to build: cd example help and use dub for building. app successfully built
with simple 'dub build' is look like on screenshot

--


More information about the Digitalmars-d-bugs mailing list