a mysterious linking error introduced by import a library

Iain Buclaw ibuclaw at gdcproject.org
Tue Oct 17 16:16:46 UTC 2023


On Saturday, 14 October 2023 at 19:28:59 UTC, Johann wrote:
> On Saturday, 14 October 2023 at 19:01:53 UTC, Iain Buclaw wrote:
>> On Saturday, 14 October 2023 at 17:53:01 UTC, Johann wrote:
>>> I cannot figure out this error is caused by `squiz_box` 
>>> libray, `gdc` or `dub`. My apologies to you if I should have 
>>> filed this bug in other places. Thanks for your attention.
>>
>> Based on the symbol names, it could be this PR, which was 
>> fixed as of gdc versions 13.2 and 12.3
>>
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108055
>
> Sorry somehow I forget to attach the version of `gdc` in the 
> post,
>
> ```bash
> gdc --version
> gdc (GCC) 13.2.1 20230918 (Red Hat 13.2.1-3)
>
> cat /etc/redhat-release
> Fedora release 39 (Thirty Nine)
> ```

Thanks.

One potential reduction seems to suggest gdc is emitting too 
much, rather than too little.

dmd 2.103.1
```
--- dmd -v
function  D main
function  app._d_cmain!().main
function  curl.get!().get
function  std.format.format!().format
function  std.format.formattedWrite!string.formattedWrite
function  
std.format.internal.write.formatValueImpl!int.formatValueImpl
--- nm app.o
W _Dmain
W main
W _D4curl__T3getZQfFNaNbAxaZv
W _D3std6format__TQkZQnFNaNbAyaQdZQg
W _D3std6format__T14formattedWriteTAyaZQvFNaNbQlZk
W _D3std6format8internal5write__T15formatValueImplTiZQuFNaNfxiZv
U _D3std6format8internal5write__T8getWidthTAyaZQoFNaNfQlZl
```


gdc 13.2
```
--- gdc -v
function  D main
function  app._d_cmain!().main
function  curl.get!().get
function  std.format.format!().format
function  std.format.formattedWrite!string.formattedWrite
function  
std.format.internal.write.formatValueImpl!int.formatValueImpl
function  std.format.internal.write.getWidth!string.getWidth
--- nm app.o
T _Dmain
T main
W _D4curl__T3getZQfFNaNbAxaZv
W _D3std6format__TQkZQnFNaNbAyaQdZQg
W _D3std6format__T14formattedWriteTAyaZQvFNaNbQlZk
W _D3std6format8internal5write__T15formatValueImplTiZQuFNaNfxiZv
W _D3std6format8internal5write__T8getWidthTAyaZQoFNaNfQlZl
U 
_D3std9algorithm9searching__T3allSQBg6format8internal5write__T8getWidthTAyaZQoFQhZ9__lambda2Z__TQCpTQBcZQCxMFNaNfQBpZb
```


More information about the D.gnu mailing list