[commit: ghc] ghc-8.0: When encountering a duplicate symbol, show source of the first symbol (02f3c8f)
git at git.haskell.org
git at git.haskell.org
Mon Apr 11 00:05:16 UTC 2016
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.0
Link : http://ghc.haskell.org/trac/ghc/changeset/02f3c8fdb71f5e1a190061bd2a687963cf10141f/ghc
>---------------------------------------------------------------
commit 02f3c8fdb71f5e1a190061bd2a687963cf10141f
Author: Reid Barton <rwbarton at gmail.com>
Date: Sun Jan 31 19:10:29 2016 -0500
When encountering a duplicate symbol, show source of the first symbol
Test Plan: Used this to track down an issue I was having.
Reviewers: simonmar, austin, erikd, bgamari
Reviewed By: erikd, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D1863
(cherry picked from commit 34519f0811c58cb1fd073fae3f83b6543c69a634)
>---------------------------------------------------------------
02f3c8fdb71f5e1a190061bd2a687963cf10141f
rts/Linker.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/rts/Linker.c b/rts/Linker.c
index b9a1d34..29bd5d8 100644
--- a/rts/Linker.c
+++ b/rts/Linker.c
@@ -430,13 +430,17 @@ static int ghciInsertSymbolTable(
" %s\n"
"whilst processing object file\n"
" %" PATH_FMT "\n"
+ "The symbol was previously defined in\n"
+ " %" PATH_FMT "\n"
"This could be caused by:\n"
" * Loading two different object files which export the same symbol\n"
" * Specifying the same object file twice on the GHCi command line\n"
" * An incorrect `package.conf' entry, causing some object to be\n"
" loaded twice.\n",
(char*)key,
- obj_name
+ obj_name,
+ pinfo->owner->archiveMemberName ? pinfo->owner->archiveMemberName
+ : pinfo->owner->fileName
);
return 0;
}
More information about the ghc-commits
mailing list