Cannot Build: compareSizes (rts missing _TRACE_gc and _TRACE_sched) #90
Comments
This happens when we link |
Running the command by hand with
|
Some more info
|
I am now stuck at this point too on Windows. |
We are building C files in |
Here is the current command we use to produce D:/msys/home/nam83/ghc/inplace/mingw/bin/gcc.exe
-Iincludes
-Iincludes/dist-derivedconstants/header
-Irts/stage1/build
-Irts/stage1/build/autogen
-c rts/Trace.c
-o rts/stage1/build/Trace.o
-Irts
-Irts/stage1/build
"-DRtsWay=\"rts_v\""
-DCOMPILING_RTS
"-DProjectVersion=\"8.1.20160104\"" Here is what the old system uses: "inplace/bin/ghc-stage1.exe"
-optc-fno-stack-protector
-optc-Wall
-optc-Wall
-optc-Wextra
-optc-Wstrict-prototypes
-optc-Wmissing-prototypes
-optc-Wmissing-declarations
-optc-Winline
-optc-Waggregate-return
-optc-Wpointer-arith
-optc-Wmissing-noreturn
-optc-Wnested-externs
-optc-Wredundant-decls
-optc-Iincludes
-optc-Iincludes/dist
-optc-Iincludes/dist-derivedconstants/header
-optc-Iincludes/dist-ghcconstants/header
-optc-Irts
-optc-Irts/stage1/build
-optc-DCOMPILING_RTS
-optc-fno-strict-aliasing
-optc-fno-common
-optc-Irts/stage1/build/autogen
-optc-Wno-error=inline
-optc-O2
-optc-fomit-frame-pointer
-optc-g
-optc-DRtsWay=\"rts_v\"
-optc-DWINVER=0x06000100
-optc-DProjectVersion=\"8.1.20160104\"
-static
-H32m
-O
-Wall
-Iincludes
-Iincludes/dist
-Iincludes/dist-derivedconstants/header
-Iincludes/dist-ghcconstants/header
-Irts
-Irts/stage1/build
-DCOMPILING_RTS
-this-package-key rts
-dcmm-lint
-i
-irts
-irts/stage1/build
-irts/stage1/build/autogen
-Irts/stage1/build
-Irts/stage1/build/autogen
-O2
-c rts/Trace.c
-o rts/stage1/build/Trace.o Quite a big difference, but I wonder which flag is crucial for this issue, and how the result is affected by the choice of builder ( The fact is, the resulting object files are different, in particular, the former doesn't contain |
Strangely enough, my For |
The big differences I see are:
In
for which
As far as I can tell, for llvm's clang, Can anyone more knowledgeable support make any sense out of this? |
According to http://stackoverflow.com/questions/25602813/force-a-function-to-be-inline-in-clang-llvm/25623448#25623448, my suspicion is correct. Now, I'm not sure if this should actually be considered a bug in Haskells RTS or not, at least it should be noted somewhere that rts needs to be compiled with optimizations. Maybe it is, and I just didn't find it though. |
@angerman Awesome! Many thanks for finding the reason. I couldn't imagine |
@snowleopard I ended up comparing the symbols in the object files, and wondered why they were missing in one, but not the other... after looking for the symbols in the source I kept wondering what was different wrt the inlining. Then it dawned on me that it had to be an optimization pass. |
The text was updated successfully, but these errors were encountered: