www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 14942] New: dmd linking error with SHA and SSSE3


          Issue ID: 14942
           Summary: dmd linking error with SHA and SSSE3
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: chalucha gmail.com

I have a strange problem with building vibe.d in debug[0]

As I updated to dmd-2.068 and the problem remains, I tried to minimize the test
case and here it is.

import std.digest.sha;

void main() {
    SHA1 hash;

And now with commands generated by dub:
dmd -c -oftest.o -debug -g -w app.d
dmd -oftest test.o -L--no-as-needed -g

Results in:
test.o: In function `std.digest.sha.SHA!(512, 160).SHA._sharedStaticCtor330()':
/opt/dmd-2.068/import/std/digest/sha.d:224: undefined reference to
`std.internal.digest.sha_SSSE3.transformSSSE3(uint[5]*, const(ubyte[64])*)'

In release, problem does not occur. It's also ok with ldc2-0.15.1

DMD version:   v2.068.0
OS: Gentoo linux x86_64
CPU: i5-2500K SandyBridge (with SSSE3)
Config [/opt/dmd-2.068/bin/dmd.conf]:

DFLAGS=-I/opt/dmd-2.068/import -L--export-dynamic -defaultlib=phobos2
DFLAGS=%DFLAGS% -L-L/opt/dmd-2.068/lib32 -L-rpath -L/opt/dmd-2.068/lib32
DFLAGS=%DFLAGS% -L-L/opt/dmd-2.068/lib64 -L-rpath -L/opt/dmd-2.068/lib64

[0] https://github.com/rejectedsoftware/vibe.d/issues/1097

Aug 20 2015