[strongSwan] Cannot compile strong-swan from git

Noel Kuntze noel.kuntze at thermi.consulting
Sat Jul 13 18:35:55 CEST 2019


Hello Ben,

I'm not a dev. I can only look at the source and give you advice on what probably helps.

The check for gperf seems to only soft fail. See configure.ac, line 378[1]:
# because gperf is not needed by end-users we just report it but do not abort on failure



Well, the end user would never run ./configure and devs need to compile it, so I don't understand the presumption given in the comment.

`in_word_set` is again a function that seems to be part of gperf. Maybe check what the configure script outputs. Maybe the gperf development headers are missing?

Kind regards

Noel


[1] https://github.com/strongswan/strongswan/blob/master/configure.ac#L378

Am 13.07.19 um 17:53 schrieb Ben Greear:
> Hello,
>
> First, maybe autogen could detect this missing gperf right at the beginning and
> tell the user?  Or fix whatever is expecting to find gperf so it sends out a useful
> error with suggested fix?
>
> After ./autogen.sh; ./configure; make clean; make
>
> And now it fails here:
>
> /bin/sh ../../libtool  --tag=CC   --mode=link gcc  -g -O2 -Wall -Wno-format -Wno-format-security -Wno-pointer-sign -include /home/greearb/git/strongswan/config.h  -L/usr/local/lib -o starter starter.o args.o confread.o keywords.o cmp.o invokecharon.o starterstroke.o ../../src/libstrongswan/libstrongswan.la ../../src/libcharon/libcharon.la libstarter.la  -lpthread -ldl
> libtool: link: gcc -g -O2 -Wall -Wno-format -Wno-format-security -Wno-pointer-sign -include /home/greearb/git/strongswan/config.h -o .libs/starter starter.o args.o confread.o keywords.o cmp.o invokecharon.o starterstroke.o  -L/usr/local/lib ../../src/libstrongswan/.libs/libstrongswan.so ../../src/libcharon/.libs/libcharon.so /home/greearb/git/strongswan/src/libstrongswan/.libs/libstrongswan.so -lm ./.libs/libstarter.a -lpthread -ldl -Wl,-rpath -Wl,/usr/local/lib/ipsec
> confread.o: In function `load_setup':
> /home/greearb/git/strongswan/src/starter/confread.c:104: undefined reference to `in_word_set'
> confread.o: In function `load_ca':
> /home/greearb/git/strongswan/src/starter/confread.c:156: undefined reference to `in_word_set'
> confread.o: In function `load_conn':
> /home/greearb/git/strongswan/src/starter/confread.c:568: undefined reference to `in_word_set'
> ../../src/libstrongswan/.libs/libstrongswan.so: undefined reference to `proposal_get_token_static'
> collect2: error: ld returned 1 exit status
> Makefile:645: recipe for target 'starter' failed
> make[5]: *** [starter] Error 1
> make[5]: Leaving directory '/home/greearb/git/strongswan/src/starter'
> Makefile:711: recipe for target 'all-recursive' failed
> make[4]: *** [all-recursive] Error 1
> make[4]: Leaving directory '/home/greearb/git/strongswan/src/starter'
> Makefile:532: recipe for target 'all' failed
> make[3]: *** [all] Error 2
> make[3]: Leaving directory '/home/greearb/git/strongswan/src/starter'
> Makefile:532: recipe for target 'all-recursive' failed
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory '/home/greearb/git/strongswan/src'
> Makefile:593: recipe for target 'all-recursive' failed
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory '/home/greearb/git/strongswan'
> Makefile:504: recipe for target 'all' failed
> make: *** [all] Error 2
>
>
> I pulled in master, re-ran autogen.sh and such, and it fails with the same errors...
>
> Thanks,
> Ben
>
> On 07/13/2019 07:59 AM, Noel Kuntze wrote:
>> Hello Ben,
>>
>> That's still gperf missing.
>> Maybe try running ./autogen.sh again after installing gperf.
>>
>> Kind regards
>>
>> Noel
>>
>> Am 13.07.19 um 02:14 schrieb Ben Greear:
>>> On 7/12/19 5:04 PM, Noel Kuntze wrote:
>>>> Hello Ben,
>>>>
>>>> Install gperf.
>>>
>>> Thanks, that gets me a but further:
>>>
>>>
>>> libtool: link: ( cd ".libs" && rm -f "libstrongswan-attr.la" && ln -s "../libstrongswan-attr.la" "libstrongswan-attr.la" )
>>> make[5]: Leaving directory '/home/greearb/git/strongswan/src/libcharon/plugins/attr'
>>> Making all in tests
>>> make[5]: Entering directory '/home/greearb/git/strongswan/src/libcharon/tests'
>>> make[5]: Nothing to be done for 'all'.
>>> make[5]: Leaving directory '/home/greearb/git/strongswan/src/libcharon/tests'
>>> make[4]: Leaving directory '/home/greearb/git/strongswan/src/libcharon'
>>> make[3]: Leaving directory '/home/greearb/git/strongswan/src/libcharon'
>>> Making all in starter
>>> make[3]: Entering directory '/home/greearb/git/strongswan/src/starter'
>>> \
>>>     sed \
>>>     -e "s:\@GPERF_LEN_TYPE\@::" \
>>>     keywords.h.in > keywords.h
>>> \
>>>      -m 10 -C -G -D -t < ./keywords.txt > keywords.c
>>> /bin/sh: line 1: -m: command not found
>>> Makefile:1004: recipe for target 'keywords.c' failed
>>> make[3]: *** [keywords.c] Error 127
>>> make[3]: Leaving directory '/home/greearb/git/strongswan/src/starter'
>>> Makefile:532: recipe for target 'all-recursive' failed
>>> make[2]: *** [all-recursive] Error 1
>>> make[2]: Leaving directory '/home/greearb/git/strongswan/src'
>>> Makefile:592: recipe for target 'all-recursive' failed
>>> make[1]: *** [all-recursive] Error 1
>>> make[1]: Leaving directory '/home/greearb/git/strongswan'
>>> Makefile:503: recipe for target 'all' failed
>>> make: *** [all] Error 2
>>>
>>>> Kind regards
>>>>
>>>> Noel
>>>>
>>>> Am 13.07.19 um 01:46 schrieb Ben Greear:
>>>>> Hello,
>>>>>
>>>>> I'm trying to compile strongswan on fedora-24.  If I download the 5.8.0 tarball,
>>>>> then it will compile with:  ./configure; make
>>>>>
>>>>> But, if I try to compile from git clone, it blows up, even if I check out the 5.8.0
>>>>> tag (top-of-tree breaks for similar reasons)
>>>>>
>>>>> [greearb at v-f24-64 strongswan]$ make
>>>>> \
>>>>>     sed \
>>>>>     -e "s:\@PACKAGE_VERSION\@:5.8.0:" \
>>>>>     ./Android.common.mk.in > Android.common.mk
>>>>> make  all-recursive
>>>>> make[1]: Entering directory '/home/greearb/git/strongswan'
>>>>> Making all in src
>>>>> make[2]: Entering directory '/home/greearb/git/strongswan/src'
>>>>> Making all in .
>>>>> make[3]: Entering directory '/home/greearb/git/strongswan/src'
>>>>> make[3]: Nothing to be done for 'all-am'.
>>>>> make[3]: Leaving directory '/home/greearb/git/strongswan/src'
>>>>> Making all in include
>>>>> make[3]: Entering directory '/home/greearb/git/strongswan/src/include'
>>>>> make[3]: Nothing to be done for 'all'.
>>>>> make[3]: Leaving directory '/home/greearb/git/strongswan/src/include'
>>>>> Making all in libstrongswan
>>>>> make[3]: Entering directory '/home/greearb/git/strongswan/src/libstrongswan'
>>>>> \
>>>>>     (cd ./asn1/ && /usr/bin/perl oid.pl)
>>>>> \
>>>>>     sed \
>>>>>     -e "s:\@GPERF_LEN_TYPE\@::" \
>>>>>     crypto/proposal/proposal_keywords_static.h.in > crypto/proposal/proposal_keywords_static.h
>>>>> \
>>>>>      -N proposal_get_token_static -m 10 -C -G -c -t -D < \
>>>>> ./crypto/proposal/proposal_keywords_static.txt > crypto/proposal/proposal_keywords_static.c
>>>>> /bin/sh: line 1: -N: command not found
>>>>> Makefile:2436: recipe for target 'crypto/proposal/proposal_keywords_static.c' failed
>>>>> make[3]: *** [crypto/proposal/proposal_keywords_static.c] Error 127
>>>>> make[3]: Leaving directory '/home/greearb/git/strongswan/src/libstrongswan'
>>>>> Makefile:532: recipe for target 'all-recursive' failed
>>>>> make[2]: *** [all-recursive] Error 1
>>>>> make[2]: Leaving directory '/home/greearb/git/strongswan/src'
>>>>> Makefile:592: recipe for target 'all-recursive' failed
>>>>> make[1]: *** [all-recursive] Error 1
>>>>> make[1]: Leaving directory '/home/greearb/git/strongswan'
>>>>> Makefile:503: recipe for target 'all' failed
>>>>> make: *** [all] Error 2
>>>>>
>>>>> Thanks,
>>>>> Ben
>>>>>
>>>>
>>>
>>>
>>
>

-- 
Noel Kuntze
IT security consultant

GPG Key ID: 0x0739AD6C
Fingerprint: 3524 93BE B5F7 8E63 1372 AF2D F54E E40B 0739 AD6C


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.strongswan.org/pipermail/users/attachments/20190713/2225c586/attachment-0001.sig>


More information about the Users mailing list