Failed to compile on Ubuntu 18.04.6
tidre opened this issue · comments
Hi,
I'm trying to compile zrenderer on Ubuntu 18.04.6 but I'm having trouble trying to do it.
Follow some informations:
OS
Ubuntu LTS 18.04.6
DUB
DUB version 1.8.0-2, built on Mar 27 2018
LDC / LDC2
LDC - the LLVM D compiler (1.8.0): based on DMD v2.078.3 and LLVM 5.0.1
OpenSSL
OpenSSL 1.1.1 11 Sep 2018
Command Line
sudo dub build --compiler=ldc2 --build=release :server
Hi @tidre unfortunately ubuntu 18 uses a too old version of dub and ldc.
I recommend downloading a newer version directly from the ldc release page: https://github.com/ldc-developers/ldc/releases
Assuming you're running x64 linux you would need to download something like ldc2-1.32.2-linux-x86_64.tar.xz
.
In the provided archive you will find all the tools required under the bin
directory.
If you run dub
from that archive I believe you will have to add the ldc2
executable to your PATH
environment variable so that it can be picked it. For that to work you'll probably also need to uninstall your current dub and ldc2 which you got from the package manager.
Sorry for all the trouble but the D language and its tooling is sadly not very backwards compatible.
Hi @zhad3,
Thank you for your help.
After updating ldc and dub my versions are:
- LDC (1.24.0)
- DUB (1.19.0)
Unfortunately I cannot reproduce your issue.
I have these versions:
$ dub --version
DUB version 1.29.0, built on
$ ldc2 --version
LDC - the LLVM D compiler (1.32.0):
based on DMD v2.102.2 and LLVM 15.0.7
built with LDC - the LLVM D compiler (1.32.0)
Default target: x86_64-suse-linux
Host CPU: haswell
http://dlang.org - http://wiki.dlang.org/LDC
Just to make sure I have compiled the project with the Docker image using the latest alpine image which also has ldc2 version 1.32.0. In there are also no errors (just deprecation warnings).
From your logs I can see that you're using a 'snap' version of ldc. I haven't used snaps myself, so I am not sure if that could be a problem.
Another option you could try is to use the install script
from D. Make sure to uninstall any ldc2, dmd, dub and whatnot packages. Then run the following command: curl -fsS https://dlang.org/install.sh | bash -s ldc
(from https://github.com/ldc-developers/ldc#installation). And follow the instruction. It should say how to activate the environment to use ldc.
I was having issues compiling. curl -fsS https://dlang.org/install.sh | bash -s ldc
allowed me to compile successfully