building (with) execline

From: Olivier Brunel <>
Date: Mon, 12 Jan 2015 18:30:27 +0100


I've recently found out about skalibs & related software, and am looking
into it... and found myself with a few questions.

First off, little issue with building things. I've read similar issue on
the archives in this ML (I believe), but I'm not sure whether a solution
was found or not.

I usually build things with -j4, but with e.g. execline I get an error:

make: *** No rule to make target '-lexecline', needed by 'background'.
make: *** Waiting for unfinished jobs....

Of course with -j1 no such issue. I may be wrong, but I don't think you
can use -lexecline as you do in deps.mak, or maybe at least not when
building said library (unlike -lskarnet).

In that case, I think you need to use e.g. libexecline.a instead, so
that make can order things properly even with parallel jobs.
I tried replacing -lexecline with $(STATIC_LIBS) in deps.mak and I can
`make -j4` just fine. Of course this won't work when building with
--disable-allstatic, where other changes might be in order.

Then, I'm trying things with skalibs & co to see how it works, but there
isn't always (lots of) documentation. For instance, I'm not sure how the
whole buffered IO API work/are meant to be used; Is there any doc about
this somewhere I could read?

Also, I've made a little thing that works say somewhat like execline's
define, and tried to compile it, but it fails. I get a few errors such as:

/usr/lib/execline/libexecline.a(el_transform.o): In function `el_transform':
(.text+0x112): undefined reference to `satmp'

Yeah, back to stralloc, in your code (e.g. s6) you seem to use it
(satmp) at times, but I have no idea how this works. Obviously, it's
also something libraries (at least libexecline) might use, so is it
meant for app or to be an internal thing that you abuse in your own
code? How safe is it to use if library functions can use it?

And back to the original failure, it seems I am forced to use it (and
declare it or include skalibs/skamisc.h) in my own code to make
functions like el_transform() work. Am I missing something/doing
something wrong?

And actually, that's not all:

/usr/lib/execline/libexecline.a(el_transform.o): In function `el_transform':
(.text+0x160): undefined reference to `netstring_decode'

So in order to compile my code, I had to add the following (plus include
skalibs/{skamisc,netstring}.h), only so that functions from libexecline

    satmp.len = 0;
    void *p = &netstring_decode;
    (void) p;

Again, i don't doubt I'm doing something wrong, so I'd appreciate some help.

FYI I'm compiling using:
% gcc test.c -static -Wall -lskarnet -lexecline -L/usr/lib/skalibs

Thanks a lot,
Received on Mon Jan 12 2015 - 17:30:27 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC