[GHC] #15860: Hadrian build fails on FreeBSD
GHC
ghc-devs at haskell.org
Mon Nov 5 18:52:03 UTC 2018
#15860: Hadrian build fails on FreeBSD
-------------------------------------+-------------------------------------
Reporter: raichoo | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Build System | Version: 8.7
(Hadrian) |
Resolution: | Keywords:
Operating System: FreeBSD | Architecture: x86_64
Type of failure: Compile-time | (amd64)
crash or panic | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by raichoo):
I've adjusted the ifdefs to just go with the POSIX choices here, I
currently don't see a reason why they shouldn't work on FreeBSD.
However now I run into an issue where `libgmp` is not found by the linker
even though I stated its location as an option to configure.
{{{
Warning: -rtsopts and -with-rtsopts have no effect with -shared.
Call hs_init_ghc() from your main() function to set these options.
/usr/bin/ld: error: unable to find library -lgmp
clang: error: linker command failed with exit code 1 (use -v to see
invocati
on)
`clang' failed in phase `Linker'. (Exit code: 1)
shakeArgsWith 0.000s 0%
Function shake 0.781s 4% =
Database read 0.692s 3% =
With database 0.038s 0%
Running rules 17.071s 91% =========================
Total 18.583s 100%
Error when running Shake build system:
* _build/stage1/lib/package.conf.d/rts-1.0.conf
* _build/stage1/rts/build/libHSrts-1.0-ghc8.7.20181104_l.so
user error (Development.Shake.cmd, system command failed
Command: _build/stage0/bin/ghc -Wall -hisuf l_dyn_hi -osuf l_dyn_o -hcsuf
l_
dyn_hc -fPIC -dynamic -eventlog -hide-all-packages -no-user-package-db
'-pac
kage-db _build/stage1/lib/package.conf.d' '-this-unit-id rts-1.0' -i
-i_buil
d/stage1/rts/build -i_build/stage1/rts/build/autogen -irts/. -Iincludes
-I_b
uild/generated -I_build/stage1/rts/build -I/usr/local/include
-I/usr/local/i
nclude -I_build/stage1/rts/build/build
-I_build/stage1/rts/build/../includes
-I_build/stage1/rts/build/includes
-I_build/stage1/rts/build/includes/dist-
derivedconstants/header -Irts/build -Irts/../includes -Irts/includes
-Irts/i
ncludes/dist-derivedconstants/header -I_build/generated -optc-
I_build/genera
ted -optP-include -optP_build/stage1/rts/build/autogen/cabal_macros.h
-ghcve
rsion-file=_build/generated/ghcversion.h -optc-fno-stack-protector -odir
_bu
ild/stage1/rts/build -hidir _build/stage1/rts/build -stubdir
_build/stage1/r
ts/build -shared -dynamic -dynload deploy -no-auto-link-packages -rtsopts
-o
ptl-lgmp -Wnoncanonical-monad-instances -optc-Wno-unknown-pragmas
_build/sta
ge1/rts/build/c/Adjustor.l_dyn_o _build/stage1/rts/build/c/Arena.l_dyn_o
_bu
ild/stage1/rts/build/c/Capability.l_dyn_o
_build/stage1/rts/build/c/CheckUnl
oad.l_dyn_o _build/stage1/rts/build/c/ClosureFlags.l_dyn_o
_build/stage1/rts
/build/c/Disassembler.l_dyn_o _build/stage1/rts/build/c/FileLock.l_dyn_o
_bu
ild/stage1/rts/build/c/Globals.l_dyn_o
_build/stage1/rts/build/c/Hash.l_dyn_
o _build/stage1/rts/build/c/Heap.l_dyn_o
_build/stage1/rts/build/c/Hpc.l_dyn
_o _build/stage1/rts/build/c/HsFFI.l_dyn_o
_build/stage1/rts/build/c/Inlines
.l_dyn_o _build/stage1/rts/build/c/Interpreter.l_dyn_o
_build/stage1/rts/bui
ld/c/LdvProfile.l_dyn_o _build/stage1/rts/build/c/Libdw.l_dyn_o
_build/stage
1/rts/build/c/LibdwPool.l_dyn_o _build/stage1/rts/build/c/Linker.l_dyn_o
_bu
ild/stage1/rts/build/c/Messages.l_dyn_o
_build/stage1/rts/build/c/OldARMAtom
ic.l_dyn_o _build/stage1/rts/build/c/PathUtils.l_dyn_o
_build/stage1/rts/bui
ld/c/Pool.l_dyn_o _build/stage1/rts/build/c/Printer.l_dyn_o
_build/stage1/rt
s/build/c/ProfHeap.l_dyn_o
_build/stage1/rts/build/c/ProfilerReport.l_dyn_o
_build/stage1/rts/build/c/ProfilerReportJson.l_dyn_o
_build/stage1/rts/build
/c/Profiling.l_dyn_o _build/stage1/rts/build/c/Proftimer.l_dyn_o
_build/stag
e1/rts/build/c/RaiseAsync.l_dyn_o
_build/stage1/rts/build/c/RetainerProfile.
l_dyn_o _build/stage1/rts/build/c/RetainerSet.l_dyn_o
_build/stage1/rts/buil
d/c/RtsAPI.l_dyn_o _build/stage1/rts/build/c/RtsDllMain.l_dyn_o
_build/stage
1/rts/build/c/RtsFlags.l_dyn_o _build/stage1/rts/build/c/RtsMain.l_dyn_o
_bu
ild/stage1/rts/build/c/RtsMessages.l_dyn_o
_build/stage1/rts/build/c/RtsStar
tup.l_dyn_o _build/stage1/rts/build/c/RtsSymbolInfo.l_dyn_o
_build/stage1/rt
s/build/c/RtsSymbols.l_dyn_o _build/stage1/rts/build/c/RtsUtils.l_dyn_o
_bui
ld/stage1/rts/build/c/STM.l_dyn_o
_build/stage1/rts/build/c/Schedule.l_dyn_o
_build/stage1/rts/build/c/Sparks.l_dyn_o
_build/stage1/rts/build/c/StableNa
me.l_dyn_o _build/stage1/rts/build/c/StablePtr.l_dyn_o
_build/stage1/rts/bui
ld/c/StaticPtrTable.l_dyn_o _build/stage1/rts/build/c/Stats.l_dyn_o
_build/s
tage1/rts/build/c/StgCRun.l_dyn_o
_build/stage1/rts/build/c/StgPrimFloat.l_d
yn_o _build/stage1/rts/build/c/Task.l_dyn_o
_build/stage1/rts/build/c/Thread
Labels.l_dyn_o _build/stage1/rts/build/c/ThreadPaused.l_dyn_o
_build/stage1/
rts/build/c/Threads.l_dyn_o _build/stage1/rts/build/c/Ticky.l_dyn_o
_build/s
tage1/rts/build/c/Timer.l_dyn_o
_build/stage1/rts/build/c/TopHandler.l_dyn_o
_build/stage1/rts/build/c/Trace.l_dyn_o
_build/stage1/rts/build/c/WSDeque.l
_dyn_o _build/stage1/rts/build/c/Weak.l_dyn_o
_build/stage1/rts/build/c/even
tlog/EventLog.l_dyn_o
_build/stage1/rts/build/c/eventlog/EventLogWriter.l_dy
n_o _build/stage1/rts/build/c/hooks/FlagDefaults.l_dyn_o
_build/stage1/rts/b
uild/c/hooks/LongGCSync.l_dyn_o
_build/stage1/rts/build/c/hooks/MallocFail.l
_dyn_o _build/stage1/rts/build/c/hooks/OnExit.l_dyn_o
_build/stage1/rts/buil
d/c/hooks/OutOfHeap.l_dyn_o
_build/stage1/rts/build/c/hooks/StackOverflow.l_
dyn_o _build/stage1/rts/build/c/linker/CacheFlush.l_dyn_o
_build/stage1/rts/
build/c/linker/Elf.l_dyn_o
_build/stage1/rts/build/c/linker/LoadArchive.l_dy
n_o _build/stage1/rts/build/c/linker/M32Alloc.l_dyn_o
_build/stage1/rts/buil
d/c/linker/MachO.l_dyn_o _build/stage1/rts/build/c/linker/PEi386.l_dyn_o
_bu
ild/stage1/rts/build/c/linker/SymbolExtras.l_dyn_o
_build/stage1/rts/build/c
/linker/elf_got.l_dyn_o _build/stage1/rts/build/c/linker/elf_plt.l_dyn_o
_bu
ild/stage1/rts/build/c/linker/elf_plt_aarch64.l_dyn_o
_build/stage1/rts/buil
d/c/linker/elf_plt_arm.l_dyn_o
_build/stage1/rts/build/c/linker/elf_reloc.l_
dyn_o _build/stage1/rts/build/c/linker/elf_reloc_aarch64.l_dyn_o
_build/stag
e1/rts/build/c/linker/elf_util.l_dyn_o
_build/stage1/rts/build/c/sm/BlockAll
oc.l_dyn_o _build/stage1/rts/build/c/sm/CNF.l_dyn_o
_build/stage1/rts/build/
c/sm/Compact.l_dyn_o _build/stage1/rts/build/c/sm/Evac.l_dyn_o
_build/stage1
/rts/build/c/sm/GC.l_dyn_o _build/stage1/rts/build/c/sm/GCAux.l_dyn_o
_build
/stage1/rts/build/c/sm/GCUtils.l_dyn_o
_build/stage1/rts/build/c/sm/MBlock.l
_dyn_o _build/stage1/rts/build/c/sm/MarkWeak.l_dyn_o
_build/stage1/rts/build
/c/sm/Sanity.l_dyn_o _build/stage1/rts/build/c/sm/Scav.l_dyn_o
_build/stage1
/rts/build/c/sm/Storage.l_dyn_o _build/stage1/rts/build/c/sm/Sweep.l_dyn_o
_
build/stage1/rts/build/c/xxhash.l_dyn_o
_build/stage1/rts/build/c/fs.l_dyn_o
_build/stage1/rts/build/c/posix/GetEnv.l_dyn_o
_build/stage1/rts/build/c/po
six/GetTime.l_dyn_o _build/stage1/rts/build/c/posix/Itimer.l_dyn_o
_build/st
age1/rts/build/c/posix/OSMem.l_dyn_o
_build/stage1/rts/build/c/posix/OSThrea
ds.l_dyn_o _build/stage1/rts/build/c/posix/Select.l_dyn_o
_build/stage1/rts/
build/c/posix/Signals.l_dyn_o _build/stage1/rts/build/c/posix/TTY.l_dyn_o
_b
uild/stage1/rts/build/cmm/Apply.l_dyn_o
_build/stage1/rts/build/cmm/Compact.
l_dyn_o _build/stage1/rts/build/cmm/Exception.l_dyn_o
_build/stage1/rts/buil
d/cmm/HeapStackCheck.l_dyn_o _build/stage1/rts/build/cmm/PrimOps.l_dyn_o
_bu
ild/stage1/rts/build/cmm/StgMiscClosures.l_dyn_o
_build/stage1/rts/build/cmm
/StgStartup.l_dyn_o _build/stage1/rts/build/cmm/StgStdThunks.l_dyn_o
_build/
stage1/rts/build/cmm/Updates.l_dyn_o
_build/stage1/rts/build/cmm/AutoApply.l
_dyn_o -o _build/stage1/rts/build/libHSrts-1.0-ghc8.7.20181104_l.so -O2
-H32
m -this-unit-id rts -XHaskell98 -ghcversion-
file=/usr/home/raichoo/Sources/g
hc/ghc/_build/generated/ghcversion.h -Irts -Wno-deprecated-flags -Wcpp-
undef
Exit code: 1
Stderr:
Warning: -rtsopts and -with-rtsopts have no effect with -shared.
Call hs_init_ghc() from your main() function to set these options.
/usr/bin/ld: error: unable to find library -lgmp
clang: error: linker command failed with exit code 1 (use -v to see
invocati
on)
`clang' failed in phase `Linker'. (Exit code: 1)
)
}}}
{{{
./configure LD=ld CC=clang --disable-large-address-space --with-gmp-
includes=/usr/local/include --with-gmp-libraries=/usr/local/lib --with-
iconv-includes=/usr/local/include --with-iconvlibraries=/usr/local/lib
--prefix=/usr/home/raichoo/Local/ghc/HEAD
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15860#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list