www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 22470] New: Linker error: std.math.remainder.fmod

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

          Issue ID: 22470
           Summary: Linker error: std.math.remainder.fmod
           Product: D
           Version: D2
          Hardware: x86_64
                OS: FreeBSD
            Status: NEW
          Severity: regression
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: nsonack outlook.com

Might be a duplicate but it seems as if it works very much fine on Linux
but not anymore on FreeBSD (as tested during a short discussion on IRC) : 

nico hades:/tmp $ 
nico hades:/tmp $ cat -n foo.d
     1  import std.stdio;
     2  import std.math.remainder;
     3  
     4  int
     5  main()
     6  {
     7          float foo = fmod(3.14159, 69.42);
     8          return 0;
     9  }
nico hades:/tmp $ 
nico hades:/tmp $ diff -u foo.d bar.d 
--- foo.d       2021-11-02 15:00:48.501788000 +0100
+++ bar.d       2021-11-02 15:03:37.342617000 +0100
   -1,5 +1,5   
 import std.stdio;
-import std.math.remainder;
+import std.math;

 int
 main()
nico hades:/tmp $ 
nico hades:/tmp $ 
nico hades:/tmp $ which dmd
/usr/home/nico/.local/dmd2/freebsd/bin64//dmd
nico hades:/tmp $ 
nico hades:/tmp $ dmd --version
DMD64 D Compiler v2.098.0
Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved
written by Walter Bright
nico hades:/tmp $ 
nico hades:/tmp $ dmd -of=foo foo.d
nico hades:/tmp $ dmd -of=bar bar.d
ld: error: undefined symbol: _D3std4math4fmodFNbNiNeeeZe
 referenced by bar.d
               bar.o:(_Dmain)
cc: error: linker command failed with exit code 1 (use -v to see invocation) Error: linker exited with status 1 nico hades:/tmp $ nico hades:/tmp $ I removed a second system-wide installation of all dlang-related ports (ldc2) but I still get the same linker error. In case you need any other information or want me to test something, please feel free to tell me! --
Nov 02 2021