Mail archive

Re: [alpine-devel] Can't build apk-tools

From: Timo Teras <>
Date: Mon, 17 Jun 2013 11:52:46 +0300

On Sun, 16 Jun 2013 20:47:22 -0400
Dubiousjim <> wrote:

> I'm a bit perplexed how to build apk-tools by hand, either using
> aports/abuild, or using git:// Some
> months ago, I noticed that the aports/abuild method would work but
> doing "make" in a git repo wouldn't. I made sure to invoke make using
> the same CFLAGS and LDFLAGS that are set in my /etc/abuild.conf:
> CARCH=x86
> CBUILD=i486-alpine-linux-uclibc
> export CFLAGS="-Os -fomit-frame-pointer"
> export LDFLAGS="-Wl,--as-needed"
> but that didn't seem to be enough. I'd still get a bunch of linking
> errors about "undefined reference to `__stack_chk_fail_local'".
> Googling suggested that the problem may be connected to the fact that
> LD is set to "ld" in apk-tools' Make.rules file, rather than to
> "gcc". It also suggested disabling stash-smashing protection with
> -fno-stack-protector. That didn't seem to be the right final
> solution, but by using one of these or the other, I was able to build
> from a git repo. As I said, at this point going to main/apk-tools in
> an aports tree and saying "abuild -r" worked fine.

That's weird. Works here nicely. What gcc/libc you are using?

It might be due to using 'ld' and not 'gcc' for link. Or mixing object
files built with different gcc flags. Or gcc spec file mismatching the
libc build options.

Is your libc standard, or self-built with different config?

Received on Mon Jun 17 2013 - 11:52:46 UTC