Bug 28194

Summary: confirm cross-building works
Product: elfutils Reporter: Frank Ch. Eigler <fche>
Component: debuginfodAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: elfutils-devel, erico.erc+sourcewarebugzilla, mark
Priority: P2    
Version: unspecified   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Frank Ch. Eigler 2021-08-05 15:11:32 UTC
There are some reports that debuginfod client and/or server parts of elfutils may not build correctly when configured in a cross-arch mode, so people are advised to disable it:

https://www.linuxfromscratch.org/~thomas/multilib/chapter08/libelf.html

% CC="gcc -m32" ./configure \
    --host=i686-pc-linux-gnu \
    --prefix=/usr            \
    --libdir=/usr/lib32      \
    --disable-debuginfod     \
    --enable-libdebuginfod=dummy

This sort of build should also work and/or be automagically disabled, rather than require the manual configury flagging.
Comment 1 erico.erc+sourcewarebugzilla 2021-08-05 17:20:22 UTC
They suggest the same settings for native compilation:

% ./configure --prefix=/usr                \
            --disable-debuginfod         \
            --enable-libdebuginfod=dummy

I think this is just to simplify the bootstrap path, since otherwise elfutils requires a lot of dependencies.

I haven't noticed any issues when cross compiling.
Comment 2 Mark Wielaard 2022-04-24 16:06:39 UTC
I can confirm that on x86_64 fedora, with all i386 devel packages installed the following configure/build works and passes all tests:

CC="gcc -m32" CXX="g++ -m32" ./configure --host=i686-pc-linux-gnu --enable-debuginfod && make -j8 && make check -j8

============================================================================
Testsuite summary for elfutils 0.186
============================================================================
# TOTAL: 255
# PASS:  249
# SKIP:  6
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================