www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20279] New: druntime PR #2821 causes link error for


          Issue ID: 20279

                    Fiber-dependent code
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: regression
          Priority: P1
         Component: druntime
          Assignee: nobody puremagic.com
          Reporter: hsteoh quickfur.ath.cx

needs to link with Fiber routines like core.thread.Fiber.yield:

Sample code:
import core.thread : Fiber;
void main() {
        auto f = new Fiber(() {


Compiler output:
/usr/bin/ld: test.o: in function `_Dmain':
test.d:(.text._Dmain[_Dmain]+0xb): undefined reference to
/usr/bin/ld: test.d:(.text._Dmain[_Dmain]+0x1e): undefined reference to
/usr/bin/ld: test.d:(.text._Dmain[_Dmain]+0x35): undefined reference to
/usr/bin/ld: test.o: in function `_D4test4mainFZ9__lambda1FNbNiZv':
undefined reference to `_D4core6thread5fiber5Fiber5yieldFNbNiZv'
collect2: error: ld returned 1 exit status
Error: linker exited with status 1

Reverting to druntime commit 44d25a123616bd7f9332d67a28153286a5442f91 (the one

Oct 07 2019