Ticket #7062 (closed bug: fixed)
Spurious undefined reference to `openpty'
|Reported by:||simonmar||Owned by:|
|Type of failure:||None/Unknown||Difficulty:||Unknown|
|Test Case:||Blocked By:|
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-126.96.36.199-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.
Note: See TracTickets for help on using tickets.