dlang-community / D-YAML

YAML parser and emitter for the D programming language
https://dlang-community.github.io/D-YAML/
Boost Software License 1.0
119 stars 37 forks source link

ldc doesn't quite work with dyaml shared object #136

Closed russel closed 6 years ago

russel commented 6 years ago

Anyone know how to solve this one?

ldc2 -I=. -Jsource/resources -J. -I/usr/include/d/gtkd-3/ -I/home/users/russel/Built/include/d -I/home/users/russel/Built/include/d/yaml -I/home/users/russel/Built/include/d -g -of=me-tv -L-L/usr/lib/x86_64-linux-gnu/ -L-lgtkd-3 -L-ldl -L-L/home/users/russel/Built/lib -L-ldinotify -L-L/home/users/russel/Built/lib -L-ldyaml source/about.d source/channel_names.d source/configuration.d source/control_window.d source/frontend_manager.d source/frontend_window.d source/inotify_daemon.d source/main.d source/preference_dialog.d source/preferences.d
/home/users/russel/Built/lib/libdyaml.so: undefined reference to `_D3std4conv__T7toCharsVii10TaVEQBd5ascii10LetterCasei1TmZQBrFNaNbNiNfmZ6Result5emptyMFNaNbNdNiNfZb'
/home/users/russel/Built/lib/libdyaml.so: undefined reference to `_D3std4conv__T7toCharsVii10TaVEQBd5ascii10LetterCasei1TmZQBrFNaNbNiNfmZ6Result8popFrontMFNaNbNiNfZv'
/home/users/russel/Built/lib/libdyaml.so: undefined reference to `_D3std4conv__T7toCharsVii10TaVEQBd5ascii10LetterCasei1TmZQBrFNaNbNiNfmZSQCsQCr__TQCpVii10TaVQCki1TmZQDiFNaNbNiNfmZ6Result'
/home/users/russel/Built/lib/libdyaml.so: undefined reference to `_D3std4conv__T7toCharsVii10TaVEQBd5ascii10LetterCasei1TmZQBrFNaNbNiNfmZ6Result6lengthMFNaNbNdNiNfZm'
/home/users/russel/Built/lib/libdyaml.so: undefined reference to `_D3std4conv__T7toCharsVii10TaVEQBd5ascii10LetterCasei1TmZQBrFNaNbNiNfmZ6Result5frontMFNaNbNdNiNfZa'
ghost commented 6 years ago

The linker messages you get strangely look like those i have in an unrelated D project. I suspect a compiler or maybe phobos bug, it cant be randomly the same symbols: mine are

dictionnary_suffixarray.d:(.text._D3std4conv__T8textImplTAyaTQeTQhTQkTQnTkZQBcFNaNbNfQBcQBfQBiQBlkZQBq[_D3std4conv__T8textImplTAyaTQeTQhTQkTQnTkZQBcFNaNbNfQBcQBfQBiQBlkZQBq]+0x151) : référence indéfinie vers « _D3std4conv__T7toCharsVii10TaVEQBd5ascii10LetterCasei1TkZQBrFNaNbNiNfkZSQCsQCr__TQCpVii10TaVQCki1TkZQDiFNaNbNiNfkZ6Result »
dictionnary_suffixarray.d:(.text._D3std4conv__T8textImplTAyaTQeTQhTQkTQnTkZQBcFNaNbNfQBcQBfQBiQBlkZQBq[_D3std4conv__T8textImplTAyaTQeTQhTQkTQnTkZQBcFNaNbNfQBcQBfQBiQBlkZQBq]+0x16d) : référence indéfinie vers « _D3std4conv__T7toCharsVii10TaVEQBd5ascii10LetterCasei1TkZQBrFNaNbNiNfkZ6Result5emptyMFNaNbNdNiNfZb »
dictionnary_suffixarray.d:(.text._D3std4conv__T8textImplTAyaTQeTQhTQkTQnTkZQBcFNaNbNfQBcQBfQBiQBlkZQBq[_D3std4conv__T8textImplTAyaTQeTQhTQkTQnTkZQBcFNaNbNfQBcQBfQBiQBlkZQBq]+0x184) : référence indéfinie vers « _D3std4conv__T7toCharsVii10TaVEQBd5ascii10LetterCasei1TkZQBrFNaNbNiNfkZ6Result5frontMFNaNbNdNiNfZa »
dictionnary_suffixarray.d:(.text._D3std4conv__T8textImplTAyaTQeTQhTQkTQnTkZQBcFNaNbNfQBcQBfQBiQBlkZQBq[_D3std4conv__T8textImplTAyaTQeTQhTQkTQnTkZQBcFNaNbNfQBcQBfQBiQBlkZQBq]+0x1c5) : référence indéfinie vers « _D3std4conv__T7toCharsVii10TaVEQBd5ascii10LetterCasei1TkZQBrFNaNbNiNfkZ6Result8popFrontMFNaNbNiNfZv »

as you can see the template instance is different but it's the same template.

ghost commented 6 years ago

So i'm gonna close this because this is not a D-YAML bug.

If it's the same bug then when using the LDC based on latest 2.074.x front-end you should see the problem disappear.

russel commented 6 years ago
|> ldc2 -v
binary    /usr/bin/ldc2
version   1.8.0 (DMD v2.078.3, LLVM 5.0.2)
config    /etc/ldc2.conf (x86_64-pc-linux-gnu)
OVERVIEW: LDC - the LLVM D compiler
ghost commented 6 years ago

Can you try with this one https://github.com/ldc-developers/ldc/releases/tag/v1.4.0 ?

russel commented 6 years ago

Probably not as the Debian package is at 1.8.0.

ghost commented 6 years ago

Maybe someone will have a workaround after all, but it's certainly the same issue.

russel commented 6 years ago

I'll raise it on the LDC list, to see if there is some insight to be had there.

ghost commented 6 years ago

I close. Now it's sure that it's a compiler front-end issue. With DMD the "-allinst" option works as workaround, if LDC has an equivalent option try it.