Tilix: Building fails on Ubuntu 16.04

Created on 11 Apr 2016  路  20Comments  路  Source: gnunn1/tilix

I get the following when trying to build terminix on ubuntu 16.04..

any hints?

~/build/terminix$ dub build --build=release
Performing "release" build using gdc for x86_64.
gtk-d:gtkd 3.3.1: target for configuration "library" is up to date.
gtk-d:gstreamer 3.3.1: target for configuration "library" is up to date.
gtk-d:gtkdgl 3.3.1: target for configuration "library" is up to date.
gtk-d:sv 3.3.1: target for configuration "library" is up to date.
gtk-d:vte 3.3.1: target for configuration "library" is up to date.
terminix ~master: building configuration "default"...
source/app.d:7:8: error: module logger is in file 'std/experimental/logger.d' which cannot be read
 import std.experimental.logger;
        ^
import path[0] = /usr/lib/gcc/x86_64-linux-gnu/5/include/d
import path[1] = /home/giray/build/terminix/source
import path[2] = /home/giray/.dub/packages/gtk-d-3.3.1/srcgstreamer
import path[3] = /home/giray/.dub/packages/gtk-d-3.3.1/src
import path[4] = /home/giray/.dub/packages/gtk-d-3.3.1/srcgl
import path[5] = /home/giray/.dub/packages/gtk-d-3.3.1/srcsv
import path[6] = /home/giray/.dub/packages/gtk-d-3.3.1/srcvte
gdc failed with exit code 1.
enhancement question wontfix

Most helpful comment

I can confirm installing http://downloads.dlang.org/releases/2.x/2.071.0/dmd_2.071.0-0_amd64.deb
resolves the issue on Ubuntu 16.04 ...

pls append information in README or Build instructions

All 20 comments

Hmm, The package is part of the standard phobos which should be installed with dmd. How did you install the D tools on ubuntu, via a package?

If you run dub build I assume you get the same error?

Also, what do you see if you run this command:

ls /usr/lib/gcc/x86_64-linux-gnu/5/include/d

I just did an apt install dub

~/bin/usr/bin$ ls /usr/lib/gcc/x86_64-linux-gnu/5/include/d
core  __entrypoint.di  etc  gcc  object.di  std

and I do get the same error with dub build

Did you get dub from a PPA because when I try to install it I get an error that it cannot locate the package,

dub is in the repos. Same issue with std.experimental.logger

apt show dub:

Package: dub                      
State: installed
Automatically installed: no
Version: 0.9.24-1ubuntu1
Priority: optional
Section: universe/devel
Maintainer: Ubuntu Developers <[email protected]>
Architecture: amd64
Uncompressed Size: 4,597 k
Depends: gdc | ldc, libc6 (>= 2.14), libcurl3-gnutls (>= 7.18.0), libgcc1 (>= 1:4.2), zlib1g (>= 1:1.2.0)
Conflicts: dub:i386
Description: Package and build management system for D
 DUB is a build tool for D projects with support for automatically retrieving dependencies and integrating them in the
 build process. 

 The design emphasis is on maximum simplicity for simple projects, while providing the opportunity to customize things
 when needed.
Homepage: http://code.dlang.org/

also installs:

 gdc gdc-5 libphobos-5-dev libphobos-dev zlib1g-dev

dub was available via standard ubuntu xenial/universe amd64 Packages

~/build/terminix$ apt show dub
Package: dub
Version: 0.9.24-1ubuntu1
Priority: optional
Section: universe/devel
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Matthias Klumpp <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 4,597 kB
Depends: gdc | ldc, libc6 (>= 2.14), libcurl3-gnutls (>= 7.18.0), libgcc1 (>= 1:4.2), zlib1g (>= 1:1.2.0)
Homepage: http://code.dlang.org/
Download-Size: 1,059 kB
APT-Manual-Installed: yes
APT-Sources: http://nl.archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
Description: Package and build management system for D
 DUB is a build tool for D projects with support for automatically
 retrieving dependencies and integrating them in the build process.
 .
 The design emphasis is on maximum simplicity for simple projects, while
 providing the opportunity to customize things when needed.

~/build/terminix$ dpkg -l | egrep "gdc|libphobos|zlib1g"
ii  gdc                                         4:5.3.1-1ubuntu1                           amd64        D compiler (language version 2), based on the GCC backend
ii  gdc-5                                       5.3.1-13ubuntu6                            amd64        GNU D compiler (version 2)
ii  libphobos-5-dev                             5.3.1-13ubuntu6                            amd64        Phobos D standard library
ii  libphobos-dev                               5.3.1-1ubuntu1                             amd64        Phobos D standard library
ii  zlib1g:amd64                                1:1.2.8.dfsg-2ubuntu4                      amd64        compression library - runtime
ii  zlib1g-dev:amd64                            1:1.2.8.dfsg-2ubuntu4                      amd64        compression library - development

Thanks for the info, I am at a client so a firewall may be causing me issues with apt. It doesn't help I'm not an Ubuntu user so apt isn't something I deal with often.

Anyway, one thing interesting with that package is that it looks like maybe it is using the gdc compiler instead of dmd. One of the weird thing about D is that there are three different compilers available, DMD, GDC and LDC as per this page here (https://dlang.org/download.html). DMD is the one that is the most up to date whereas GDC and LDC trail in terms of being up to date with features but can produce most optimized executables versus DMD.

Since I'm not overly concerned about optimization for a GUI, I only use DMD for compiling and haven't done any testing with GDC or LDC produced executables. Anyway, to confirm if you run dmd --version from the command line do you get anything?

dmd --version
No command 'dmd' found, did you mean:
 Command 'dcmd' from package 'devscripts' (main)
 Command 'dma' from package 'dma' (universe)
 Command 'wmd' from package 'wml' (universe)
 Command 'dd' from package 'coreutils' (main)
 Command 'amd' from package 'am-utils' (universe)
 Command 'mmd' from package 'mtools' (main)
 Command 'ddd' from package 'ddd' (universe)
 Command 'dbd' from package 'netatalk' (universe)
 Command 'wdmd' from package 'sanlock' (universe)
dmd: command not found

OK thanks, I just tried it with GDC and I can reproduce the error on Arch:

聽gnunn聽顐奥爚聽顐甭燚evelopment聽顐甭燿lang聽顐甭爐erminix聽顐奥燿ub --compiler=gdc
Performing "debug" build using gdc for x86_64.
gtk-d:gtkd 3.3.1: building configuration "library"...
gtk-d:gstreamer 3.3.1: building configuration "library"...
gtk-d:gtkdgl 3.3.1: building configuration "library"...
gtk-d:sv 3.3.1: building configuration "library"...
gtk-d:vte 3.3.1: building configuration "library"...
terminix ~master: building configuration "default"...
source/app.d:7:8: error: module logger is in file 'std/experimental/logger.d' which cannot be read
 import std.experimental.logger;
        ^
import path[0] = /usr/include/dlang/gdc
import path[1] = /home/gnunn/Development/dlang/terminix/source
import path[2] = /home/gnunn/.dub/packages/gtk-d-3.3.1/srcgstreamer
import path[3] = /home/gnunn/.dub/packages/gtk-d-3.3.1/src
import path[4] = /home/gnunn/.dub/packages/gtk-d-3.3.1/srcgl
import path[5] = /home/gnunn/.dub/packages/gtk-d-3.3.1/srcsv
import path[6] = /home/gnunn/.dub/packages/gtk-d-3.3.1/srcvte
gdc failed with exit code 1.

OK, looks ike GDC doesn't include the Phobos experimental packages hence the issue:

https://github.com/d-gamedev-team/gfm/issues/124

To get this to work would require some reworking of code to move the logger into a separate module so it can be easily removed with a static if in one spot. Does Ubuntu have a package for dmd?

Does Ubuntu have a package for dmd?

Not in the core repos but you can download a deb from http://dlang.org/download.html - That's how I've been building Terminix on 16.04.

Thanks @alexwhitman, I'll look into centralizing the logger functionality into a single module and controlling it with a static if.

So I had a look at this, because GDC is behind DMD there are other issues as well, for example the format function changed modules. As a result, I'm not going to fix this so Terminix can build under GDC and DMD, it would be a constant game of adding conditionals to workaround things that DMD adds but GDC has not yet caught up to.

My suggestion is to ask the maintainer of that dub package in Ubuntu to add dmd as well as gdc to the package.

I can confirm installing http://downloads.dlang.org/releases/2.x/2.071.0/dmd_2.071.0-0_amd64.deb
resolves the issue on Ubuntu 16.04 ...

pls append information in README or Build instructions

Also trying to build tilix on Ubuntu 1604. install dmd failed:

sudo dpkg -i ~/Downloads/dmd_2.084.0-0_amd64.deb                                                                                                                               
(Reading database ... 320839 files and directories currently installed.)
Preparing to unpack .../dmd_2.084.0-0_amd64.deb ...
Unpacking dmd (2.084.0-0) over (2.084.0-0) ...
dpkg: error processing archive /home/joeg/Downloads/dmd_2.084.0-0_amd64.deb (--install):
 trying to overwrite '/usr/bin/dub', which is also in package dub 0.9.24-2
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
 /home/joeg/Downloads/dmd_2.084.0-0_amd64.deb

However, using the install script for dmd worked:

curl -fsS https://dlang.org/install.sh | bash -s dmd
source ~/dlang/dmd-2.084.0/activate

dub build also worked:

dub build --build=release

But, install still failed:

sudo ./install.sh
Your system is missing command gtk-update-icon-cache, please install gtk-update-icon-cache
sudo apt install gtk-update-icon-cache
E: Unable to locate package gtk-update-icon-cache

Well, gave up.

Also trying to build tilix on Ubuntu 1604. install dmd failed:

sudo dpkg -i ~/Downloads/dmd_2.084.0-0_amd64.deb                                                                                                                               
(Reading database ... 320839 files and directories currently installed.)
Preparing to unpack .../dmd_2.084.0-0_amd64.deb ...
Unpacking dmd (2.084.0-0) over (2.084.0-0) ...
dpkg: error processing archive /home/joeg/Downloads/dmd_2.084.0-0_amd64.deb (--install):
 trying to overwrite '/usr/bin/dub', which is also in package dub 0.9.24-2
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Processing triggers for desktop-file-utils (0.22-1ubuntu5.2) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20180209-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1.1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Errors were encountered while processing:
 /home/joeg/Downloads/dmd_2.084.0-0_amd64.deb

This is because you already have dub installed by the dub package and the dmd_2.084.0-0_amd64.deb is trying to override the dub file located in /usr/bin/dub
For fix this, just remove the dub package via apt

However, using the install script for dmd worked:

curl -fsS https://dlang.org/install.sh | bash -s dmd
source ~/dlang/dmd-2.084.0/activate

dub build also worked:

dub build --build=release

But, install still failed:

sudo ./install.sh
Your system is missing command gtk-update-icon-cache, please install gtk-update-icon-cache
sudo apt install gtk-update-icon-cache
E: Unable to locate package gtk-update-icon-cache

Well, gave up.

Just install the specified package gtk-update-icon-cache
sudo apt install gtk-update-icon-cache

@gnunn1 thank you, I did, and failed.
I was also looking for alternative to iTerm2 on Linux, tilix is the closest thing I found so far. Good job!

I get this error:

Performing "release" build using dmd for x86_64.
dub 1.13.0+commit.21.g927c5e6: building configuration "application"...
Serializing composite type BuildRequirements which has no serializable fields
Serializing composite type BuildOptions which has no serializable fields
Linking...
/usr/bin/ld: cannot find -lcurl
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
dmd failed with exit code 1.

Any ideas? curl is installed. I don't know how to pass -lcurl to the linker.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

huti26 picture huti26  路  3Comments

honze-net picture honze-net  路  3Comments

gregflynn picture gregflynn  路  4Comments

milisarge picture milisarge  路  3Comments

iax7 picture iax7  路  4Comments