Issues compiling static binaries on Alpine Linux

42 views
Skip to first unread message

Eric O'Connor

unread,
Jun 17, 2016, 1:43:32 PM6/17/16
to help-cfengine
Hi,

I'm trying to compile a set of static CFEngine binaries on Alpine Linux (musl libc). My goal is to be able to scp a small tarball to an arbitrary linux x86_64 and have it setup a working cfengine environment. This would be very difficult to do using glibc or dynamic binaries. 

Anyway, I can generate a statically linked binary, but when I run it on my policy, I get:

  error: Could not open database txn /var/cfengine/state/cf_lock.lmdb: MDB_BAD_RSLOT: Invalid reuse of reader locktable slot
  error: Could not open database txn /var/cfengine/state/cf_lock.lmdb: MDB_BAD_RSLOT: Invalid reuse of reader locktable slot
  error: Could not open database txn /var/cfengine/state/cf_lock.lmdb: MDB_BAD_RSLOT: Invalid reuse of reader locktable slot
  error: Could not open database txn /var/cfengine/state/cf_lock.lmdb: MDB_BAD_RSLOT: Invalid reuse of reader locktable slot
  error: Could not open database txn /var/cfengine/state/cf_lock.lmdb: MDB_BAD_RSLOT: Invalid reuse of reader locktable slot
...
fish: “sudo /var/cfengine/bin/cf-agent” terminated by signal SIGSEGV (Address boundary error)

I am compiling against LMDB tagged "LMDB_0.9.18" in the openldap git repository. Also, pcre-8.38, and openssl-1.0.1t. I've been able to replicate this on both cfengine 3.8.2 and 3.9.0. 

Any ideas on what could be causing this issue? I attached the generated cf-agent and cf-promises binaries, although I understand if you're not brave enough to run them :)

Thanks,
Eric
cfe.tar.gz

Nick Anderson

unread,
Jun 17, 2016, 1:57:49 PM6/17/16
to Eric O'Connor, help-cfengine
On 06/17/2016 12:43 PM, Eric O'Connor wrote:
> Any ideas on what could be causing this issue? I attached the generated
> cf-agent and cf-promises binaries, although I understand if you're not
> brave enough to run them :)

Hey Eric, I think the dev-cfengine list is a better place for this kind
of question.

https://groups.google.com/d/forum/dev-cfengine

signature.asc
Reply all
Reply to author
Forward
0 new messages