Skip to content

deriveConstants fails on OpenBSD

On OpenBSD 5.5 compilation of current HEAD fails with:

inplace/bin/deriveConstants --gen-header -o includes/dist-derivedconstants/header/DerivedConstants.h --tmpdir includes/dist-derivedconstants/header/ --gcc-program "/usr/bin/gcc" --gcc-flag -fno-stack-protector --gcc-flag -Iincludes --gcc-flag -Iincludes/dist --gcc-flag -Iincludes/dist-derivedconstants/header --gcc-flag -Iincludes/dist-ghcconstants/header --gcc-flag -Irts --gcc-flag -fcommon --nm-program "/usr/bin/nm"
nm: unknown option -- P
usage: nm [-aCegnoprsuw] [file ...]
deriveConstants: readProcess: /usr/bin/nm "-P" "includes/dist-derivedconstants/header/tmp.o" (exit 1): failed
includes/ghc.mk:167: recipe for target 'includes/dist-derivedconstants/header/DerivedConstants.h' failed
gmake[1]: *** [includes/dist-derivedconstants/header/DerivedConstants.h] Error 1
Makefile:71: recipe for target 'all' failed
gmake: *** [all] Error 2

This is due to OpenBSD's nm not supporting the -P option.

Perhaps it can be fixed by using 'objdump --syms' instead of 'nm -P' (see attached OpenBSD-only patch).

Trac metadata
Trac field Value
Version 7.9
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Build System
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information