www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - std.math not installed with WSL (debian) apt install ldc

reply Jonathan <daemon512 gmail.com> writes:
Hello,
    I'm trying to test out a program I wrote on a new computer 
with a fresh install of WSL.  Part of the idea of doing this is 
to add installation instructions for people who don't have 
Phobos.  I've gone through what I expected to be the proper 
install procedure:

```
sudo apt install ldc
sudo apt install dub
// copied and entered the project directory
dub build
```

But on the last call, I get an error:
```
Error: module algebraic is in file 'std/math/algebraic.d' which 
cannot be read
```

On inspection, the std/math folder isn't present, but there is an 
std/math.d - I suspect there are other files/folders typically in 
the Phobos standard library that aren't present as well.

Have I done something wrong with the install?  The Phobos readme 
says I should install it with the compiler, so I'm doubting I 
should install it separately.



Here is the info from ```apt show ldc```:

```
Package: ldc
Version: 1:1.24.0-2
Priority: optional
Section: devel
Maintainer: Debian D Language Group 
<team+d-team tracker.debian.org>
Installed-Size: 22.8 MB
Provides: d-compiler, d-v2-compiler
Depends: libphobos2-ldc-shared-dev (= 1:1.24.0-2), libc6 (>= 
2.17), libgcc-s1 (>= 4.2), libllvm11 (>= 1:9~svn298832-1~), 
libstdc++6 (>= 9), zlib1g (>= 1:1.2.0)
Homepage: https://github.com/ldc-developers/ldc
Tag: devel::TODO, devel::compiler, role::program
Download-Size: 4,090 kB
APT-Manual-Installed: yes
APT-Sources: http://deb.debian.org/debian bullseye/main amd64 
Packages
Description: LLVM D Compiler
  LDC is a portable compiler for the D programming language with 
modern
  optimization and code generation capabilities.
  .
  It uses the official DMD compiler frontend to support the latest 
version
  of D, and relies on the LLVM Core libraries for code generation.
```

Have I installed LDC improperly, or is there another step I 
should take to install (the rest of) Phobos properly?
Oct 11
parent ryuukk_ <ryuukk.dev gmail.com> writes:
ldc 1.24 is 4 years old


debian stable has: 1.30.0


so sounds like you are using an ancient version of debian, upgrade
Oct 11