fwupdate build fails on i386 with assertion fail ../../bfd/elf32-i386.c:5245

Bug #1510270 reported by Mathieu Trudel-Lapierre
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
binutils
Unknown
Unknown
binutils (Ubuntu)
Fix Released
Undecided
Unassigned
fwupdate (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

fwupdate appears to fail to build on i386 using 2.25.51.20151022-0ubuntu3:

[...]
Preparing to unpack .../binutils_2.25.51.20151022-0ubuntu3_i386.deb ...
Unpacking binutils (2.25.51.20151022-0ubuntu3) over (2.25.1-6ubuntu1) ...
[...]

gcc -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fpic -Wall -fshort-wchar -fno-strict-aliasing -fno-merge-constants -ffreestanding -fno-stack-protector -fno-stack-check --std=c11 -DCONFIG_ia32 -D__KERNEL__ -I/usr/include/efi/ -I/usr/include/efi/ia32/ -iquote/«BUILDDIR»/fwupdate-0.4+git20151015.081427/include "-DDEBUGDIR=L\"/\"" -mno-mmx -mno-sse -mno-red-zone -nostdinc -maccumulate-outgoing-args -m32 -I/usr/lib/gcc/i686-linux-gnu/5/include -c -o fwupdate.o fwupdate.c
fwupdate.c: In function 'allocate':
fwupdate.c:50:10: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
  *addr = (void *)pageaddr;
          ^
In file included from /usr/include/efi/efi.h:35:0,
                 from fwupdate.c:11:
fwupdate.c: In function 'free':
fwupdate.c:63:43: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
  rc = uefi_call_wrapper(BS->FreePages, 2, (EFI_PHYSICAL_ADDRESS)addr,
                                           ^
/usr/include/efi/ia32/efibind.h:283:51: note: in definition of macro 'uefi_call_wrapper'
 #define uefi_call_wrapper(func, va_num, ...) func(__VA_ARGS__)
                                                   ^
fwupdate.c: In function 'apply_capsules':
fwupdate.c:525:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
           (EFI_PHYSICAL_ADDRESS)(VOID *)cbd);
           ^
/usr/include/efi/ia32/efibind.h:283:51: note: in definition of macro 'uefi_call_wrapper'
 #define uefi_call_wrapper(func, va_num, ...) func(__VA_ARGS__)
                                                   ^
fwupdate.c: In function 'read_file':
fwupdate.c:88:4: warning: 'b' may be used uninitialized in this function [-Wmaybe-uninitialized]
    CopyMem(newb, b, bs * n_blocks);
    ^
fwupdate.c: In function 'efi_main':
fwupdate.c:160:3: warning: 'buf' may be used uninitialized in this function [-Wmaybe-uninitialized]
   FreePool(buf);
   ^
fwupdate.c:130:8: note: 'buf' was declared here
  void *buf;
        ^
gcc -nostdlib -Wl,--warn-common -Wl,--no-undefined -Wl,--fatal-warnings -shared -Wl,-Bsymbolic -L/usr/lib -L/usr/lib -Wl,--build-id=sha1 /usr/lib/crt0-efi-ia32.o -shared -o fwupdate.so fwupdate.o -lefi -lgnuefi \
 /usr/lib/gcc/i686-linux-gnu/5/libgcc.a \
 -T elf_ia32_efi.lds
/usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.25.51.20151022 assertion fail ../../bfd/elf32-i386.c:5245
/usr/bin/ld: BFD (GNU Binutils for Ubuntu) 2.25.51.20151022 assertion fail ../../bfd/elf32-i386.c:5245
collect2: error: ld returned 1 exit status
make[3]: *** [fwupdate.so] Error 1

See https://launchpadlibrarian.net/222906940/buildlog_ubuntu-xenial-i386.fwupdate_0.4%2Bgit20151015.081427-0ubuntu3_BUILDING.txt.gz

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Looks similar to bug 1510067, but the upload of binutils -0ubuntu3 in xenial doesn't seem to fix the issue, it will need further investigation.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package binutils - 2.25.51.20151027-0ubuntu1

---------------
binutils (2.25.51.20151027-0ubuntu1) xenial; urgency=medium

  * Snapshot, taken from the trunk 20151027.
    - Fix PR ld/19175. LP: #1510270.

 -- Matthias Klose <email address hidden> Tue, 27 Oct 2015 08:18:33 +0100

Changed in binutils (Ubuntu):
status: New → Fix Released
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Marking as Fix Released for fwupdate too; the binutils change helped. Thanks!

Changed in fwupdate (Ubuntu):
status: New → 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.