Thread overview
[Issue 19123] -allinst gives undefined reference linker errors
Jul 27, 2018
Basile B.
Aug 06, 2018
Mike Franklin
Aug 06, 2018
Mike Franklin
Aug 07, 2018
Mike Franklin
Aug 08, 2018
Mike Franklin
Aug 15, 2018
Seb
Nov 11, 2019
GoaLitiuM
Mar 21, 2020
Basile-z
Dec 20, 2022
Iain Buclaw
July 27, 2018
https://issues.dlang.org/show_bug.cgi?id=19123

Basile B. <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |b2.temp@gmx.com
           Severity|normal                      |regression

--- Comment #1 from Basile B. <b2.temp@gmx.com> ---
actually it's a 2.080.0 regression.

--
August 06, 2018
https://issues.dlang.org/show_bug.cgi?id=19123

Mike Franklin <slavo5150@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |slavo5150@yahoo.com
          Component|dmd                         |phobos

--- Comment #2 from Mike Franklin <slavo5150@yahoo.com> ---
According to digger it was https://github.com/dlang/phobos/pull/6190 that caused this regression.

--
August 06, 2018
https://issues.dlang.org/show_bug.cgi?id=19123

Mike Franklin <slavo5150@yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|phobos                      |dmd

--- Comment #3 from Mike Franklin <slavo5150@yahoo.com> ---
(In reply to Mike Franklin from comment #2)
> According to digger it was https://github.com/dlang/phobos/pull/6190 that caused this regression.

...though it may have just revealed a bug in DMD.

--
August 07, 2018
https://issues.dlang.org/show_bug.cgi?id=19123

--- Comment #4 from Mike Franklin <slavo5150@yahoo.com> ---
I've narrowed this down somewhat.  What's happening is `-allinst` causes symbols to be emitted to the object file that otherwise wouldn't be.  Those symbols, however, call other symbols, and it's those other symbols that aren't being emitted for some reason, resulting in linker errors.

--
August 08, 2018
https://issues.dlang.org/show_bug.cgi?id=19123

--- Comment #5 from Mike Franklin <slavo5150@yahoo.com> ---
_D3std6format__T11hasToStringTSQBd8datetime7systime7SysTimeTaZ9__lambda2MFZ1S3putMFNaNbNiNfaZv

... demangles to...

pure nothrow @nogc @safe void
std.format.hasToString!(std.datetime.systime.SysTime,
char).__lambda2().S.put(char)

When logging semantic in the compiler, I don't see it in the AST either.

--
August 15, 2018
https://issues.dlang.org/show_bug.cgi?id=19123

Seb <greensunny12@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |greensunny12@gmail.com

--
November 11, 2019
https://issues.dlang.org/show_bug.cgi?id=19123

GoaLitiuM <goalitium@dissues.mail.kapsi.fi> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |goalitium@dissues.mail.kaps
                   |                            |i.fi

--- Comment #6 from GoaLitiuM <goalitium@dissues.mail.kapsi.fi> ---
I recently hit a bug similar to this one, if not the same one, with this following code:

import std.variant;
import std.typecons;

struct S {}
void main()
{
    alias T = Typedef!(S, S.init);
    Variant v = T();
}

> /dlang/dmd/linux/bin64/../../src/phobos/std/range/primitives.d:276: error: undefined reference to '_D3std6format__T11hasToStringTSQBd8typecons__T7TypedefTS9onlineapp1SVQoS0VAyanZQBhTaZ9__lambda1MFZQBg3putMFNaNbNiNfaZv'
> /dlang/dmd/linux/bin64/../../src/phobos/std/range/primitives.d:276: error: undefined reference to '_D3std6format__T11hasToStringTSQBd8typecons__T7TypedefTS9onlineapp1SVQoS0VAyanZQBhTaZ9__lambda1MFZQBg3putMFNaNbNiNfaZv'
> /dlang/dmd/linux/bin64/../../src/phobos/std/range/primitives.d:276: error: undefined reference to '_D3std6format__T11hasToStringTSQBd8typecons__T7TypedefTS9onlineapp1SVQoS0VAyanZQBhTaZ9__lambda1MFZQBg3putMFNaNbNiNfaZv'
> collect2: error: ld returned 1 exit status
> Error: linker exited with status 1

--
March 21, 2020
https://issues.dlang.org/show_bug.cgi?id=19123

Basile-z <b2.temp@gmx.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|b2.temp@gmx.com             |

--
December 20, 2022
https://issues.dlang.org/show_bug.cgi?id=19123

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |ibuclaw@gdcproject.org
         Resolution|---                         |FIXED

--- Comment #7 from Iain Buclaw <ibuclaw@gdcproject.org> ---
This has been fixed since originally reported.  Can't point at what might have fixed it, changes like the PR linked below likely helped though.

https://github.com/dlang/dmd/pull/13578

--