Thread overview
[Bug 289] Static linking has wrong libc/libpthread order
Mar 26, 2018
Stefan Schuerger
Mar 26, 2018
Iain Buclaw
Mar 26, 2018
Stefan Schuerger
Mar 26, 2018
Stefan Schuerger
Mar 29, 2018
Iain Buclaw
Apr 02, 2018
Iain Buclaw
Apr 07, 2018
Iain Buclaw
March 26, 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=289

Stefan Schuerger <stefan@schuerger.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stefan@schuerger.com

--- Comment #1 from Stefan Schuerger <stefan@schuerger.com> ---
Is there perhaps a workaround besides the -v order change?

-- 
You are receiving this mail because:
You are watching all bug changes.
March 26, 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=289

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED

--- Comment #2 from Iain Buclaw <ibuclaw@gdcproject.org> ---
Should be caused by the order here: https://github.com/D-Programming-GDC/GDC/blob/ad6adc7d6da4e9e490ba2e13b0069a72b8cc2f7c/libphobos/configure.ac#L93

You will have a file named libgphobos.spec installed, you can swap the libraries there.

-- 
You are receiving this mail because:
You are watching all bug changes.
March 26, 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=289

--- Comment #3 from Stefan Schuerger <stefan@schuerger.com> ---
Hi Iain,

Thanks for the workaround! Changing libgphobos.spec from

*lib: %(liborig_gdc_renamed) -lm -lpthread  -ldl

to

*lib: -lpthread %(liborig_gdc_renamed) -lm  -ldl

works!

-- 
You are receiving this mail because:
You are watching all bug changes.
March 26, 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=289

--- Comment #4 from Stefan Schuerger <stefan@schuerger.com> ---
Fun fact: When taking the "helloworld" example from the dlang.org page
(https://tour.dlang.org/):

import std.stdio;
import std.algorithm;
import std.range;

void main()
{
    // Let's get going!
    writeln("Hello World!");

    // An example for experienced programmers:
    // Take three arrays, and without allocating
    // any new memory, sort across all the
    // arrays inplace
    int[] arr1 = [4, 9, 7];
    int[] arr2 = [5, 2, 1, 10];
    int[] arr3 = [6, 8, 3];
    sort(chain(arr1, arr2, arr3));
    writefln("%s\n%s\n%s\n", arr1, arr2, arr3);
    // To learn more about this example, see the
    // "Range algorithms" page under "Gems"
}

compiled as static and stripped, the ARM binary is 1.1M. When you comment out all the code but the writeln("Hello World!"), the stripped binary grows to 1.7M...

-- 
You are receiving this mail because:
You are watching all bug changes.
March 29, 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=289

--- Comment #5 from Iain Buclaw <ibuclaw@gdcproject.org> ---
(In reply to Stefan Schuerger from comment #3)
> Hi Iain,
> 
> Thanks for the workaround! Changing libgphobos.spec from
> 
> *lib: %(liborig_gdc_renamed) -lm -lpthread  -ldl
> 
> to
> 
> *lib: -lpthread %(liborig_gdc_renamed) -lm  -ldl
> 
> works!

Can %(liborig_gdc_renamed) appear after the other libraries also?

-- 
You are receiving this mail because:
You are watching all bug changes.
April 02, 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=289

--- Comment #6 from Iain Buclaw <ibuclaw@gdcproject.org> ---
https://github.com/D-Programming-GDC/GDC/pull/617

-- 
You are receiving this mail because:
You are watching all bug changes.
April 07, 2018
https://bugzilla.gdcproject.org/show_bug.cgi?id=289

Iain Buclaw <ibuclaw@gdcproject.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

-- 
You are receiving this mail because:
You are watching all bug changes.