Subject: [alpine-devel] glibc code in alpine

From: "Largacha, Alejandro (GE Power)" <[email-masked]>
Date: Wed, 27 Jun 2018 14:29:50 +0000

Hi,

I have some library source code that builds for a Linux distro with glibc library. I want to build that code for alpine and musl libc and I'm finding some problems (I actually want to create an alpine linux package with the library). For example, I get this error when I try to build:

error: 'PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP' undeclared here (not in a function)
static pthread_mutex_t modGate  = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP;
                                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Any help would be appreciated.

Regards,

Alex

---

From: Cág <[email-masked]>
Date: Wed, 27 Jun 2018 13:40:12 -0400

http://www.openwall.com/lists/musl/2017/02/20/

-- 
caóc

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---

---

From: Ladar Levison <[email-masked]>
Date: Mon, 2 Jul 2018 23:25:11 -0500

On 06/27/2018 09:29 AM, Largacha, Alejandro (GE Power) wrote:
> I have some library source code that builds for a Linux distro with
> glibc library. I want to build that code for alpine and musl libc and
> I’m finding some problems (I actually want to create an alpine linux
> package with the library). 

I've also struggled with getting code to compile/run on Alpine. As an
interim fix, I ultimately decide to simply add glibc. You may find the
following repository helpful.

https://github.com/sgerrand/alpine-pkg-glibc/

I wrote a script to grab/install the glibc APK from the above repo. The
bottom half of the script includes the commented out commands from an
early attempt at building glibc directly (before I found the above
repo). You can find the aforementioned script at:

https://raw.githubusercontent.com/lavabit/robox/master/scripts/alpine38/glibc.sh

L~

---