[commit: ghc] master: When encountering a duplicate symbol, show source of the first symbol (34519f0)

git at git.haskell.org git at git.haskell.org
Mon Feb 1 00:09:33 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/34519f0811c58cb1fd073fae3f83b6543c69a634/ghc

>---------------------------------------------------------------

commit 34519f0811c58cb1fd073fae3f83b6543c69a634
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


>---------------------------------------------------------------

34519f0811c58cb1fd073fae3f83b6543c69a634
 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