Bug #205

Building strongSwan 5.0.0 on FreeBSD fails

Added by Barry Andersen 10 months ago. Updated 9 months ago.

Status:ClosedStart date:20.07.2012
Priority:NormalDue date:
Assignee:Tobias Brunner% Done:

0%

Category:-
Target version:5.0.1
Affected version:5.0.0 Resolution:Fixed

Description

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
Added by Tobias Brunner 10 months ago

Include stdint.h for UINTxx_MAX defines

Fixes #205.

Revision 8ff10948
Added by Tobias Brunner 10 months 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.

History

#1 Updated by Tobias Brunner 10 months 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 9 months ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF