aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarco Leise <marco.leise@gmx.de>2017-07-06 17:37:38 +0200
committerMarco Leise <marco.leise@gmx.de>2017-07-06 17:50:10 +0200
commitaf533565a12ac7750335be3bc9110ed2343fa3df (patch)
tree4c888d52649cd4d27b947803d7623ae0c762620a /metadata
parentdmd-2.070: Disable DWARF exception handling on 64-bit Linux (https://issues.d... (diff)
downloaddlang-af533565a12ac7750335be3bc9110ed2343fa3df.tar.gz
dlang-af533565a12ac7750335be3bc9110ed2343fa3df.tar.bz2
dlang-af533565a12ac7750335be3bc9110ed2343fa3df.zip
Upon reinstallation, dmd now always compiles with -fPIC to work around an issue with binutils 2.28 (https://issues.dlang.org/show_bug.cgi?id=17375)
Diffstat (limited to 'metadata')
-rw-r--r--metadata/news/2017-07-06-binutils-2_28-dmd-shared-object-breakage/2017-07-06-binutils-2_28-dmd-shared-object-breakage.en.txt37
1 files changed, 37 insertions, 0 deletions
diff --git a/metadata/news/2017-07-06-binutils-2_28-dmd-shared-object-breakage/2017-07-06-binutils-2_28-dmd-shared-object-breakage.en.txt b/metadata/news/2017-07-06-binutils-2_28-dmd-shared-object-breakage/2017-07-06-binutils-2_28-dmd-shared-object-breakage.en.txt
new file mode 100644
index 0000000..59d1271
--- /dev/null
+++ b/metadata/news/2017-07-06-binutils-2_28-dmd-shared-object-breakage/2017-07-06-binutils-2_28-dmd-shared-object-breakage.en.txt
@@ -0,0 +1,37 @@
+Title: binutils 2.28 breaks dmd shared objects
+Author: Marco Leise <marco.leise@gmx.de>
+Content-Type: text/plain
+Posted: 2017-07-06
+Revision: 1
+News-Item-Format: 2.0
+Display-If-Installed: dev-lang/dmd
+
+We currently have two issues with the linkers in binutils. Since 2.27,
+the gold linker refuses to work with dmd, but that can be worked around
+by using ld.bfd (which is the default).
+
+Now with binutils 2.28 we face a new issue. The way the druntime scans
+shared libraries for modules got broken and you see error messages of
+the form:
+
+# Fatal Error while loading '/usr/lib/libphobos2.so.XX':
+# The module '<...>' is already defined in '<...>'
+
+The bug report about that was first opened in May and as of now the
+answer is to compile all code with '-fPIC'.
+
+# https://issues.dlang.org/show_bug.cgi?id=17375
+
+For you reading this, there are three options to get there:
+
+1. Append '-fPIC' to the DFLAGS of the DMD versions you need to work
+ with binutils 2.28. If you only have one, it is in /etc/dmd.conf, if
+ you have multiple versions installed pick them from /etc/dmd/.
+2. Have the ebuilds append the flags during a reinstall of DMD.
+ a) Using the 'selfhost' USE-flag.
+ b) By first reinstalling DMD 2.067 (the last C++ based version) and
+ then using that to compile one of the later (self-hosting)
+ versions.
+3. Install binutils 2.27, use
+ # sudo binutils-config x86_64-pc-linux-gnu-2.27
+ to activate it, reinstall DMD, then switch back to binutils 2.28.