Hi guys,

you are totally right. I had the -largp in the wrong place the whole time.
I found that the easiest way to work around the issue is to patch the 
Makefile.am files when they are getting pulled in by the build system. See 
patch below.

In the meantime, Jo came up with a fixed Makefile that does not need patches of 
upstream Makefile.am files. I tested it and it builds fine. Thank you very 
much! So I threw away the patches and use the proper Makefile now.

Building works, tests on the target platform have been successful as well. I 
opened a pull request where we can discuss any other issues that need to get 
sorted out before merging.

Thanks for you help and the super-fast responses!


Pull Request is here: https://github.com/openwrt/packages/pull/3604

> On Thu, Dec 1, 2016 at 9:34 AM, Alberto Leiva <ydah...@gmail.com> wrote:
>> Not sure if "x86_64-openwrt-linux-musl-gcc" implies that you're using gcc,
>> but at least in stock gcc, order matters. If you're going to force -largp,
>> do so at the end, along with the other libraries.

> On 1 Dec 2016, at 10:20, John Szakmeister <j...@szakmeister.net> wrote:
> I can't help you with the actual issues, but you don't have -largp in
> the correct location.  It need probably needs to come before the last
> few libraries, but after the jool-related ones (at the very least the
> ones that depend on it).  Linkers link in the order given, so at the
> point you've placed it, nothing depends on argp and therefore nothing
> is used from it.

--- a/usr/stateful/Makefile.am  2016-10-07 20:17:00.000000000 +0200
+++ b/usr/stateful/Makefile.am  2016-12-01 13:40:23.034974511 +0100
@@ -25,7 +25,7 @@
        ../common/target/pool6.c \
+jool_LDADD = -largp ${LIBNLGENL3_LIBS}
 jool_CFLAGS = -Wall -O2
 jool_CFLAGS += -I${srcdir}/../../include
--- a/usr/stateless/Makefile.am 2016-10-07 20:17:00.000000000 +0200
+++ b/usr/stateless/Makefile.am 2016-12-01 13:40:01.034717994 +0100
@@ -25,7 +25,7 @@
        ../common/target/pool6.c \
-jool_siit_LDADD = ${LIBNLGENL3_LIBS}
+jool_siit_LDADD = -largp ${LIBNLGENL3_LIBS}
 jool_siit_CFLAGS = -Wall -O2
 jool_siit_CFLAGS += -I${srcdir}/../../include
Jool-list mailing list

Reply via email to