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

ld: sectionForAddress(0x1DD10) address not in any section file error #135

Open
roberth opened this issue Apr 26, 2022 · 0 comments
Open
Labels

Comments

@roberth
Copy link
Collaborator

roberth commented Apr 26, 2022

Today I refactored some code and forgot to remove the C.context and C.include calls from a file when I moved all the inline-c/inline-c-cpp invocations to another module.
The build then failed on darwin with:

ld: sectionForAddress(0x1DD10) address not in any section file 'dist/build/hercules-ci-agent-worker/hercules-ci-agent-worker-tmp/Hercules/Agent/Worker.o' for architecture x86_64
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
`cc' failed in phase `Linker'. (Exit code: 1)

The solution was to remove C.context and C.include from the module that didn't need them anymore.

Ideally inline-c could raise an error when it's not actually used in a module. I don't know if that's feasible. Perhaps the error itself can be prevented? It doesn't happen on Linux. This may be a GHC bug.

Seems like a low priority bug.

@roberth roberth added the bug label Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant