CyberShadow/btdu

Can't compile properly from source on Linux Mint Cinnamon

esp13 opened this issue · 2 comments

esp13 commented

Hi,

I'm a total newbie so maybe I do something wrong.

I can't successfully compile from source I get this error when building :

sudo apt install dub
dub build -b release
Performing "release" build using /usr/bin/gdc for x86_64.
Build directory ../../.dub/packages/emsi_containers-0.9.0/emsi_containers/.dub/build/library-release-linux.posix-x86_64-gdc_2068-E53B02A4D0A6D2BC0039752B2E02A84F/ is not writable. Falling back to direct build in the system's temp folder.
emsi_containers 0.9.0: building configuration "library"...
../../.dub/packages/emsi_containers-0.9.0/emsi_containers/src/containers/dynamicarray.d:10:16: error: module lifetime is in file 'core/lifetime.d' which cannot be read
 private import core.lifetime : move, moveEmplace, copyEmplace, emplace;
                ^
import path[0] = /usr/lib/gcc/x86_64-linux-gnu/8/include/d
import path[1] = /home/zzz/.dub/packages/emsi_containers-0.9.0/emsi_containers/src
/usr/bin/gdc failed with exit code 1.

edit:
lsb_release -a

No LSB modules are available.
Distributor ID:	LinuxMint
Description:	Linux Mint 19.2 Tina
Release:	19.2
Codename:	tina

I tried to install dmd from https://s3.us-west-2.amazonaws.com/downloads.dlang.org/releases/2021/dmd_2.098.1-0_amd64.deb but I just realize that it failed :

Preparing to unpack .../dmd_2.098.1-0_amd64.deb ...
Unpacking dmd (2.098.1-0) ...
dpkg: error processing archive /tmp/mozilla_zzz0/dmd_2.098.1-0_amd64.deb (--install):
 trying to overwrite '/usr/bin/dub', which is also in package dub 1.8.0-2
dpkg-deb (subprocess): decompressing archive member: lzma write error: Broken pipe
dpkg-deb (subprocess): cannot copy archive member from '/tmp/mozilla_zzz0/dmd_2.098.1-0_amd64.deb' to decompressor pipe: failed to write (Broken pipe)
dpkg-deb: error: <decompress> subprocess returned error exit status 2
Processing triggers for libc-bin (2.27-3ubuntu1.4) ...

Maybe it comes from here

edit2 :

As asked I tried to remove dub and give an other try with dmd this worked.
Then I tried reinstall dub:

sudo apt install dub

Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances       
Lecture des informations d'état... Fait
Les NOUVEAUX paquets suivants seront installés :
  dub
0 mis à jour, 1 nouvellement installés, 0 à enlever et 29 non mis à jour.
Il est nécessaire de prendre 1 443 ko dans les archives.
Après cette opération, 5 903 ko d'espace disque supplémentaires seront utilisés.
Réception de :1 http://archive.ubuntu.com/ubuntu bionic/universe amd64 dub amd64 1.8.0-2 [1 443 kB]
1 443 ko réceptionnés en 2s (722 ko/s)
Sélection du paquet dub précédemment désélectionné.
(Lecture de la base de données... 551483 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../archives/dub_1.8.0-2_amd64.deb ...
Dépaquetage de dub (1.8.0-2) ...
dpkg: erreur de traitement de l'archive /var/cache/apt/archives/dub_1.8.0-2_amd64.deb (--unpack) :
 tentative de remplacement de « /usr/bin/dub », qui appartient aussi au paquet dmd 2.098.1-0
dpkg-deb: erreur: coller subprocess was killed by signal (Relais brisé (pipe))
Des erreurs ont été rencontrées pendant l'exécution :
 /var/cache/apt/archives/dub_1.8.0-2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

edit3 :

As it was written on the doc, install dub if needed (but it already was with dmd) so let's compile again:

dub build -b release
Performing "release" build using /usr/bin/dmd for x86_64.
emsi_containers 0.9.0: building configuration "library"...
ncurses 0.0.149: building configuration "minimal"...
../../.dub/packages/ncurses-0.0.149/ncurses/source/deimos/ncurses/curses.d(1486,1): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
btdu ~master: building configuration "application"...
../../.dub/packages/ncurses-0.0.149/ncurses/source/deimos/ncurses/curses.d(1486,1): Deprecation: Usage of the `body` keyword is deprecated. Use `do` instead.
Linking...
/usr/bin/ld : ne peut trouver -lncursesw
collect2: error: ld returned 1 exit status
Error: linker exited with status 1
/usr/bin/dmd failed with exit code 1.

edit4 :

libncursesw5-dev was missing, so :

sudo apt install libncursesw5-dev

And now it's compiling, thank you for your help :)

Could you please mention

  • your distribution version? (maybe the output of lsb_release -a)
  • how you installed a D compiler / Dub?

Thank you kindly for this feedback, it allowed improving the documentation:
889b4b5...793c9b4