www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22491] New: Multiple building issues using dmd or ldc2 on new

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 puremagic.com
          Reporter: animuspexus 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.


----------

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:

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

(/usr/lib64/llvm12/lib/libLLVM-12.so+0xc001b6)

(/usr/lib64/llvm12/lib/libLLVM-12.so+0xbfe0a4)



(/usr/bin/ldc2+0x5d392e)

(/usr/bin/ldc2+0x53d8cf)

(/usr/bin/ldc2+0x541eba)

(/usr/bin/ldc2+0x53b6ec)

(/usr/bin/ldc2+0x53bc42)

SemanticTimeTraceVisitor<Semantic3Visitor*>::visit(Module*)
(/usr/bin/ldc2+0x53bb0a)

const*>&) (/usr/bin/ldc2+0x6245a5)


(/lib64/libdruntime-ldc-shared.so.97+0xde18c)

(/lib64/libdruntime-ldc-shared.so.97+0xddfa5)

(/lib64/libdruntime-ldc-shared.so.97+0xdddfe)




ldc2 failed with exit code -11.
=============================================================




----------

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

(/usr/lib64/llvm12/lib/libLLVM-12.so+0xc001b6)

(/usr/lib64/llvm12/lib/libLLVM-12.so+0xbfe0a4)



(/usr/bin/ldc2+0x5d392e)

(/usr/bin/ldc2+0x53d8cf)

(/usr/bin/ldc2+0x541eba)

(/usr/bin/ldc2+0x53b6ec)

(/usr/bin/ldc2+0x53bc42)

SemanticTimeTraceVisitor<Semantic3Visitor*>::visit(Module*)
(/usr/bin/ldc2+0x53bb0a)

const*>&) (/usr/bin/ldc2+0x6245a5)


(/lib64/libdruntime-ldc-shared.so.97+0xde18c)

(/lib64/libdruntime-ldc-shared.so.97+0xddfa5)

(/lib64/libdruntime-ldc-shared.so.97+0xdddfe)




/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

--
Nov 07 2021