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

Comment(by trommler):

 Replying to [comment:17 simonmar]:
 >
 > I'm a little unsure about this patch, which is why I asked you to add a
 comment.  But your comment just points back to this ticket, and I'm none
 the wiser!  You mentioned that this is a temporary fix, which also makes
 me a bit nervous.  I'm not sure whether this will have implications for
 other platforms or not.
 The flag is ELF specific.

 >
 > What I'd like to see is
 >
 >  * a consise description of the problem
 If ld was patched to include the new dynamic tags and as needed is also
 enabled then Haskell libraries will not be found if they are not installed
 in a standard dynamic linker path. The reason is that unlike the old RPATH
 dynamic tag the new RUNPATH dynamic tag applies only libraries directly
 loaded by the object containing the RUNPATH tag.

 GHC libraries do not set a RUNPATH or RPATH tag for other GHC libraries
 they depend on (see libHSunix above) and hence the library cannot be found
 unless it is in the default linker path or included in LD_LIBRARY_PATH.
 >  * an explanation of the workaround
 The workaround explicitly requests the old dynamic tags to be generated
 which is still the standard on vanilla binutils. Some distributions,
 however, patch binutils to include the new dynamic tags.
 >  * if this is a temporary workaround, what is the right fix?
 The right fix is to include a RUNPATH for all dependent Haskell libraries
 when linking GHC's libraries. The handling of dlopen in the presence of
 RUNPATH has been changed as well, so there might be some implications for
 Linker.c too.
 >  * when can we remove the temporary workaround?
 After the above fix is done.
 >  * what are the implications for other platforms?
 I do not expect implications for other platforms as the flag is ELF
 specific and the patch adds a check to configure if the flag is supported
 by ld and only if it is adds he flag to the linker flags.

 If binutils was not patched to include RUNPATH then everything will work
 as before. I tested that on Suse Linux Enterprise Sever 11 SP1 and SP2 for
 both i386 and x86_64.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7062#comment:21>
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