Mail archive
alpine-devel

Re: [alpine-devel] Porting Alpine scripts

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

On Sun, 22 Jan 2017 18:46:52 -0500
"Tuan M. Hoang" <tmhoang_at_flatglobe.org> 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 libc.musl-x86_64.so.1 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:
-subpackages="$pkgname-dev"
+subpackages="$pkgname-dev::$CBUILD_ARCH"

Cheers,
Timo


---
Unsubscribe:  alpine-devel+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-devel+help_at_lists.alpinelinux.org
---
Received on Fri Jan 27 2017 - 09:00:54 UTC