Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linker error when compiling with --trace/--profile #2422

Closed
cocreature opened this issue Aug 1, 2016 · 3 comments
Closed

Linker error when compiling with --trace/--profile #2422

cocreature opened this issue Aug 1, 2016 · 3 comments

Comments

@cocreature
Copy link
Contributor

Steps to reproduce:

  1. git clone [email protected]:cocreature/postgres-tmp.git -b stack-bug
  2. `stack build --trace

I strongly suspect that the state of the snapshot is also important but I don’t want to nuke it away just yet since I might be able to provide helpful information from it.

Expected:

A clean build

Actual:

Linking .stack-work/dist/x86_64-linux/Cabal-1.24.0.0/build/hasql-bug/hasql-bug ...
/home/moritz/.stack/snapshots/x86_64-linux/nightly-2016-07-17/8.0.1/lib/x86_64-linux-ghc-8.0.1/uuid-types-1.0.3-1qmdgBeDGlbCUibOmxVGqx/libHSuuid-types-1.0.3-1qmdgBeDGlbCUibOmxVGqx_p.a(Internal.p_o):(.text+0x3aa60): undefined reference to `textzm1zi2zi2zi1zm5QpmrLQApEZZ4Ly9nMHWY0s_DataziTextziInternalziFusion_unstreamzsresizze_dFTV_cc'
/home/moritz/.stack/snapshots/x86_64-linux/nightly-2016-07-17/8.0.1/lib/x86_64-linux-ghc-8.0.1/uuid-types-1.0.3-1qmdgBeDGlbCUibOmxVGqx/libHSuuid-types-1.0.3-1qmdgBeDGlbCUibOmxVGqx_p.a(Internal.p_o):(.text+0x3ad63): undefined reference to `textzm1zi2zi2zi1zm5QpmrLQApEZZ4Ly9nMHWY0s_DataziTextziArray_maBA_Cd18_cc'
/home/moritz/.stack/snapshots/x86_64-linux/nightly-2016-07-17/8.0.1/lib/x86_64-linux-ghc-8.0.1/uuid-types-1.0.3-1qmdgBeDGlbCUibOmxVGqx/libHSuuid-types-1.0.3-1qmdgBeDGlbCUibOmxVGqx_p.a(Internal.p_o):(.text+0x3b03a): undefined reference to `textzm1zi2zi2zi1zm5QpmrLQApEZZ4Ly9nMHWY0s_DataziTextziArray_maBA_Cd18_cc'
collect2: error: ld returned 1 exit status

Comments

Sometimes I am able to fix it by some combination of stack clean/nuking .stack-work and unregistering the corresponding packages (in this case uuid-types) but that doesn’t seem to help in all cases.

So far I’ve solved this by nuking the snapshot and .stack-work but for the sake of finally fixing it I haven’t done this this time so that I can provide any other information that might be necessary.

@sjakobi
Copy link
Member

sjakobi commented Aug 9, 2016

Thanks, but I can't reproduce this with either v1.1.2 or the current HEAD.

I suspect it's related to #1691.

@nh2
Copy link
Collaborator

nh2 commented Feb 4, 2019

There's also some chance that this is due to an interrupted build: https://github.com/lehins/exec-kill-loop

@snoyberg
Copy link
Contributor

Since we don't have a clear repro, and this may be caused by an upstream issue, closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants