Skip to content

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

Closed
@fingolfin

Description

@fingolfin

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 :-(

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