Project

General

Profile

Issue #1166

Strongswan [strongswan-5.3.3.tar.bz2] is not compiling in opensuse linux12 2.6.32.12-0.7-default .

Added by Bharath Meduri almost 5 years ago. Updated almost 5 years ago.

Status:
Closed
Priority:
Normal
Category:
build
Affected version:
5.3.3
Resolution:
No change required

Description

while executing "MAKE" , following errors are thrown: [strongswan-5.3.3.tar.bz2]

kernel_netlink_ipsec.c:145: error: 'XFRMA_REPLAY_ESN_VAL' undeclared here (not i n a function)
kernel_netlink_ipsec.c: In function 'add_mark':
kernel_netlink_ipsec.c:1185: error: 'XFRMA_MARK' undeclared (first use in this f unction)
kernel_netlink_ipsec.c:1185: error: (Each undeclared identifier is reported only once
kernel_netlink_ipsec.c:1185: error: for each function it appears in.)
kernel_netlink_ipsec.c:1185: error: dereferencing pointer to incomplete type
kernel_netlink_ipsec.c:1190: error: dereferencing pointer to incomplete type
kernel_netlink_ipsec.c:1191: error: dereferencing pointer to incomplete type
kernel_netlink_ipsec.c: In function 'add_sa':
kernel_netlink_ipsec.c:1394: error: 'XFRMA_ALG_AUTH_TRUNC' undeclared (first use in this function)
kernel_netlink_ipsec.c:1395: error: dereferencing pointer to incomplete type
kernel_netlink_ipsec.c:1400: error: dereferencing pointer to incomplete type
kernel_netlink_ipsec.c:1401: error: dereferencing pointer to incomplete type
kernel_netlink_ipsec.c:1402: error: dereferencing pointer to incomplete type
kernel_netlink_ipsec.c:1402: error: dereferencing pointer to incomplete type
kernel_netlink_ipsec.c:1403: error: dereferencing pointer to incomplete type
kernel_netlink_ipsec.c:1403: error: dereferencing pointer to incomplete type
kernel_netlink_ipsec.c:1404: error: dereferencing pointer to incomplete type
kernel_netlink_ipsec.c:1482: error: 'XFRMA_TFCPAD' undeclared (first use in this function)
kernel_netlink_ipsec.c:1502: error: dereferencing pointer to incomplete type
kernel_netlink_ipsec.c:1508: error: dereferencing pointer to incomplete type
kernel_netlink_ipsec.c:1509: error: dereferencing pointer to incomplete type
kernel_netlink_ipsec.c:1515: error: 'XFRM_STATE_ESN' undeclared (first use in th is function)
kernel_netlink_ipsec.c: At top level:
kernel_netlink_ipsec.c:1557: warning: 'struct xfrm_replay_state_esn' declared in side parameter list
kernel_netlink_ipsec.c:1557: warning: its scope is only this definition or decla ration, which is probably not what you want
kernel_netlink_ipsec.c: In function 'get_replay_state':
kernel_netlink_ipsec.c:1640: error: dereferencing pointer to incomplete type
kernel_netlink_ipsec.c: In function 'update_sa':
kernel_netlink_ipsec.c:1894: warning: passing argument 6 of 'get_replay_state' f rom incompatible pointer type
make4: * [kernel_netlink_ipsec.lo] Error 1
make4: Leaving directory `/home/strongswan-5.3.3/src/libhydra/plugins/kernel_n etlink'
make3:
[all-recursive] Error 1
make3: Leaving directory `/home/strongswan-5.3.3/src/libhydra'
make2:
[all-recursive] Error 1
make2: Leaving directory `/home/strongswan-5.3.3/src'
make1:
[all-recursive] Error 1
make1: Leaving directory `/home/strongswan-5.3.3'
make: *
* [all] Error 2

Configure option is : =====================
./configure -target=i686-pc-linux-gnu --prefix=/usr --sysconfdir=/etc --disable-gmp --with-charon-udp-port=500 --with-charon-natt-port=4500 --with-linux-headers=/usr/include

I have also gone through BUG#1099 , but the patch also is not working for me. I added patch in /src/include path.

Please help to solve it


Related issues

Related to Bug #1099: compiling error in r5.3.3Closed07.09.2015

History

#1 Updated by Tobias Brunner almost 5 years ago

  • Related to Bug #1099: compiling error in r5.3.3 added

#2 Updated by Tobias Brunner almost 5 years ago

  • Category set to build
  • Status changed from New to Feedback

--with-linux-headers=/usr/include

The headers from the 2.6.32 kernel (which is now reaching its EOL) are too old. That's why we ship a bunch of kernel headers to simplify implementation (avoids having to plaster the code with even more #ifdefs). So you definitely should remove the option above.

I also wonder why you are using openSUSE 12.x with a 2.6.32 kernel. According to Wikipedia the 12.x releases (which apparently all reached their EOL) ship with 3.x kernels.

I have also gone through BUG#1099 , but the patch also is not working for me.

What problem did you encounter after applying the patch to the 5.3.3 code?

#3 Updated by Bharath Meduri almost 5 years ago

So you definitely should remove the option above.
------
If i remove the Option : following errors are coming so i used option: --with-linux-headers=/usr/include
**

In file included from kernel_netlink_ipsec.c:25:
../../../../src/include/linux/netlink.h:36: error: expected specifier-qualifier- list before '__kernel_sa_family_t'
In file included from kernel_netlink_ipsec.c:26:
../../../../src/include/linux/rtnetlink.h:357: error: expected specifier-qualifi er-list before '__kernel_sa_family_t'
kernel_netlink_ipsec.c: In function 'receive_events':
kernel_netlink_ipsec.c:1036: error: 'struct sockaddr_nl' has no member named 'nl _pid'
kernel_netlink_ipsec.c: In function 'kernel_netlink_ipsec_create':
kernel_netlink_ipsec.c:2956: error: 'struct sockaddr_nl' has no member named 'nl _family'
kernel_netlink_ipsec.c:2966: error: 'struct sockaddr_nl' has no member named 'nl _groups'
make4: * [kernel_netlink_ipsec.lo] Error 1
make4: Leaving directory `/home/strongswan-5.3.3/src/libhydra/plugins/kernel_n etlink'
make3:
[all-recursive] Error 1
make3: Leaving directory `/home/strongswan-5.3.3/src/libhydra'
make2:
[all-recursive] Error 1
make2: Leaving directory `/home/strongswan-5.3.3/src'
make1:
[all-recursive] Error 1
make1: Leaving directory `/home/strongswan-5.3.3'
make: *
* [all] Error 2

What problem did you encounter after applying the patch to the 5.3.3 code?
------

Is it correct way to add this patch in /src/include and compile again to solve this issue? is it the solution you proposed by removing --with-linux-headers=/usr/include this option and use patch to build?

if so , even after inclusing patch also i am getting errors.

I also wonder why you are using openSUSE 12.x with a 2.6.32 kernel. According to Wikipedia the 12.x releases (which apparently all reached their EOL) ship with 3.x kernels.

=======

This we have some compatibility issues so we didnot upgrade to latest. i can try once upgrading to latest kernal , but which is better? linux-a379 3.0.13-0.27-default is this ok?

#4 Updated by Tobias Brunner almost 5 years ago

If i remove the Option : following errors are coming

Yes, these are the errors seen in #1099.

Is it correct way to add this patch in /src/include and compile again to solve this issue? is it the solution you proposed by removing --with-linux-headers=/usr/include this option and use patch to build?

Yes, you'd apply the patch to the strongSwan sources (basically adds source:src/include/linux/socket.h). Then compile without --with-linux-headers (it might be a good idea to run make distclean before running ./configure with the new options).

if so , even after inclusing patch also i am getting errors.

But hopefully not the same errors. So which errors do you get?

This we have some compatibility issues so we didnot upgrade to latest. i can try once upgrading to latest kernal , but which is better? linux-a379 3.0.13-0.27-default is this ok?

Possibly.

#5 Updated by Bharath Meduri almost 5 years ago

*But hopefully not the same errors. So which errors do you get? =====================================
I also used make distclean*

In file included from kernel_netlink_ipsec.c:25:
../../../../src/include/linux/netlink.h:36: error: expected specifier-qualifier- list before '__kernel_sa_family_t'
In file included from kernel_netlink_ipsec.c:26:
../../../../src/include/linux/rtnetlink.h:357: error: expected specifier-qualifi er-list before '__kernel_sa_family_t'
kernel_netlink_ipsec.c: In function 'receive_events':
kernel_netlink_ipsec.c:1036: error: 'struct sockaddr_nl' has no member named 'nl _pid'
kernel_netlink_ipsec.c: In function 'kernel_netlink_ipsec_create':
kernel_netlink_ipsec.c:2956: error: 'struct sockaddr_nl' has no member named 'nl _family'
kernel_netlink_ipsec.c:2966: error: 'struct sockaddr_nl' has no member named 'nl _groups'
make4: * [kernel_netlink_ipsec.lo] Error 1
make4: Leaving directory `/home/strongswan-5.3.3/src/libhydra/plugins/kernel_n etlink'
make3:
[all-recursive] Error 1
make3: Leaving directory `/home/strongswan-5.3.3/src/libhydra'
make2:
[all-recursive] Error 1
make2: Leaving directory `/home/strongswan-5.3.3/src'
make1:
[all-recursive] Error 1
make1: Leaving directory `/home/strongswan-5.3.3'
make: *
* [all] Error 2

#6 Updated by Tobias Brunner almost 5 years ago

Looks like you haven't applied the patch properly. You should have the file src/include/linux/socket.h and it should define __kernel_sa_family_t.

#7 Updated by Bharath Meduri almost 5 years ago

i don't have GIT repository , Is there any way to apply patch without downloading repository ??

#8 Updated by Tobias Brunner almost 5 years ago

i don't have GIT repository , Is there any way to apply patch without downloading repository ??

Sure, download the patch and apply it with patch. But as mentioned you only need the socket.h file. Just download it (source:src/include/linux/socket.h) and copy it to src/include/linux/.

#9 Updated by Bharath Meduri almost 5 years ago

It compiled successfully, thanks a lot for support!! But i could not find ipsec.secrets file

ipsec.conf and strongswan.conf are present in /etc folder, but ipsec.secrets is missing.
ipsec.d is also present.

#10 Updated by Tobias Brunner almost 5 years ago

There is no default ipsec.secrets file, just create it yourself (however, there is some legacy code in starter that actually creates the file, if it does not yet exist, and uses scepclient to create a key and self-signed certificate).

#11 Updated by Tobias Brunner almost 5 years ago

  • Status changed from Feedback to Closed
  • Assignee set to Tobias Brunner
  • Resolution set to No change required

Also available in: Atom PDF