#4151: Validate fails with GhcRtsWithPapi = YES
---------------------------+------------------------------------------------
Reporter: dmp | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Build System | Version: 6.13
Resolution: | Keywords: papi
Difficulty: | Os: Linux
Testcase: | Architecture: Unknown/Multiple
Failure: Other |
---------------------------+------------------------------------------------
Changes (by dmp):
* os: Unknown/Multiple => Linux
Comment:
It looks like the chain of includes that causes the problem is:
{{{papi.h --> sys/types.h --> features.h}}}
This is on a Fedora 12 installation. The actual error is:
{{{
In file included from rts/Papi.c:19:
rts/PosixSource.h:19:1: error: "_POSIX_C_SOURCE" redefined
In file included from /usr/include/sys/types.h:27,
from /usr/include/papi.h:49,
from rts/Papi.c:17:
/usr/include/features.h:210:1: error: this is the location of the previous
definition
}}}
which is the result of this command:
{{{
/usr/lib64/ccache/gcc -E -DPROFILING -DTHREADED_RTS -DDEBUG
-Wall -Werror -Wall -Wextra -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Winline -Waggregate-return -Wpointer-arith
-Wmissing-noreturn -Wnested-externs -Wredundant-decls
-Iincludes -Irts -DCOMPILING_RTS -fno-strict-aliasing -fno-common
-DUSE_PAPI -Ilibffi/build/include -fomit-frame-pointer
-DRtsWay=\"rts_v\" -Wno-strict-prototypes
-MM rts/Papi.c
-MF rts/dist/build/.depend-v-dyn-l-debug-thr-thr_debug-thr_l-debug_dyn-
thr_dyn-thr_debug_dyn.c_asm.bit
}}}
I'm attaching a new patch (to replace the old one) that only undefines the
symbols after including {{{papi.h}}} as suggested above. This patch
validates both with and without enabling PAPI support in the runtime.
I still can't figure out why the problem only occurs while validating, but
not with a normal papi-enabled build.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4151#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs