webkit build fails on binutils limitation

Bug #1043507 reported by Sebastien Bacher
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
binutils
Invalid
Medium
binutils (Ubuntu)
Invalid
Medium
Unassigned
make-dfsg (Ubuntu)
Confirmed
Undecided
Unassigned
webkit (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Seems like the amd64 build for webkit on quantal hits http://sourceware.org/bugzilla/show_bug.cgi?id=14302 ... can we get the fix backported?

Revision history for this message
Sebastien Bacher (seb128) wrote :
Revision history for this message
Steve Langasek (vorlon) wrote :

The upstream bug refers to a 32-bit-only issue: on amd64, size_t (et al.) are 64-bit, so have no 4GB limit. So the upstream patch should have no effect at all on amd64.

Changed in binutils (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Matthias Klose (doko) wrote :

does the build succeed with binutils 2.22?

Revision history for this message
Sebastien Bacher (seb128) wrote :

No, it's still an issue on current quantal
https://launchpadlibrarian.net/114802531/buildlog_ubuntu-quantal-amd64.webkit_1.9.91-0ubuntu1~build1_FAILEDTOBUILD.txt.gz

with
"Get:26 http://ftpmaster.internal/ubuntu/ quantal/main binutils amd64 2.22.90.20120816-2ubuntu1 [2384 kB]"

Revision history for this message
Matthias Klose (doko) wrote :

- asking again, does this build with 2.22?
- where can the webkit version 1.9.91 be found?

Changed in binutils (Ubuntu):
status: New → Incomplete
Revision history for this message
Matthias Klose (doko) wrote :

trying to reproduce this ...

make[1]: execvp: /bin/bash: Argument list too long
make[1]: *** [libWebCore.la] Error 127
make[1]: Leaving directory `/home/packages/tmp/webkit-1.9.91/build-2.0'
make: *** [build-stamp] Error 2

honestly, this webkit build sucks :-/

and it should support DEB_BUILD_OPTIONS=parallel=<n>

Revision history for this message
Iain Lane (laney) wrote :

I backported this patch

  http://code.metager.de/source/xref/WebKit/Tools/gtk/patches/make-3.82-arg-list-length.patch

to a local build of make-dfsg (to get past the error you got), and tried to build webkit from

  https://launchpad.net/~ubuntu-desktop/+archive/ppa/+packages

but it fails with

  ar: .libs/libWebCore.a: File truncated
  make[1]: *** [libWebCore.la] Error 1
  make[1]: Leaving directory `/home/ubuntu/webkit-1.9.91/build-2.0'

  ubuntu@server-16875:~/webkit-1.9.91$ apt-cache policy binutils
  binutils:
    Installed: 2.22.90.20120919-0ubuntu1
    Candidate: 2.22.90.20120919-0ubuntu1
    Version table:
   *** 2.22.90.20120919-0ubuntu1 0
          500 http://nova.clouds.archive.ubuntu.com/ubuntu/ quantal/main amd64 Packages
          100 /var/lib/dpkg/status

Revision history for this message
Iain Lane (laney) wrote :

If you filter out -g from CFLAGS, the .a isn't too large and webkit builds successfully. I'm not sure this is a viable solution for the archive though. I suppose splitting libWebCore up into multiple smaller libraries would solve both problems, but that would require diving into webkit's build system...

Revision history for this message
Matthias Klose (doko) wrote :

might be worth building with -gstabs instead of -g to avoid building without -g at all.

Revision history for this message
Matthias Klose (doko) wrote :

is the make patch included in upstream make (trunk)?

Revision history for this message
Iain Lane (laney) wrote :

I'm trying a -gstabs build right now. Just checked, the patch isn't in trunk sadly. I'm not aware if anyone has proposed it.

Revision history for this message
Matthias Klose (doko) wrote :

checked that the binutils in the ubuntu-toolchain-r PPA doesn't show this ar issue.

Changed in binutils (Ubuntu):
status: Incomplete → In Progress
Revision history for this message
In , Matthias Klose (doko) wrote :

seen with a webkit-1.91 build on x86_64-linux-gnu, works with 2.22 from the release branch, fails with the 2.23 branch and trunk.

ar: .libs/libWebCore.a: File truncated
make[1]: *** [libWebCore.la] Error 1

to reproduce with the tarball from
http://people.debian.org/~doko/tmp/build.tar.xz

mkdir -p .libs
rm -f .libs/libWebCore.a
sh ar.sh

Revision history for this message
In , Alan Modra (amodra-gmail) wrote :

You're running into archive.c:2661
   /* Catch an attempt to grow an archive past its 4Gb limit. */
   if (archive_member_file_ptr != (file_ptr) offset)
     {
       bfd_set_error (bfd_error_file_truncated);
       return FALSE;
     }
   if (!bfd_write_bigendian_4byte_int (arch, offset))
     return FALSE;

Previous versions of binutils created invalid armaps. We can't do much about this problem without changing archive format for x86_64. I suppose that is a possibility.

If you just want an archive for packaging purposes as distinct from using the archive as a linker input, then you can work around this problem by disabling the armap with ar's S option.

I'm closing this bug report as invalid since the archive format simply doesn't support such large archives. Please take any discussion (patches!) regarding changing archive format to the binutils list.

Revision history for this message
Matthias Klose (doko) wrote :

according to upstream, >4G archives suiteable for the linker are not supported (and were not before, but accepted).

Changed in binutils (Ubuntu):
status: In Progress → Invalid
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in make (Ubuntu):
status: New → Confirmed
Changed in webkit (Ubuntu):
status: New → Confirmed
Changed in binutils:
importance: Unknown → Medium
status: Unknown → Invalid
Logan Rosen (logan)
affects: make (Ubuntu) → make-dfsg (Ubuntu)
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.