#7062: Spurious undefined reference to `openpty'
---------------------------------+------------------------------------------
    Reporter:  simonmar          |       Owner:                  
        Type:  bug               |      Status:  merge           
    Priority:  high              |   Milestone:  7.4.3           
   Component:  Compiler          |     Version:  7.4.2           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------

Comment(by nus):

 Replying to [comment:7 simonmar]:
 > I still don't understand what was going wrong, and I'm afraid your
 explanation doesn't clarify things for me.  The problem I encountered is
 that we had a link line like
 >
 {{{
   ... -lHSprocess -lHSunix -lutil ...
 }}}
 >
 > where `libHSprocess` depends on `libHSunix` which depends on `1libutil`.
 But the linker reported a missing symbol `openpty` that is undefined in
 `libHSunix` and defined in `libutil`.

 The sequence is
 {{{ ... -lHSprocess -lHSdirectory -lHSunix -lutil ... }}}
 Both 'HSprocess' and 'HSdirectory' depend on 'HSunix' which has 'openpty'
 undefined. With '--as-needed' only the first encounter of undefined
 'openpty' gets satisfied from libutil.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to