Opened 2 years ago

Closed 2 years ago

#5649 closed bug (fixed)

O2 / HPC collision

Reported by: mjo Owned by:
Priority: normal Milestone: 7.4.1
Component: Compiler Version: 7.2.1
Keywords: Cc:
Operating System: Linux Architecture: x86_64 (amd64)
Type of failure: Compile-time crash Difficulty:
Test Case: Blocked By:
Blocking: Related Tickets:

Description

This works,

$ ghc -O2 --make src/*.hs

And this works,

$ ghc -fhpc --make src/*.hs

However, it seems I cannot invite -O2 and -fhpc to the same party:

 $ ghc -O2 -fhpc --make src/*.hs
[ 1 of 17] Compiling ScaleFactor      ( src/ScaleFactor.hs, src/ScaleFactor.o )
[ 2 of 17] Compiling Values           ( src/Values.hs, src/Values.o )
[ 3 of 17] Compiling RealFunction     ( src/RealFunction.hs, src/RealFunction.o )
[ 4 of 17] Compiling MRI              ( src/MRI.hs, src/MRI.o )
[ 5 of 17] Compiling Point            ( src/Point.hs, src/Point.o )
[ 6 of 17] Compiling Misc             ( src/Misc.hs, src/Misc.o )
[ 7 of 17] Compiling Examples         ( src/Examples.hs, src/Examples.o )
[ 8 of 17] Compiling Face             ( src/Face.hs, src/Face.o )
[ 9 of 17] Compiling Cardinal         ( src/Cardinal.hs, src/Cardinal.o )
[10 of 17] Compiling Comparisons      ( src/Comparisons.hs, src/Comparisons.o )
[11 of 17] Compiling Assertions       ( src/Assertions.hs, src/Assertions.o )
[12 of 17] Compiling FunctionValues   ( src/FunctionValues.hs, src/FunctionValues.o )
[13 of 17] Compiling Tetrahedron      ( src/Tetrahedron.hs, src/Tetrahedron.o )
/tmp/ghc2452_0/ghc2452_0.s: Assembler messages:

/tmp/ghc2452_0/ghc2452_0.s:48147:0:
     Error: symbol `d2jn_info' is already defined

/tmp/ghc2452_0/ghc2452_0.s:48158:0:
     Error: symbol `d2jl_info' is already defined

/tmp/ghc2452_0/ghc2452_0.s:48169:0:
     Error: symbol `d2jh_info' is already defined

/tmp/ghc2452_0/ghc2452_0.s:48180:0:
     Error: symbol `d2jb_info' is already defined

...

Tested with both GHC 7.2.1 and GHC 7.2.2.

Change History (3)

comment:1 Changed 2 years ago by simonmar

  • Milestone set to 7.4.1
  • Status changed from new to infoneeded

Can you attach the source files that demonstrate the problem please?

comment:2 Changed 2 years ago by mjo

  • Status changed from infoneeded to new

I haven't figured out how to use Cabal yet, but I think all of the dependencies are listed in doc/README. For the non-test code, I think it's just Vector and Repa3.

git clone http://michael.orlitzky.com/git/spline3.git

comment:3 Changed 2 years ago by simonmar

  • Resolution set to fixed
  • Status changed from new to closed

I successfully compiled the module that failed above (Tetrahedron) with GHC HEAD, after eventually getting all the necessary dependencies. I got stuck compiling further, because I needed repa-io but that didn't compile.

So I'm declaring this one fixed in 7.4.1. Please re-open if you find it doesn't work.

Note: See TracTickets for help on using tickets.