Issue 18234 - [REG 2.075] Case of link failure when a program is compiled against a static lib
Summary: [REG 2.075] Case of link failure when a program is compiled against a static lib
Status: RESOLVED DUPLICATE of issue 17712
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 regression
Assignee: No Owner
URL:
Keywords:
: 18971 (view as issue list)
Depends on:
Blocks:
 
Reported: 2018-01-13 09:56 UTC by basile-z
Modified: 2018-06-11 19:03 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description basile-z 2018-01-13 09:56:27 UTC
This is a case of link failure when a program is compiled against a static lib, while no problem when passing the sources.

test case is unfortuantely not reduced:

to reproduce with a shell script

---
if [ ! -d "iz" ]; then
    git clone https://www.github.com/BBasile/iz.git
fi

cd iz
git checkout v0.6.4
cd scripts
sh compile.sh
cd ../
dmd samples/dictionnary_suffixarray.d lib/iz.a -Iimport
---

On the other hand:

---
dub samples/dictionnary_suffixarray.d <<< "q"
---

or even

---
dmd samples/dictionnary_suffixarray.d import/iz/strings.d import/iz/memory.d -Iimport
---

work fine.

Digger shows that last good DMD is 2.074.1. Three commits are suggested:

> digger: Commit 1e7b526b40852e9b85df3684430e371034cdf7ec (1/1) is untestable.
> digger: There are only untestable commits left to bisect.
> digger: The first bad commit could be any of:
> digger: 1e7b526b40852e9b85df3684430e371034cdf7ec
> digger: 6fecaa8232a427fb3ca29c5a5245e08fc43b71b1
> digger: f0410bea1ad2b130884964d603b34e729b3e4f69
> object.Exception@bisect.d(186): We cannot bisect more!

However they don't seem to exist.
Comment 1 David Nadlinger 2018-05-20 17:51:35 UTC
(In reply to Basile B. from comment #0)
> > digger: Commit 1e7b526b40852e9b85df3684430e371034cdf7ec (1/1) is untestable.
> > digger: There are only untestable commits left to bisect.
> > digger: The first bad commit could be any of:
> > digger: 1e7b526b40852e9b85df3684430e371034cdf7ec
> > digger: 6fecaa8232a427fb3ca29c5a5245e08fc43b71b1
> > digger: f0410bea1ad2b130884964d603b34e729b3e4f69
> > object.Exception@bisect.d(186): We cannot bisect more!
> 
> However they don't seem to exist.

These hashes refer to the commits in Vladimir's top-level repo that combines commits to the various compiler and runtime repositories into one linear history: https://bitbucket.org/cybershadow/d

Unfortunately, the corresponding commits are big master -> stable merges, which is not very helpful:

https://github.com/dlang/dmd/pull/6915
https://github.com/dlang/phobos/pull/5491
https://github.com/dlang/druntime/pull/1841
Comment 2 basile-z 2018-05-20 21:50:35 UTC
There's some progress, using -allinst solves the problem

---
if [ ! -d "iz" ]; then
    git clone https://www.github.com/BBasile/iz.git
fi

cd iz
git checkout v0.6.4
cd scripts
sh compile.sh
cd ../
dmd samples/dictionnary_suffixarray.d lib/iz.a -Iimport -allinst
---

giving a hint on what the exact problem is i hope.
Comment 3 basile-z 2018-06-11 16:30:42 UTC
*** Issue 18971 has been marked as a duplicate of this issue. ***
Comment 4 Johannes Pfau 2018-06-11 18:29:44 UTC
Is https://issues.dlang.org/show_bug.cgi?id=17712 related?
Comment 5 basile-z 2018-06-11 19:03:38 UTC

*** This issue has been marked as a duplicate of issue 17712 ***