[GHC] #12152: panic: Loading temp shared object failed

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

[GHC] #12152: panic: Loading temp shared object failed

GHC - devs mailing list
#12152: panic: Loading temp shared object failed
-------------------------------------+-------------------------------------
           Reporter:  crockeea       |             Owner:
               Type:  bug            |            Status:  new
           Priority:  normal         |         Milestone:
          Component:  Compiler       |           Version:  7.10.3
  (Linking)                          |
           Keywords:                 |  Operating System:  Linux
       Architecture:                 |   Type of failure:  None/Unknown
  Unknown/Multiple                   |
          Test Case:                 |        Blocked By:
           Blocking:                 |   Related Tickets:
Differential Rev(s):                 |         Wiki Page:
-------------------------------------+-------------------------------------
 I've attached a no-Haskell-code project that fails when I run `cabal repl`
 with the following:


 {{{
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.10.3 for x86_64-unknown-linux):
         Loading temp shared object failed: /tmp/ghc60744_0/libghc_1.so:
 undefined symbol: _ZN2Zq1qE
 }}}

 Building the project works fine, so the problem seems to be (only) with
 dynamic linking. The issue can be resolved by swapping the order of the
 .cpp files in the cabal file.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12152>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #12152: panic: Loading temp shared object failed

GHC - devs mailing list
#12152: panic: Loading temp shared object failed
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by crockeea):

 * Attachment "bug.tar.gz" added.


--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12152>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #12152: panic: Loading temp shared object failed

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#12152: panic: Loading temp shared object failed
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Description changed by crockeea:

@@ -2,1 +2,1 @@
- with the following:
+ with the following error:

New description:

 I've attached a no-Haskell-code project that fails when I run `cabal repl`
 with the following error:


 {{{
 ghc: panic! (the 'impossible' happened)
   (GHC version 7.10.3 for x86_64-unknown-linux):
         Loading temp shared object failed: /tmp/ghc60744_0/libghc_1.so:
 undefined symbol: _ZN2Zq1qE
 }}}

 Building the project works fine, so the problem seems to be (only) with
 dynamic linking. The issue can be resolved by swapping the order of the
 .cpp files in the cabal file.

--

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12152#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #12152: panic: Loading temp shared object failed

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#12152: panic: Loading temp shared object failed
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by crockeea):

 * Attachment "testcase2.tar.gz" added.

 Another test case that produces a similar error. May or may not be the
 same issue.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12152>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #12152: panic: Loading temp shared object failed

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#12152: panic: Loading temp shared object failed
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by crockeea):

 In bug.tar.gz, a workaround to get `cabal repl` working is to swap the
 order of the cpp files in the `c-sources` section of the cabal file.

 However, stack links the `c-sources` in alphabetical order, regardless of
 the order in the cabal file. This means I still get the linking error when
 I run `stack ghci` (if the file that should be linked first is
 alphabetically after another c-source file), and I don't know of a
 workaround in that case.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12152#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #12152: panic: Loading temp shared object failed

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#12152: panic: Loading temp shared object failed
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  GHCi crash        |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by crockeea):

 * failure:  None/Unknown => GHCi crash


--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12152#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #12152: panic: Loading temp shared object failed

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#12152: panic: Loading temp shared object failed
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  GHCi crash        |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by crockeea):

 Workaround for testcase2: link with g++ using `ghc-options: -pgmlg++`.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12152#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #12152: panic: Loading temp shared object failed

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#12152: panic: Loading temp shared object failed
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  GHCi crash        |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 I don't know why but for me `cabal repl` doesn't even attempt to launch an
 interpreter for your `bug`, it just builds the project. Can you give
 instructions to reproduce that don't depend on cabal (or stack)? It may be
 a cabal bug.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12152#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #12152: panic: Loading temp shared object failed

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#12152: panic: Loading temp shared object failed
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.10.3
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  GHCi crash        |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by rwbarton):

 Never mind, it's just `ghci b.o a.o`, where `b.o` refers to data (not a
 function) defined in `a.o`. You don't need C++ either. We should probably
 link together all `.o` files given on the command line at once.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12152#comment:6>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #12152: panic: Loading temp shared object failed

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#12152: panic: Loading temp shared object failed
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.8.1
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  GHCi crash        |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by thomie):

 * version:  7.10.3 => 7.8.1


Comment:

 Testcase for comment:6:

 a.c:
 {{{#!c
 int x;
 }}}

 b.c:
 {{{#!c
 extern int x;

 int f(void) {
     return x;
 }
 }}}

 {{{
 $ ghc -c a.c -fPIC && ghc -c b.c -fPIC
 }}}

 ok:
 {{{
 $ ghci a.o b.o
 Prelude>
 }}}

 not ok:
 {{{
 $ ghci b.o a.o
 ghc: panic! (the 'impossible' happened)
   (GHC version 8.0.1 for x86_64-unknown-linux):
         Loading temp shared object failed: /tmp/ghc19123_0/libghc_1.so:
 undefined symbol: x
 }}}

 I can not reproduce the problem on Windows (`DYNAMIC_GHC_PROGRAMS=NO`).

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12152#comment:7>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #12152: panic: Loading temp shared object failed

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#12152: panic: Loading temp shared object failed
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.8.1
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  GHCi crash        |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Changes (by basvandijk):

 * cc: v.dijk.bas@… (added)


Comment:

 I'm having a similar / the same problem after upgrading to NixOS-16.09.
 Details are here:

 https://github.com/NixOS/nixpkgs/issues/18558

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12152#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
Reply | Threaded
Open this post in threaded view
|

Re: [GHC] #12152: panic: Loading temp shared object failed

GHC - devs mailing list
In reply to this post by GHC - devs mailing list
#12152: panic: Loading temp shared object failed
-------------------------------------+-------------------------------------
        Reporter:  crockeea          |                Owner:  (none)
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  7.8.1
  (Linking)                          |
      Resolution:                    |             Keywords:
Operating System:  Linux             |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  GHCi crash        |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by crockeea):

 This appears to be fixed in 8.2. @basvandijk, can you confirm for your
 case?

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12152#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
ghc-tickets mailing list
[hidden email]
http://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets