arm64 build failure

Bug #2074012 reported by Mitchell Dzurick
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
optee-os (Ubuntu)
Fix Released
Undecided
Mitchell Dzurick

Bug Description

arm64 build is failing in oracular with:

aarch64-linux-gnu-ld.bfd: Error: unable to disambiguate: -specs=/usr/share/dpkg/elf-package-metadata.specs (did you mean --specs=/usr/share/dpkg/elf-package-metadata.specs ?)

Related branches

tags: added: update-excuse
Changed in optee-os (Ubuntu):
assignee: nobody → Mitchell Dzurick (mitchdz)
Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

I think we need a newer binutils version, but I'm not sure right now. Looking at the debian build logs[0] one large difference is that LDFLAGS='' in debian, but is set to LDFLAGS='-Bsymbolic-functions -specs=/usr/share/dpkg/elf-package-metadata.specs' for us.

Thankfully this is easy to reproduce on arm64 hardware, just try building with dpkg.

[0] - https://salsa.debian.org/debian/optee-os/-/jobs/5993951

Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Just installed binutils from -proposed and testing that build now.

Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Tested a build with the new binutils currently in -proposed and still seeing a failure.

$ apt-cache policy binutils-aarch64-linux-gnu
binutils-aarch64-linux-gnu:
  Installed: 2.42.90.20240720-2ubuntu1
  Candidate: 2.42.90.20240720-2ubuntu1
  Version table:
 *** 2.42.90.20240720-2ubuntu1 100
        100 http://eu-north-1c.clouds.ports.ubuntu.com/ubuntu-ports oracular-proposed/main arm64 Packages
        100 /var/lib/dpkg/status

Same exact failure as in the archives.

aarch64-linux-gnu-ld.bfd: Error: unable to disambiguate: -specs=/usr/share/dpkg/elf-package-metadata.specs (did you mean --specs=/usr/share/dpkg/elf-package-metadata.specs ?)

Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

I got a local build working by just removing "-specs=/usr/share/dpkg/elf-package-metadata.specs" from LDFLAGS. I'm not sure at the moment if this is safe to do as I'm not very familiar with this file, but I assume since the debian build does not, it could be fine. Linked a MP on hold with the change and PPA to see if the change also builds in LP.

Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

The package builds, but I'm unsure if it's fine to just not link against the elf-package-metadata.specs. I'm just not familiar enough with that file and the effects of removing it. Some useful information seems to come from[0] about this file, which leads me to believe it's okay to remove, but can make debugging more difficult.

[0] - https://systemd.io/ELF_PACKAGE_METADATA/

Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

Worth to note that I just decided to build 4.2.0 from source on arm64, and it fails with the same exact issue. Therefore, this isn't due to a change in the package itself, but a change in the build environment.

Revision history for this message
Mitchell Dzurick (mitchdz) wrote :

This is fixed in -proposed now.

Changed in optee-os (Ubuntu):
status: New → Fix Committed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package optee-os - 4.3.0-1ubuntu2

---------------
optee-os (4.3.0-1ubuntu2) oracular; urgency=medium

  * d/rules: remove elf-package-metadata.specs from LDFLAGS (LP: #2074012).

 -- Mitchell Dzurick <email address hidden> Wed, 24 Jul 2024 21:42:42 -0700

Changed in optee-os (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.