~alpine/devel

4 3

[alpine-devel] How to cross build APK?

Magicloud Magiclouds <magicloud.magiclouds@gmail.com>
Details
Message ID
<CABErt4dN3gGtbe-8cSzXhXQaxPmB6bQv9_AVB-+oTNuztMWG1Q@mail.gmail.com>
Sender timestamp
1550676835
DKIM signature
missing
Download raw message
Hi,

I am trying to make an APK to address a requirement on RPI3. But my
working machine is X86_64. `abuild -r` only generates x86_64 package
and APKINDEX.

I tried to set `CTARGET` and `CHOST` to aarch64, then ran `abuild -r`. I got:

```
>>> my_apk: Analyzing dependencies...
ERROR: unsatisfiable constraints:
  build-base-aarch64 (missing):
    required by: .makedepends-my_apk-0[build-base-aarch64]
>>> ERROR: headless: builddeps failed
```

On pkgs.alpinelinux.org, I see only build-base package for each arch.
No such exact name.

What should I do? Since the content of the package is just shell
script, I do not even need gcc or so.

Thanks.
--
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<20190220153621.GD1587@homura.localdomain>
In-Reply-To
<CABErt4dN3gGtbe-8cSzXhXQaxPmB6bQv9_AVB-+oTNuztMWG1Q@mail.gmail.com> (view parent)
Sender timestamp
1550676981
DKIM signature
missing
Download raw message
Have a read through scripts/bootstrap.sh, which can set up a
cross-compiler and sysroot for another arch to build APKs with.


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Magicloud Magiclouds <magicloud.magiclouds@gmail.com>
Details
Message ID
<CABErt4e-WPxynjFJMv6raAi+ECK8F_rQxEDrK+jr-Wtgh5M0_g@mail.gmail.com>
In-Reply-To
<20190220153621.GD1587@homura.localdomain> (view parent)
Sender timestamp
1550740471
DKIM signature
missing
Download raw message
Hi,

So I got bootstrap.sh worked, it built some tools like
`build-base-aarch64-0.5-r1.apk`. And continued building some other
tools.

Then I modified the script, replaced the last part of building a bunch
of packages, with `CHOST=$TARGET_ARCH BOOTSTRAP=bootimage
APKBUILD="$(apkbuildname "${2}")" abuild -vr`. And found that it
cannot build non-main repos.

```
abuild-apk add --quiet --simulate --wait 30 --repository
/home/me/packages//community --virtual .makedepends-my_pkg
build-base-aarch64
ERROR: unsatisfiable constraints:
  build-base-aarch64 (missing):
    required by: .makedepends-my_pkg-0[build-base-aarch64]
```

If I put my_pkg in community repos in aports, I got above error. I
think the failure is because of build-base-aarch64 is in main, but
abuild-apk did not use it.

On Wed, Feb 20, 2019 at 11:36 PM Drew DeVault <sir@cmpwn.com> wrote:
>
> Have a read through scripts/bootstrap.sh, which can set up a
> cross-compiler and sysroot for another arch to build APKs with.



-- 
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<4cebd1b1-d8ef-c70e-01e2-286f3a5be80f@linux.vnet.ibm.com>
In-Reply-To
<CABErt4e-WPxynjFJMv6raAi+ECK8F_rQxEDrK+jr-Wtgh5M0_g@mail.gmail.com> (view parent)
Sender timestamp
1551106591
DKIM signature
missing
Download raw message
It's been a while since I used bootstrap.sh so I might be wrong.

On 2/21/19 10:14 AM, Magicloud Magiclouds wrote:
> 
> Then I modified the script, replaced the last part of building a bunch
> of packages, with `CHOST=$TARGET_ARCH BOOTSTRAP=bootimage
> APKBUILD="$(apkbuildname "${2}")" abuild -vr`. And found that it
> cannot build non-main repos.
> 

It could. See 'for PKG' loop at line 98.

> ```
> abuild-apk add --quiet --simulate --wait 30 --repository
> /home/me/packages//community --virtual .makedepends-my_pkg
> build-base-aarch64
> ERROR: unsatisfiable constraints:
>   build-base-aarch64 (missing):
>     required by: .makedepends-my_pkg-0[build-base-aarch64]
> ```
> 
> If I put my_pkg in community repos in aports, I got above error. I
> think the failure is because of build-base-aarch64 is in main, but
> abuild-apk did not use it.

You are installing a package from main (build-base) while specifying the community repo with --repository flag.

Cheers,



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Magicloud Magiclouds <magicloud.magiclouds@gmail.com>
Details
Message ID
<CABErt4ec4mX8FgJwPk+x-83C7XTx-21qJSbybYRoybqjFPpzbQ@mail.gmail.com>
In-Reply-To
<4cebd1b1-d8ef-c70e-01e2-286f3a5be80f@linux.vnet.ibm.com> (view parent)
Sender timestamp
1551159520
DKIM signature
missing
Download raw message
Hi,

I see. Forgot the "community/PKGNAME" usage. Thanks.

On Mon, Feb 25, 2019 at 10:57 PM Tuan Hoang <tmhoang@linux.vnet.ibm.com> wrote:
>
> It's been a while since I used bootstrap.sh so I might be wrong.
>
> On 2/21/19 10:14 AM, Magicloud Magiclouds wrote:
> >
> > Then I modified the script, replaced the last part of building a bunch
> > of packages, with `CHOST=$TARGET_ARCH BOOTSTRAP=bootimage
> > APKBUILD="$(apkbuildname "${2}")" abuild -vr`. And found that it
> > cannot build non-main repos.
> >
>
> It could. See 'for PKG' loop at line 98.
>
> > ```
> > abuild-apk add --quiet --simulate --wait 30 --repository
> > /home/me/packages//community --virtual .makedepends-my_pkg
> > build-base-aarch64
> > ERROR: unsatisfiable constraints:
> >   build-base-aarch64 (missing):
> >     required by: .makedepends-my_pkg-0[build-base-aarch64]
> > ```
> >
> > If I put my_pkg in community repos in aports, I got above error. I
> > think the failure is because of build-base-aarch64 is in main, but
> > abuild-apk did not use it.
>
> You are installing a package from main (build-base) while specifying the community repo with --repository flag.
>
> Cheers,
>
>
>
> ---
> Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
> Help:         alpine-devel+help@lists.alpinelinux.org
> ---
>


-- 
竹密岂妨流水过
山高哪阻野云飞

And for G+, please use magiclouds#gmail.com.


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)