Bug #205

Building strongSwan 5.0.0 on FreeBSD fails

Added by Barry Andersen about 10 years ago. Updated almost 10 years ago.

Target version:
Start date:
Due date:
Estimated time:
Affected version:


Trying to build strongSwan 5.0.0 on FreeBSD 9.0. I successfully configured strongSwan using the specific FreeBSD options, but building the sources fails in two places.

The first failure is undeclared defines in transform_attribute.c. I resolved this by including the stdint.h header file to transform_attribute.c.

The second failure is a hang in the make process at this point:

Making all in ipsec
sed  -e "s:@IPSEC_SHELL@:/bin/sh:"  -e "s:@IPSEC_VERSION@:5.0.0:"  -e "s:@IPSEC_NAME@:strongSwan:"  -e "s:@IPSEC_DISTRO@::"  -e
 "s:@IPSEC_DIR@:/usr/local/libexec/ipsec:"  -e "s:@IPSEC_SCRIPT@:ipsec:"  -e "s:@IPSEC_SBINDIR@:/usr/local/sbin:"  -e "s:@IPSEC_CONFDIR@:/usr
/local/etc:"  -e "s:@IPSEC_PIDDIR@:/var/run:"   > _ipsec 

It will hang here indefinitely and never finish building. I tried building strongSwan on both FreeBSD 9.0 and 8.2 and see the same results.

If you need anymore information, please ask. Thanks.

Associated revisions

Revision d511a71d (diff)
Added by Tobias Brunner about 10 years ago

Include stdint.h for UINTxx_MAX defines

Fixes #205.

Revision 8ff10948 (diff)
Added by Tobias Brunner about 10 years ago

The use of $< in Makefiles is not portable

It requires GNU make which is not what most people use on e.g. FreeBSD.

Fixes #205.


#1 Updated by Tobias Brunner about 10 years ago

  • Status changed from New to Resolved
  • Assignee set to Tobias Brunner
  • Target version set to 5.0.1
  • Resolution set to Fixed

The second error is caused by the use of $< in the Makefile rule to generate the ipsec script and man page. The $< variable is not supported by the native make command on FreeBSD (GNU make replaces it with the first prerequisite of the rule) so there is no input file for the sed command which then waits for input on STDIN indefinitely. Unfortunately, there is no warning generated by Automake about portability problems caused by $<.

To fix this you can either install GNU make and then use gmake to build strongSwan or use the associated patch to replace the uses of $<.

#2 Updated by Tobias Brunner almost 10 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF