Bootstrap build of Portola on Alpine

Mikael Vidstedt mikael.vidstedt at
Wed Apr 26 20:56:46 UTC 2017

> On Apr 25, 2017, at 2:35 PM, Josh Graham <josh at> wrote:
> G'day,
> I've documented what I've done so far to build Portola on an existing
> Alpine 3.3 with an glibc-based JDK (Zulu, as it happens) at:
> <>

Thank you very much for taking this for a spin. Really appreciate the feedback - keep it coming!

> I'll work out what the quoting bug is so the whole thing can be scripted.

I *think* (but see below) that’s same problem I "fixed” by explicitly installing sed or grep or something.. From your package list it looks like you do install grep, but you still run into the problem? Does installing sed help?

Out of curiosity, why did you have to do the poll.h softlink workaround? I was naively hoping I had fixed all of the incorrect includes, but maybe I missed something?

> I'm also on the edge of getting a built JDK but have library load issues at
> what I'm presuming is verification steps at the end of the make (no time to
> diagnose yet). There is a comment on that gist describing what I've found
> so far. Probably something very simple I've overlooked.

I believe this is the missing magic:

bash ./configure --host=x86_64-unknown-linux-musl --build=x86_64-unknown-linux-musl <…>

Specifically, the problem you’re running into is this guy: <>

Basically you need to help the JDK build system/code understand that you’re building the musl version, because the library path workaround only kicks in with the musl build. I started looking into if/how we can automatically detect that, but for now you need to give it some manual CPR using —host and —build.

> I'll also work out what packages can be omitted, but it's fairly lean for
> simply getting a bootstrap build. Azul's Zulu JDK is TCK approved and they
> have been very generous in supplying me an embedded cp3 version for my JRE
> image. The reason I'm keen on Portola is I can get that image even smaller
> without glibc. I understand if you don't want to use untrusted Docker
> images. The Dockerfile (and that of its base image) are open source, so you
> can recreate as needed.

That package list is almost the same as the one I ended up with:

alsa-lib-dev bash cups-dev file freetype-dev g++ grep libx11-dev libxext-dev libxrender-dev libxt-dev libxtst-dev linux-headers make mercurial tar zip

Funnily enough I realize that ‘sed’ isn’t in my list here, and it seems to be working anyway.. I guess I need to go back and have a look at that at some point.

> More soon,

Looking forward to it!


More information about the portola-dev mailing list