gdc-8 lang fails on link

Asked by Aleksandr on 2020-04-06

Issue:
gdc-8 lang fails on link after installing g++. gdc-7 & gdc-9 work as expected.

Environment:
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description: Ubuntu 18.04.4 LTS
    Release: 18.04
    Codename: bionic

Steps to reproduce:

# Install g++
add-apt-repository ppa:ubuntu-toolchain-r/test -y
apt-get update -y

apt-get -y install "g++-7"
apt-get -y install "g++-8"
apt-get -y install "g++-9"

# Install gdc-8
apt-get -y install gdc-8

# Simple program

cat >simple.d <<EOF
 import std.stdio : stdin, writeln;

 void simple(int n, int otherNumber)
 {
  writeln(n);
  writeln(otherNumber);
 }

 void main()
 {
  int n;
  stdin.readf("%d\n", &n);
  int otherNumber;
  stdin.readf("%d\n", &otherNumber);

  simple(n, otherNumber);
 }
EOF

gdc-8 simple.d

Error:
/tmp/ccQm5EYZ.o: In function `_Dmain':
simple.d:(.text+0x66): undefined reference to `_D3std5stdio23__T10makeGlobalS5stdinZ10makeGlobalFNbNcNdNiZS3std5stdio4File'
simple.d:(.text+0xa0): undefined reference to `_D3std5stdio23__T10makeGlobalS5stdinZ10makeGlobalFNbNcNdNiZS3std5stdio4File'

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu gcc-8 Edit question
Assignee:
No assignee Edit question
Last query:
2020-04-06
Last reply:
2020-04-07

If you are using a PPA you may want to contact the PPA maintainer if there are issues with the packages from that source causing issues

Manfred Hampl (m-hampl) said : #2

This seems to be the problem that is discussed in https://github.com/actions/virtual-environments/issues/528

Can you help with this problem?

Provide an answer of your own, or ask Aleksandr for more information if necessary.

To post a message you must log in.