The packages were rebuilt in Alpine, so update the checksums. Also
point to a deterministic mirror URL instead of CDN, so it won't randomly
fail depending on which (possibly outdated) mirror CDN gives.
Related: pmbootstrap!1963
Bring the GCC packages up to date with upstream.
This adds a patch for time64 compatible futext syscall, it is needed for musl 1.2
which makes our little phones works after 2038.
Upstream commits:
- c6536bc29a
- 30ddf1b3c4
[ci:skip-build]
Signed-off-by: Danct12 <danct12@disroot.org>
Bring the GCC packages up to date with upstream.
Fixes libstdc++ unsatisfiable constrains related error messages.
Upstream commits:
- 1069d8331c
- e296f565db
[ci:skip-build]
It seems "makeinfo" from "texinfo" package is required during the build
now, so simply add this to makedepends line on all APKBUILDs.
[ci:skip-vercheck]
Make the version match Alpine's gcc again. Fixes libstdc++ unsatisfiable
constrains related error messages (because the libstdc++ generated by
these cross-* packages has the same pkgver and pkgrel again as the one
provided by Alpine's gcc package).
[ci:skip-build]
Use the native rustc cross compiler where possible, and fall back to the
qemu rustc if necessary. This should improve speed and reliability.
Without this patch, building squeekbox 1.4.0 for aarch64 with the
pmbootstrap stack just hangs forever.
Related: pmbootstrap#1861
Alpine made some minor modifications to the gcc aport, without
changing the version. Let's adjust the pmaports too, so we stay in
sync. [ci:skip-vercheck]
Related: 97a2b093b1
The last update of the binutils-* pmaports were not made with the latest
pmbootstrap version, which has the additional empty line remved in the
generated aports. Fix this, so we get an empty diff when running
aportgen, unless the binutils version was changed in Alpine.
[ci:skip-build], [ci:skip-vercheck]
[ci:skip-build]: will not finish in time and does not build with --strict
because of an abuild bug that will be fixed in the next abuild release by
this patch:
c54d39d8aa
Rebuild all other GCC packages against mpfr4, so they don't fail with:
Error loading shared library libmpfr.so.4: No such file or directory (needed by /usr/gcc4/libexec/gcc/x86_64-alpine-linux-musl/4.9.2/cc1)
[ci:skip-build]: won't finish in time
Related: 2b32ed3a48786fa151cad8f920e5d9997bee94ed in Alpine's aports.git
Rebuild to make it use the new armhf triplet. Otherwise cross compiling
with crossdirect to armhf fails with:
ERROR: crossdirect: failed to execute /native/usr/lib/ccache/bin/armv6-alpine-linux-muslgnueabihf-gcc: No such file or directory
This finally fixes#295.
Rebuild to make it use the new armhf triplet. Otherwise cross compiling
with crossdirect to armhf fails with:
ccache: error: Could not find compiler "armv6-alpine-linux-muslgnueabihf-gcc" in PATH
Related: #295
Upgrading binutils-armhf was blocked, after the armhf triplet had been
renamed and gcc-armhf still had the old triplet. Now gcc-armhf was
upgraded. When trying to the upgraded build gcc-armhf with the current
set of binary packages, without updating binutils-armhf, it fails with:
configure: error: cannot compute suffix of object files: cannot compile
So let's upgrade binutils-armhf too and finally have the triplet of both
programs in sync again \o/
Related: #295
Make the version match Alpine's gcc again. Fixes libstdc++ unsatisfiable
constrains related error messages (because the libstdc++ generated by
these cross-* packages has the same pkgver and pkgrel again as the one
provided by Alpine's gcc package).
[ci:skip-build]: won't finish in time
The upstream compat test case will still fail after this, there are more
issues that need to be resolved. I'm on it.
Latest version from Alpine. I've checked that we can still compile
packages for armhf after this update, in other words that we don't get
a regression related to the triplet change like in #295.
This reverts commit 593fe01bb8.
Binaries in binutils-armhf etc. break the build system:
Error loading shared library libopcodes-2.32.so: Exec format error (needed by /usr/bin/as)
Error loading shared library libbfd-2.32.so: Exec format error (needed by /usr/bin/as)
Error loading shared library libz.so.1: Exec format error (needed by /usr/bin/as)
Error relocating /usr/bin/as: bfd_errmsg: symbol not found
Error relocating /usr/bin/as: deflateEnd: symbol not found
Error relocating /usr/bin/as: bfd_arch_bits_per_address: symbol not found
Error relocating /usr/bin/as: bfd_set_error_program_name: symbol not found
Error relocating /usr/bin/as: xcalloc: symbol not found
Reverting for now. The upstream compatibility CI test is expected to fail.
The postmarketOS binary repositories still have the old binutils package.
I'm analyzing this issue in #295.
[ci:skip-vercheck]: package downgrade
This package should use the pmb:strict option, in order to force
pmbootstrap to always build it in strict mode. Otherwise it can have
a conflict with packages installed earlier.
I've just noticed that the merged patch was still using the early name
of the option, "pmbootstrap-strict". It was later changed to
"pmb:strict" in the related pmbootstrap!1771 merge request, for
consistency with !pmb:kconfig-check. Fix grub-x86 to use the proper
option name.
[ci:skip-vercheck]: version bump not needed
Adjust the depends of the GCC-8 cross compiler packages after the change
from pmbootstrap!1778. This does not have any effect (since the GCC-8
aports don't have !tracedeps in options, in contrary to the other GCC
aports we ship). But it makes sure that we don't get any changes after
running the repository maintenance script from here:
https://wiki.postmarketos.org/wiki/Repository_maintenance
[ci:skip-build]: cosmetic change, build would take too long anyway
Explicitly depend on mpc1. Our generated gcc aports use the !tracedeps
option, so we need to explicitly set the libraries it depends on.
This has mostly not been an issue, as we are installing our gcc
packages together with Alpine's gcc package, which causes the libraries
to get installed anyway.
Fixes#236.
[ci:skip-build]: takes too long to build.
Cross linker (e.g. ld from binutils-armhf) does not support any method
of setting additional link paths, and this causes problems when building
various packages. Work around this problem by calling the qemu binary
instead of the cross binary from the native chroot, whenever we are
linking.
I have tested that this allows successfully building hello-world,
coreinfo, libhybris for armhf. So this fixes#227 and fixes#228.
Regarding performance, this is the same way as distcc does it. We would
get a performance gain if we were able to use the cross-linker. But so
far I could not figure out how to patch the binutils source to make it
work like we want to have it. Maybe I'll ask on some binutils mailing
list for advice. In the meantime, this workaround should make
crossdirect work for all use-cases, and it is still faster than the
previous distcc setup, because we can avoid the overhead of setting up
and running a ssh server locally to work around missing authentication
in distcc (see pmbootstrap!1649). Let's test this for some more time,
and then make a pmbootstrap release that rolls out crossdirect for
everyone.
This device is x86_64 and has a 32-bit UEFI, so I need to install
32-bit grub (AFAIK it's the only bootloader capable of loading a 64-bit
kernel from 32-bit).
The grub-efi-x86 package has been generated with pmbootstrap.
Instead of running compilers directly, let them go through the native
ccache binary. Note that it will still use the foreign arches cache dir
because the native cache dir would be at /native/home/pmos/.ccache.
Use execve instead of setenv and execv, because that didn't work with
LD_LIBRARY_PATH (ccache was complaining that it couldn't load zlib).
Enable -Werror, because we are maintaining this program and it helps
us catching bugs early.
Create symlinks for all supported arches (armhf, armv7, aarch64, x86_64,
x86), not only armhf and aarch64. Skip creating symlinks for the arch
that the package gets built for, so we can include x86_64 in the list
without conflicting with the ccache package from Alpine.
Link to ../../../bin/ccache instead of /usr/bin/ccache, so it works
properly with crossdirect (where we mount the native chroot to /native
in the foreign chroot).
Add symlinks for clang and clang++.
A set of wrapper executables that launch native cross compilers inside
foreign chroots. Speeds up cross compilation a lot, compared to the
distcc-sshd method.
Make it possible to build old kernels with gcc4 for armv7 and aarch64.
The packages have been generated with (as usually):
$ pmbootstrap aportgen gcc4-aarch64 gcc4-armv7
[ci:skip-build]: I have tested that this builds locally.
Fixes#193.
Successfully tested both the gcc4 compiler on x86_64 with a simple
program (fbdebug) and the gcc4-armhf cross-compiler to build a very old
u-boot port for Galaxy Nexus (a MR will follow soon) which failed to
boot with either newer version (6 and 8).
[skip ci]: already went through
Run 'pmbootstrap aportgen gcc6-aarch64 gcc6-armhf' again and commit
the resulting changes, as these packages are meant to be always
auto-generated and therefore in sync with main/gcc6.
This changes the pkgver to 9999, as it was required in main/gcc6 to
avoid conflicts with Alpine's gcc6 package.
Regenerate these aports, so the test case does not complain anymore
that they are outdated. Adds armv7 to the arch lines, as that is the
aportgen change which was done in pmbootstrap!1730.
These can be manually generated when one really wants to cross compile
from arm to x86_64. Usually this is not needed, so let's save the
compile time. [skip ci]
This covers most use cases and saves a lot of build time. Can be
changed on demand. Again, this simplifies package building as part of
the new build infrastructure effort. [skip ci]
I thought only having specific symlinks was enough, and it was for one
kernel. However, to make sure it works with all kernels, let's just add
symlinks for all the binutils.
Overview:
In order to execute foreign arch binaries on the host system, we are
using the Linux kernel's binfmt_misc feature in combination with
static builds of QEMU. Before this patch, the statically compiled
QEMU binaries were taken from Debian (mostly because I did not realize
that Alpine ships them as well). Now we can use the ones from the aport.
Benefits:
This allows us to easily update and patch the QEMU executables, we
don't need to be in sync with Debian's versions anymore.
Alpine's package is more modular, so we can save some download,
install, zap time, as well as disk space: setting up an armhf chroot
with pmbootstrap took ~102 MB before, now it's ~18 MB.
Detailed changes:
* Remove `cross/qemu-user-static-repack` aport
* Add `data/qemu-user-binfmt.txt` with the binfmt_misc flags for ELF
binaries of various arches (extracted from Debian's packaging)
* When parsing that file, don't write verbose messages to
`pmbootstrap log` anymore, only to the verbose log (can be enabled
with `pmbootstrap -v`)
* Rename `pmb.parse.arch.alpine_to_debian()` to ...`alpine_to_qemu()`
* Rename `arch_debian` to `arch_qemu`
Due to changes in abuild, our `gcc-armhf` etc. packages did not build
when using strict mode (i.e. `pmbootstrap build --strict gcc-armhf`)
anymore.
Changes:
* Set `CBUILDDIR=/`, so apk can read a valid package index from there
* Directly set `_cross_configure`, so it does not use CBUILDDIR anymore
* Set `BOOTSTRAP="nobuildbase"` to prevent apk from installing
`build-base-armhf` etc. (these don't exist in pmOS)
* Remove legacy code for lazy reproducible builds that wrapped
`package()`
Example: Building gcc-armhf for armhf does not make sense, so this
commit changes arch="all" to arch="aarch64 x86_64". This helps to
simplify the repository scripts (#970).
Also don't build "-repack" packages in native chroot anymore.
This was a legacy hack, which has no use anymore, and it prevented
the package from being built for different architectures.
* ccache: Fix for distcc cross-compiling / various improvements
* Make ccache work when cross-compiling with distcc (fix#716)
* Allow to configure the ccache size in "pmbootstrap init"
* Moved ccache stats code from pmb/build/other.py to
pmb/helpers/frontend.py
* Grouped job count, ccache size and timestamp based rebuilds
together to "build options" and allow to skip them
* Sorted config options that had to be modified anyway
alphabetically
* Improve comment in arch-bin-masquerade APKBUILD
This fixes https://github.com/postmarketOS/binary-package-repo/issues/1
GCC generates hardlinks between files `A` and `B` in its `make install` step. The problem is, that `tar` randomly packages `A` as full binary, and links `B` to `A`, or the other way around! I was able to reproduce this issue consistently when re-building `gcc-aarch64` on Travis CI (interestingly, this did not appear for `gcc-armhf`).
The fix is, to delete `B` and create a symlink `B` that points to `A` instead.