#7062: Spurious undefined reference to `openpty'
---------------------------------+------------------------------------------
    Reporter:  simonmar          |       Owner:                  
        Type:  bug               |      Status:  new             
    Priority:  high              |   Milestone:  7.6.1           
   Component:  Compiler          |     Version:  7.4.2           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------
 I'm seeing these since upgrading our build machines from Ubuntu 10.04 to
 12.04:

 {{{
 =====> process001(dyn) 3159 of 3394 [0, 96, 0]
 cd ../../libraries/process/tests && '/64playpen/simonmar/nightly/HEAD-
 cam-04-unx/x86_64-unknown-linux/inplace/bin/ghc-stage2' -fforce-recomp
 -dcore-lint -dcmm-lint -dno-debug-output -no-user-package-db -rtsopts
 -fno-ghci-history -o process001 process001.hs -O -dynamic
 >process001.comp.stderr 2>&1
 Compile failed (status 256) errors were:
 [1 of 1] Compiling Main             ( process001.hs, process001.o )
 Linking process001 ...
 /64playpen/simonmar/nightly/HEAD-cam-04-unx/x86_64-unknown-
 linux/libraries/unix/dist-
 install/build/libHSunix-2.5.1.0-ghc7.5.20120706.so: undefined reference to
 `openpty'
 collect2: ld returned 1 exit status

 *** unexpected failure for process001(dyn)
 }}}

 I'm stumped.  Here's what I've discovered so far:

  * It only happens with `-dynamic`
  * The `openpty` symbol comes from the `util` library, which we are
 correctly linking in.  The `libutil.so` library is present, and I've
 checked that we're getting the right one.
  * It only happens when using the `process` package, which depends on
 `unix`.  Using `unix` by itself is fine.  So something about the `process`
 package is messing up the linker.
  * I've tried removing all the `-L` options and linking libraries by full
 pathname, just in case we're picking up something from the wrong place;
 that doesn't help.

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