Spurious undefined reference to `openpty'
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-22.214.171.124-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
openptysymbol comes from the
utillibrary, which we are correctly linking in. The
libutil.solibrary is present, and I've checked that we're getting the right one.
- It only happens when using the
processpackage, which depends on
unixby itself is fine. So something about the
processpackage is messing up the linker.
- I've tried removing all the
-Loptions and linking libraries by full pathname, just in case we're picking up something from the wrong place; that doesn't help.