Closed angerman closed 8 years ago
With make I end up with
./rts/dist/build/libCffi.a
./rts/dist/build/libCffi_debug.a
./rts/dist/build/libCffi_l.a
./rts/dist/build/libCffi_thr.a
./rts/dist/build/libCffi_thr_debug.a
./rts/dist/build/libCffi_thr_l.a
The shake build system so far does not produce these.
From the make
build log:
Must remake target `rts/dist/build/AutoApply.o'.
"inplace/bin/ghc-stage1" -static -O0 -H64m -Wall -Iincludes -Iincludes/dist -Iincludes/dist-derivedconstants/header -Iincludes/dist-ghcconstants/header -Irts -Irts/dist/build -DCOMPILING_RTS -this-package-key rts -dcmm-lint -DDTRACE -i -irts -irts/dist/build -irts/dist/build/autogen -Irts/dist/build -Irts/dist/build/autogen -O2 -c rts/dist/build/Auto
Apply.cmm -o rts/dist/build/AutoApply.o
Successfully remade target file `rts/dist/build/AutoApply.o'.
File `rts/dist/build/libCffi.a' does not exist.
Must remake target `rts/dist/build/libCffi.a'.
cp libffi/build/inst/lib/libffi.a rts/dist/build/libCffi.a
Successfully remade target file `rts/dist/build/libCffi.a'.
Must remake target `rts/dist/build/libHSrts.a'.
"rm" -f rts/dist/build/libHSrts.a
echo rts/dist/build/Adjustor.o rts/dist/build/Arena.o rts/dist/build/Capability.o rts/dist/build/CheckUnload.o rts/dist/build/ClosureFlags.o rts/dist/build/Disassembler.o rts/dist/build/FileLock.o rts/dist/build/Globals.o rts/dist/build/Hash.o rts/dist/build/Hpc.o rts/dist/build/HsFFI.o rts/dist/build/Inlines.o rts/dist/build/Interpreter.o rts/dist/build/LdvProfile.o rts/dist/build/Libdw.o rts/dist/build/LibdwPool.o rts/dist/build/Linker.o rts/dist/build/Messages.o rts/dist/build/OldARMAtomic.o rts/dist/build/Pool.o rts/dist/build/Printer.o rts/dist/build/ProfHeap.o rts/dist/build/Profiling.o rts/dist/build/Proftimer.o rts/dist/build/RaiseAsync.o rts/dist/build/RetainerProfile.o rts/dist/build/RetainerSet.o rts/dist/build/RtsAPI.o rts/dist/build/RtsDllMain.o rts/dist/build/RtsFlags.o rts/dist/build/RtsMain.o rts/dist/build/RtsMessages.o rts/dist/build/RtsStartup.o rts/dist/build/RtsSymbols.o rts/dist/build/RtsUtils.o rts/dist/build/STM.o rts/dist/build/Schedule.o rts/dist/build/Sparks.o rts/dist/build/Stable.o rts/dist/build/StaticPtrTable.o rts/dist/build/Stats.o rts/dist/build/StgCRun.o rts/dist/build/StgPrimFloat.o rts/dist/build/Task.o rts/dist/build/ThreadLabels.o rts/dist/build/ThreadPaused.o rts/dist/build/Threads.o rts/dist/build/Ticky.o rts/dist/build/Timer.o rts/dist/build/Trace.o rts/dist/build/WSDeque.o rts/dist/build/Weak.o rts/dist/build/hooks/FlagDefaults.o rts/dist/build/hooks/MallocFail.o rts/dist/build/hooks/OnExit.o rts/dist/build/hooks/OutOfHeap.o rts/dist/build/hooks/StackOverflow.o rts/dist/build/sm/BlockAlloc.o rts/dist/build/sm/Compact.o rts/dist/build/sm/Evac.o rts/dist/build/sm/GC.o rts/dist/build/sm/GCAux.o rts/dist/build/sm/GCUtils.o rts/dist/build/sm/MBlock.o rts/dist/build/sm/MarkWeak.o rts/dist/build/sm/Sanity.o rts/dist/build/sm/Scav.o rts/dist/build/sm/Storage.o rts/dist/build/sm/Sweep.o rts/dist/build/eventlog/EventLog.o rts/dist/build/posix/GetEnv.o rts/dist/build/posix/GetTime.o rts/dist/build/posix/Itimer.o rts/dist/build/posix/OSMem.o rts/dist/build/posix/OSThreads.o rts/dist/build/posix/Select.o rts/dist/build/posix/Signals.o rts/dist/build/posix/TTY.o rts/dist/build/Apply.o rts/dist/build/Exception.o rts/dist/build/HeapStackCheck.o rts/dist/build/PrimOps.o rts/dist/build/StgMiscClosures.o rts/dist/build/StgStartup.o rts/dist/build/StgStdThunks.o rts/dist/build/Updates.o rts/dist/build/AutoApply.o | "xargs" "/usr/bin/ar" clqs rts/dist/build/libHSrts.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: rts/dist/build/libHSrts.a(Disassembler.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: rts/dist/build/libHSrts.a(LdvProfile.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: rts/dist/build/libHSrts.a(OldARMAtomic.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: rts/dist/build/libHSrts.a(Profiling.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: rts/dist/build/libHSrts.a(RetainerProfile.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: rts/dist/build/libHSrts.a(RetainerSet.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: rts/dist/build/libHSrts.a(RtsDllMain.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: rts/dist/build/libHSrts.a(Sanity.o) has no symbols
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib: file: rts/dist/build/libHSrts.a(EventLog.o) has no symbols
Successfully remade target file `rts/dist/build/libHSrts.a'.
Weirdly enough, the code that is supposed to do this, actually exists at https://github.com/snowleopard/shaking-up-ghc/blob/master/src/Settings/Packages/Rts.hs#L73-L77.
Upon further investigation, I fail to see where rts is built with HsCpp, to actually produce the libffi libs.
HsCpp
is not responsible for building libCffi.a
. It is used to create rts
package configuration file.
We simply need to replicate the following step in the new build system:
cp libffi/build/inst/lib/libffi.a rts/dist/build/libCffi.a
Hmm, ok. I really need to understand the build system better.
I'll try to copy step by hand and see how far I get.
Great. Please make use of the new copyFile
function. I guess the command will look something like this after renaming dist
to stage1
:
copyFile "libffi/build/inst/lib/libffi.a" "rts/stage1/build/libCffi.a"
I guess the above fix wasn't enough. I am now hit by the same issue.
Let me reopen this. I think we are missing a need
somewhere.
The issue was that on Windows we have to use libCffi-6.a
instead of libCffi.a
. I have no idea why.
Assuming #86 is fixed (e.g. with
ln -s build stage1
inrts
), I end up withon os x.