Hi again, I've managed to build uri_signing plugin. Both jansson and cjose are checked for in configure.ac with function TS_LINK_WITH_FLAGS_IFELSE. This is the two only where it's used. So, my guess is that there could be an issue with the way both libs are checked.
Running pkg-config --libs jansson gives: # pkg-config --libs jansson -ljansson # pkg-config --libs cjose -lcjose -ljansson -lcrypto So I guess both jansson and cjose are dynamic on Debian. Please find attached a patch which solve the issue, at least on Debian. It invert the way the check is done. It checks whether link works with dynamic flags. If not, it falls back on static ones. Could someone double check it, because I do not understand exactly why it used to fail ? Maybe a specific flags or config on Debian ? Cheers, Jean Baptiste On 9/22/18 9:59 PM, jean Baptiste FAVRE wrote: > I've checked with the jansson maintainer in Debian. > Looks like it's already compiled with -fPIC [1] > > Don't know what happens exactly, will try to have a deeper look at it. > > Cheers, > Jean Baptiste > > [1]: > https://buildd.debian.org/status/fetch.php?pkg=jansson&arch=amd64&ver=2.11-1&stamp=1518387251&raw=0 > > On 9/20/18 7:56 PM, Bryan Call wrote: >> It might be because you don’t have a dynamic library for jansson. I >> don’t have a static version of the library to test. >> >> checking jansson.h usability... yes >> checking jansson.h presence... yes >> checking for jansson.h... yes >> *checking whether jansson is dynamic… yes* >> >> libtool: link: cc -shared -fPIC -DPIC >> experimental/uri_signing/.libs/uri_signing.o >> experimental/uri_signing/.libs/config.o >> experimental/uri_signing/.libs/cookie.o >> experimental/uri_signing/.libs/jwt.o >> experimental/uri_signing/.libs/match.o >> experimental/uri_signing/.libs/parse.o >> experimental/uri_signing/.libs/timing.o -ljansson -lcjose -lpcre -lm >> -lcrypto -lbrotlienc -lpthread -ldl -ggdb3 -mcx16 -Wl,-soname >> -Wl,uri_signing.so -Wl,-version-script >> -Wl,experimental/uri_signing/.libs/uri_signing.ver -o >> experimental/uri_signing/.libs/uri_signing.so >> >> -Bryan >> >> >> >>> On Sep 20, 2018, at 4:32 AM, jean Baptiste FAVRE >>> <webmas...@jbfavre.org <mailto:webmas...@jbfavre.org>> wrote: >>> >>> Hello, >>> Tried to package it for Debian. >>> webp_transform plugin now build fine. >>> Still having an issue with experimental plugin uri_signing: >>> >>> libtool: link: cc -shared -fPIC -DPIC >>> experimental/uri_signing/.libs/uri_signing.o >>> experimental/uri_signing/.libs/config.o >>> experimental/uri_signing/.libs/cookie.o >>> experimental/uri_signing/.libs/jwt.o >>> experimental/uri_signing/.libs/match.o >>> experimental/uri_signing/.libs/parse.o >>> experimental/uri_signing/.libs/timing.o -l:libjansson.a -l:libcjose.a >>> -lpcre -lm -lcrypto -lbrotlienc -lpthread -ldl -g -mcx16 -g -O2 >>> -fstack-protector-strong -O3 -Wl,-z -Wl,relro -Wl,-z -Wl,now >>> -Wl,-soname -Wl,uri_signing.so -Wl,-version-script >>> -Wl,experimental/uri_signing/.libs/uri_signing.ver -o >>> experimental/uri_signing/.libs/uri_signing.so >>> /usr/bin/ld: >>> /usr/lib/gcc/x86_64-linux-gnu/8/../../../x86_64-linux-gnu/libjansson.a(load.o): >>> relocation R_X86_64_PC32 against symbol `stdin@@GLIBC_2.2.5' can not be >>> used when making a shared object; recompile with -fPIC >>> >>> Configure log extract: >>> >>> checking jansson.h usability... yes >>> checking jansson.h presence... yes >>> checking for jansson.h... yes >>> checking whether jansson is dynamic... no >>> checking cjose/cjose.h usability... yes >>> checking cjose/cjose.h presence... yes >>> checking for cjose/cjose.h... yes >>> checking whether cjose is dynamic... no >>> checking for HMAC in -lcrypto... yes >>> >>> Not sure it deserve a -1 though, core ATS and stable plugins are OK. >>> Might be specific to Debian. >>> >>> Cheers, >>> Jean Baptiste >>> >>> On 9/19/18 10:42 PM, Leif Hedstrom wrote: >>>> >>>> >>>>> On Sep 18, 2018, at 6:38 PM, Bryan Call <bc...@apache.org >>>>> <mailto:bc...@apache.org>> wrote: >>>>> >>>>> I've prepared a release for 8.0.0 (RC3). There was a problem with PR >>>>> 4145 and I reverted it. I am going to extend the vote until Friday >>>>> 9/21. The release notes for 8.0.0 are available at: >>>>> >>>>> https://github.com/apache/trafficserver/pulls?utf8=%E2%9C%93&q=is%3Aclosed+is%3Apr+milestone%3A8.0.0+ >>>>> <https://github.com/apache/trafficserver/pulls?utf8=%E2%9C%93&q=is:closed+is:pr+milestone:8.0.0+> >>>>> >>>>> or for a brief ChangeLog: >>>>> >>>>> https://github.com/apache/trafficserver/blob/8.0.x/CHANGELOG-8.0.0 >>>>> <https://github.com/apache/trafficserver/blob/8.0.x/CHANGELOG-8.0.0> >>>>> >>>>> >>>>> For some details as to what’s new in 8.0.0 see (still updating): >>>> >>>> >>>> I’m still investigating (and Bryan confirms), but it seems that log >>>> rotation is not working at all in 8.0.0. Filled up our log disks, and >>>> no rotation at the expected interval. >>>> >>>> So, sadly we’ll have to -1 this RC as well I think. >>>> >>>> Cheers, >>>> >>>> — leif >>>> >>> >> >
Index: trafficserver/configure.ac =================================================================== --- trafficserver.orig/configure.ac 2018-09-22 22:34:00.996680983 +0200 +++ trafficserver/configure.ac 2018-09-22 22:34:00.996680983 +0200 @@ -1309,8 +1309,8 @@ - TS_LINK_WITH_FLAGS_IFELSE([-shared -fPIC -l:libjansson.a],[AC_LANG_PROGRAM( + TS_LINK_WITH_FLAGS_IFELSE([-fPIC -ljansson],[AC_LANG_PROGRAM( [#include <jansson.h>], [(void) json_object();])], - [AC_MSG_RESULT([no]); LIBJANSSON=-l:libjansson.a], - [AC_MSG_RESULT([yes]); LIBJANSSON=-ljansson]) + [AC_MSG_RESULT([yes]); LIBJANSSON=-ljansson], + [AC_MSG_RESULT([no]); LIBJANSSON=-l:libjansson.a]) ], [LIBJANSSON=]) @@ -1319,8 +1319,8 @@ - TS_LINK_WITH_FLAGS_IFELSE([-shared -fPIC -l:libcjose.a],[AC_LANG_PROGRAM( + TS_LINK_WITH_FLAGS_IFELSE([-fPIC -lcjose],[AC_LANG_PROGRAM( [#include <cjose/cjose.h>], [(void) cjose_jws_import("", 0, NULL);])], - [AC_MSG_RESULT([no]); LIBCJOSE=-l:libcjose.a], - [AC_MSG_RESULT([yes]); LIBCJOSE=-lcjose]) + [AC_MSG_RESULT([yes]); LIBCJOSE=-lcjose], + [AC_MSG_RESULT([no]); LIBCJOSE=-l:libcjose.a]) ], [LIBCJOSE=]) AC_CHECK_LIB([crypto],[HMAC],[has_libcrypto=1],[has_libcrypto=0])
signature.asc
Description: OpenPGP digital signature