#943338 ldc2 fails to find wasm-ld; lld doesn't provide symlink for wasm-ld

Package:
ldc
Source:
ldc
Description:
LLVM D Compiler
Submitter:
Witold Baryluk
Date:
2019-10-23 15:51:04 UTC
Severity:
normal
#943338#5
Date:
2019-10-23 15:46:21 UTC
From:
To:
Dear Maintainer,

$ ldc2 -mtriple=wasm32-unknown-unknown-wasm -betterC bzium.d
Error: failed to locate wasm-ld
$

I am sure it is possible to convince ldc2 (i.e. -linker=wasm-ld-8
parameter), but it should work out of the box.

It would be nice if ldc2 do know how to find wasm-ld out of the box.

wasm-ld-8 and wasm-ld-10 are in the PATH. wasm-ld isn't.


Also, on a side note, maybe ldc package should also Suggest ldd-8 ? (or
whichever llvm version it was build against). Right now it doesn't
Suggest or Recommend it.


Notice below that I do have package 'lld' installed, and it does provide
symlinks from /usr/bin/lld to lld-8, and from /usr/bin/ld.lld to ld.lld-8
as well proper Depends to make it always work correctly.

However it does miss one for /usr/bin/wasm-ld to wasm-ld-8

There are some extra binaries in the lld-8, which might need similar
treatment.



$ dpkg -l | egrep 'lld|ldc|llvm'
ii  ldc                                                         1:1.17.0-2                            amd64        LLVM D Compiler
ii  liblldb-8                                                   1:8.0.1-3+b1                          amd64        Next generation, high-performance debugger, library
ii  libllvm10:amd64                                             1:10~svn375339-1~exp1                 amd64        Modular compiler and toolchain technologies, runtime library
ii  libllvm10:i386                                              1:10~svn375339-1~exp1                 i386         Modular compiler and toolchain technologies, runtime library
ii  libllvm8:amd64                                              1:8.0.1-3+b1                          amd64        Modular compiler and toolchain technologies, runtime library
ii  libllvm8:i386                                               1:8.0.1-3+b1                          i386         Modular compiler and toolchain technologies, runtime library
ii  libllvm9:amd64                                              1:9-3                                 amd64        Modular compiler and toolchain technologies, runtime library
ii  libllvm9:i386                                               1:9-3                                 i386         Modular compiler and toolchain technologies, runtime library
ii  libllvmspirvlib8                                            8.0.1-1+b1                            amd64        bi-directional translator for LLVM/SPIRV -- shared library
ii  libphobos2-ldc-shared-dev                                   1:1.17.0-2                            amd64        LLVM D Compiler - Standard and runtime libraries, imports
ii  libphobos2-ldc-shared87:amd64                               1:1.17.0-2                            amd64        LLVM D Compiler - Standard and runtime libraries
ii  lld                                                         1:8.0-48.3                            amd64        LLVM-based linker
ii  lld-10                                                      1:10~svn375339-1~exp1                 amd64        LLVM-based linker
ii  lld-8                                                       1:8.0.1-3+b1                          amd64        LLVM-based linker
ii  lldb                                                        1:8.0-48.3                            amd64        Next generation, high-performance debugger
ii  lldb-8                                                      1:8.0.1-3+b1                          amd64        Next generation, high-performance debugger
ii  llvm-10                                                     1:10~svn375339-1~exp1                 amd64        Modular compiler and toolchain technologies
ii  llvm-10-dev                                                 1:10~svn375339-1~exp1                 amd64        Modular compiler and toolchain technologies, libraries and headers
ii  llvm-10-runtime                                             1:10~svn375339-1~exp1                 amd64        Modular compiler and toolchain technologies, IR interpreter
ii  llvm-10-tools                                               1:10~svn375339-1~exp1                 amd64        Modular compiler and toolchain technologies, tools
ii  llvm-8                                                      1:8.0.1-3+b1                          amd64        Modular compiler and toolchain technologies
ii  llvm-8-dev                                                  1:8.0.1-3+b1                          amd64        Modular compiler and toolchain technologies, libraries and headers
ii  llvm-8-runtime                                              1:8.0.1-3+b1                          amd64        Modular compiler and toolchain technologies, IR interpreter
ii  llvm-spirv                                                  8.0.1-1+b1                            amd64        bi-directional translator for LLVM/SPIRV
ii  python-lldb-8                                               1:8.0.1-3+b1                          amd64        Next generation, high-performance debugger, python lib
$


Feel free to reassign to lld bug tracker if needed.

Best regards,
Witold