Skip to content

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

Description

@roberth

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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions