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

Compile error on 32-bit ARM: debuginfo.cpp:228:33: error: 'L' was not declared in this scope #44254

Closed
fingolfin opened this issue Feb 19, 2022 · 1 comment · Fixed by #44270
Labels
system:arm ARMv7 and AArch64 system:32-bit Affects only 32-bit systems

Comments

@fingolfin
Copy link
Member

While working on updating libjulia_jll for Julia 1.9, I've run into this compiler error:

[16:34:50] /workspace/srcdir/julia/src/debuginfo.cpp: In member function 'void JITObjectRegistry::registerJITObject(const llvm::object::ObjectFile&, std::function<long long unsigned int(const llvm::StringRef&)>, std::function<void*(void*)>)':
[16:34:50] /workspace/srcdir/julia/src/debuginfo.cpp:228:33: error: 'L' was not declared in this scope
[16:34:50]              uint64_t loadaddr = L.getSectionLoadAddress(section);
[16:34:50]                                  ^
[16:34:50] make[1]: *** [Makefile:221: debuginfo.o] Error 1

Looking at the code in question, indeed there is access to a variable L that is not defined. This can be traced back to PR #43664 by @dnadlinger, which replaced

    virtual void _NotifyObjectEmitted(const object::ObjectFile &Object,
                                       const RuntimeDyld::LoadedObjectInfo &L,
                                       RTDyldMemoryManager *memmgr)

by

     void registerJITObject(const object::ObjectFile &Object,
                            std::function<uint64_t(const StringRef &)> getLoadAddress,
                            std::function<void*(void*)> lookupWriteAddress)

yet retained the code section with the offending line

    uint64_t loadaddr = L.getSectionLoadAddress(section);

I don't know enough about this code to guess at how it should be fixed.

Also, it seems CI does not report this because there are no 32bit ARM test being conducted. That's a pity :-(

@dnadlinger
Copy link
Member

Just replacing the call with getLoadAddress should be fine – for non-JITLink platforms, the change is supposed to be just a refactoring.

dnadlinger added a commit to dnadlinger/julia that referenced this issue Feb 19, 2022
This slipped through in 955d427, as we aren't building for
32 bit ARM during CI right now.

GitHub: Fixes JuliaLang#44254.
dnadlinger added a commit to dnadlinger/julia that referenced this issue Feb 20, 2022
This slipped through in 955d427, as we aren't building for
32 bit ARM during CI right now.

GitHub: Fixes JuliaLang#44254.
KristofferC pushed a commit that referenced this issue Feb 23, 2022
This slipped through in 955d427, as we aren't building for
32 bit ARM during CI right now.

GitHub: Fixes #44254.
(cherry picked from commit c9ac2ea)
staticfloat pushed a commit to JuliaCI/julia-buildkite-testing that referenced this issue Mar 2, 2022
This slipped through in 955d427, as we aren't building for
32 bit ARM during CI right now.

GitHub: Fixes JuliaLang#44254.
LilithHafner pushed a commit to LilithHafner/julia that referenced this issue Mar 8, 2022
This slipped through in 955d427, as we aren't building for
32 bit ARM during CI right now.

GitHub: Fixes JuliaLang#44254.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
system:arm ARMv7 and AArch64 system:32-bit Affects only 32-bit systems
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants