Mail archive

Re: [alpine-devel] Porting Alpine scripts

From: Timo Teras <>
Date: Fri, 27 Jan 2017 09:00:54 +0200

On Sun, 22 Jan 2017 18:46:52 -0500
"Tuan M. Hoang" <> wrote:

> I am currently having two issues, hope you can take some time to see
> it.
> 1. I was running Alpine s390x in Docker with some essential
> cross-compiled packages targeting s390x, in order to compile natively
> the toolchains. It all boils down to missing perl package as
> compile-time dependency. Perl cannot be cross-compiled, yet is needed
> for native compile. When I try to compile perl natively (inside either
> Docker or a chroot), I had segmentation fault on running fakeroot.

Yes, we also native build perl. It's a pain to cross-compile.
> Just wonder if this is the correct way you did and segmentation fault
> is only my thing.

If fakeroot segfaults you'll end up in trouble sooner or later. It'd be
good to fix that. Do you have strace or gdb backtrace of the crash?

> 2. I was having an error when building linux-vanilla-dev ( with above
> kernel config ). When running $ make in dev() in APKBUILD, HOSTCC
> compiles some scripts in "$srcdir"/linux-$_kernver/scripts directory
> into host arch (x86_64) object/exec files. These files were later get
> copied into "$subpkgdir"/usr/src/linux-headers-${_abi_release}
> (aports/main/linux-vanilla/pkg/linux-vanilla-dev/usr/src/linux-headers-4.4.34).
> Then comes up in as a needed .so file in later
> steps (scan_shared_objects() function). This happens for
> linux-vanilla-dev package, while bootstraping both aarch64, and s390x
> using aports master.

This is tricky. Should the -dev package be built for the target or for
the build host. When cross-compiling it should probably be built for
the build host. Because it will probably be used to build the modules
too. Maybe the following change in linux-vanilla will fix it:


Received on Fri Jan 27 2017 - 09:00:54 UTC