fwts-22.03.00 build fix patch

ivanhu ivan.hu at canonical.com
Tue May 17 08:51:55 UTC 2022


I create a test build for all arch, you can check on
https://launchpad.net/~firmware-testing-team/+archive/ubuntu/scratch/+packages

For the amd64 build log for jammy,
https://launchpadlibrarian.net/601665740/buildlog_ubuntu-jammy-amd64.fwts_22.03.01-0ubuntu1~j_BUILDING.txt.gz


Cheers,
Ivan

On 5/16/22 21:37, orbea wrote:
> Can you please share the build log? Perhaps I can find a better way to
> do something?
>
> On Mon, 16 May 2022 14:48:16 +0800
> ivanhu <ivan.hu at canonical.com> wrote:
>
>> This modification make build fail on my machine.
>>
>>
>> Cheers,
>>
>> Ivan
>>
>> On 5/12/22 00:43, orbea wrote:
>>> Hi,
>>>
>>> When building fwts with slibtool
>>> (https://dev.midipix.org/cross/slibtool) the build fail with
>>> undefined references. This is because the build system is using
>>> -lfoo linker flags for internal dependencies instead of using the
>>> libtool archive (.la) files instead. Additionally there are several
>>> instances of hardcoded pkg-config calls and linker flags in LDFLAGS
>>> rather than LIBADD and LDADD.
>>>
>>> I attached a patch that fixes the issues by doing a few things.
>>>
>>> * Removed hardcoded pkg-config calls and replaced them with
>>>    PKG_CHECK_MODULES as needed.
>>>
>>> * Clearly delimited LDFLAGS from LDADD and LIBADD. Build systems
>>> should only add non-dependency linker flags to LDFLAGS while LDADD
>>> and LIBADD should be for any required dependencies.
>>>
>>> * Removed any -lfoo linker flags for internal dependencies and added
>>>    them as .la files to link the fwts binary which now uses
>>>    -no-undefined. Using -lfoo linker flags should be only for
>>> external dependencies and often results in undefined errors or the
>>> linker flags entirely not found with slibtool. Slibtool is far more
>>> strict about user error than GNU libtool which often silently hides
>>> such issues.
>>>
>>> * Cleared out a few unneeded or redundant linker flags.
>>>
>>> Gentoo bug: https://bugs.gentoo.org/780372
>>>   



More information about the fwts-devel mailing list