void-linux / void-linux/void-packages

Installing package dmd clobbers the functionality of package gcc-gdc

Open
#62,463 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
3.4k
Forks
2.8k
Avg merge
2d 5h
Merged PRs (30d)
299

Description

An existing installation of package gcc-gdc, the GNU D compiler gdc, malfunctions as specified below if the package dmd, the Digital Mars D compiler is subsequently installed.

Both compilers rely upon source includes for template instantiation. When dmd is installed, it places these in /usr/include/d/ whereas gdc has them placed in a gcc-gdc specific location. However, once dmd's include files are installed, gdc finds that location by default and uses it in place of its own.

This would not be a problem, excepting that the versions of D are not the same for dmd as gdc, the last following the latest gcc version from Void. So dmd has D version 2.113 whereas gdc has 2.108 at the time of writing.

This mismatch leads to linkage errors using gdc due unsatisfied dependencies at the time of writing. On the other hand dmd is fine, as it is unaware of the gdc installation.

The offending dmd include files in /usr/include/d/ are attributed to the package libphobos-2 that an installation of dmd also installs, (phobos being the D language standard library). A naive removal of the dmd package leaves libphobos-2 still installed, including its problematic include files.

Note1
The binary libraries of the two compilers do not interact as they even have different names.

Note2
It is not unusual to install both compilers, as dmd can be used to translate C header files into D which gdc currently does not.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by inspecting the package definitions and ownership for dmd, libphobos-2, and gcc-gdc, focusing on /usr/include/d/ and the compiler-specific include location. Reproduce installing gcc-gdc followed by dmd, then removing dmd; the issue is done when both compilers retain their intended includes and gdc no longer resolves dmd's incompatible files.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.