March 25, 2018
On Sat, 2018-03-24 at 21:34 +0000, David Nadlinger via digitalmars-d-ldc wrote:
> […]


> $ . ~/dlang/ldc-1.8.0/activate
> $ cat > test.d
> void foo() {}
> ^D
> $ cat > main.d
> import test;
> void main() {
>    foo();
> }
> ^D
> $ ldmd2 -fPIC -g -shared test.d
> $ ldmd2 main.d -g -L-ltest -L-L. -L-R.
> $ ./main
> Aborting from rt/sections_elf_shared.d(477) Only one D shared
> object allowed for static runtime. Link with shared runtime via
> LDC switch '-link-defaultlib-shared'.
> Aborted (core dumped)
> $ ldmd2 main.d -g -L-ltest -L-L. -L-R. -link-defaultlib-shared
> $ ./main

I created test.d and main.d and then on Debian Sid:

|> ldmd2 -fPIC -g -shared test.d
|> ldmd2 main.d -g -L-ltest -L-L. -L-R.
|> ./main
|> ldmd2 main.d -g -L-ltest -L-L. -L-R. -link-defaultlib-shared
|> ./main
|>

>   — David
-- 
Russel.
==========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk


March 25, 2018
Hi Russel,

On 25 Mar 2018, at 15:38, Russel Winder via digitalmars-d-ldc wrote:
> I created test.d and main.d and then on Debian Sid:
>
> |> ldmd2 -fPIC -g -shared test.d
> |> ldmd2 main.d -g -L-ltest -L-L. -L-R.
> |> ./main
> |> ldmd2 main.d -g -L-ltest -L-L. -L-R. -link-defaultlib-shared
> |> ./main
> |>

I assume this is meant to say that both programs abort?

Which `ldc2 --version` are you using?

Best,
David

March 26, 2018
On Sun, 2018-03-25 at 23:35 +0100, David Nadlinger via digitalmars-d-ldc wrote:
> Hi Russel,
> 
> On 25 Mar 2018, at 15:38, Russel Winder via digitalmars-d-ldc wrote:
> > I created test.d and main.d and then on Debian Sid:
> > 
> > > > ldmd2 -fPIC -g -shared test.d
> > > > ldmd2 main.d -g -L-ltest -L-L. -L-R.
> > > > ./main
> > > > ldmd2 main.d -g -L-ltest -L-L. -L-R. -link-defaultlib-shared
> > > > ./main
> > > > 
> 
> I assume this is meant to say that both programs abort?

In fact the opposite, neither executions seem to have aborted, unless it aborted without a message.

> Which `ldc2 --version` are you using?

|> ldc2 --version
LDC - the LLVM D compiler (1.8.0):
  based on DMD v2.078.3 and LLVM 5.0.1
  built with LDC - the LLVM D compiler (0.17.5)
  Default target: x86_64-pc-linux-gnu
  Host CPU: penryn
  http://dlang.org - http://wiki.dlang.org/LDC

> Best,
> David
> 
-- 
Russel.
==========================================
Dr Russel Winder      t: +44 20 7585 2200
41 Buckmaster Road    m: +44 7770 465 077
London SW11 1EN, UK   w: www.russel.org.uk


1 2
Next ›   Last »