Opened 15 months ago

Closed 6 months ago

#8798 closed bug (worksforme)

Missing symbols with -fprof-auto-calls

Reported by: edsko Owned by:
Priority: normal Milestone: 7.10.1
Component: Compiler Version: 7.6.3
Keywords: Cc: michael@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: Differential Revisions:

Description

To reproduce: in an empty environment (no packages installed), run

cabal install --only-dependencies --enable-library-profiling --ghc-option=-fprof-auto-calls

for the attached test case. This will seem to work okay (no errors), but if you then do

cabal configure --enable-executable-profiling --enable-library-profiling --ghc-option=-fprof-auto-calls

then

cabal build

will fail with

Building autocallsbug-0.1.0.0...
Preprocessing executable 'autocallsbug' for autocallsbug-0.1.0.0...
[1 of 1] Compiling Main             ( Main.hs, dist/build/autocallsbug/autocallsbug-tmp/Main.p_o )
Linking dist/build/autocallsbug/autocallsbug ...
Undefined symbols for architecture x86_64:
  "_attoparseczm0zi11zi1zi0_DataziAttoparsecziInternalziTypes_manyzimanyzuv_Cb_cc", referenced from:
      _sR1Q_info in libHSxml-conduit-1.1.0.9_p.a(Parse.p_o)
      _sR5p_info in libHSxml-conduit-1.1.0.9_p.a(Parse.p_o)
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status

(Haven't yet confirmed with 7.8RC1 because that failed to build on my system; reported separately.)

Attachments (1)

autocallsbug-0.1.0.0.tar.gz (1.4 KB) - added by edsko 15 months ago.

Download all attachments as: .zip

Change History (6)

Changed 15 months ago by edsko

comment:1 Changed 15 months ago by snoyberg

  • Cc michael@… added

comment:2 Changed 15 months ago by rwbarton

I can reproduce this in 7.8. The error from the Linux linker is a little more informative:

Building autocallsbug-0.1.0.0...
Preprocessing executable 'autocallsbug' for autocallsbug-0.1.0.0...
[1 of 1] Compiling Main             ( Main.hs, dist/build/autocallsbug/autocallsbug-tmp/Main.p_o )
Linking dist/build/autocallsbug/autocallsbug ...
/home/rwbarton/.cabal/lib/x86_64-linux-ghc-7.8.0.20140204/xml-conduit-1.1.0.9/libHSxml-conduit-1.1.0.9_p.a(Parse.p_o): In function `c1noU_info':
/tmp/ghc14255_0/ghc14255_28.p_o:(.text+0x8ca17): undefined reference to `attoparseczm0zi11zi1zi0_DataziAttoparsecziInternalziTypes_manyzimanyzuv_Cb_cc'
/home/rwbarton/.cabal/lib/x86_64-linux-ghc-7.8.0.20140204/xml-conduit-1.1.0.9/libHSxml-conduit-1.1.0.9_p.a(Parse.p_o): In function `c1oKY_info':
/tmp/ghc14255_0/ghc14255_28.p_o:(.text+0x9619f): undefined reference to `attoparseczm0zi11zi1zi0_DataziAttoparsecziInternalziTypes_manyzimanyzuv_Cb_cc'
collect2: error: ld returned 1 exit status

(Oops, it's not actually more informative, I guess I'm just more used to reading this format.)

Last edited 15 months ago by rwbarton (previous) (diff)

comment:3 Changed 11 months ago by rwbarton

  • Status changed from new to infoneeded

I can't reproduce this any more in 7.8.1. I had to add an import for runResourceT and add resourcet to the cabal file, and I am using a sandbox for unrelated reasons, but I don't think that matters. Not sure if this is because the bug was fixed in 7.8.1 or the issue happened to go away due to building against newer versions of the dependencies. Can you reconstruct the versions of all the dependencies that were used when you reported this?

comment:4 Changed 11 months ago by thoughtpolice

  • Milestone set to 7.10.1

Moving to 7.10.1.

comment:5 Changed 6 months ago by thomie

  • Resolution set to worksforme
  • Status changed from infoneeded to closed

edsko: please re-open if you can reproduce with 7.8 or later, thanks.

Note: See TracTickets for help on using tickets.