compiling Freeradius v3 on Solaris 11
Hello, We are currently migrating to new servers for our freeradius setup, And would like to take the opportunity to switch from freeradius v2 to freeradius v3 as well. I am having some problems compiling freeradius v3 on Solaris 11, Though. Until now we compiled Freeradius v2 on Solaris 10. Now, we are trying to compile freeradius 3.0.6 on solaris 11.2 (SPARC). I am using GCC 4.8.2 and gmake. The issue I am bumping into is the same as described here: http://lists.freeradius.org/pipermail/freeradius-users/2014-June/072438.html (compiling Freeradius 3.0.3 at Solaris). src/lib/udpfromto.c:251:6: error: 'struct msghdr' has no member named 'msg_control' Is there anything I can do to help get this issue fixed? Some other problems I ran into but managed to circumvent: - I have to use gmake, make gives an error on Make.inc, line 33: Unexpected end of line seen Same issue as http://lists.freeradius.org/pipermail/freeradius-users/2014-June/072411.html - I tried using solaris studio's cc, here I get stuck on "checking for talloc.h", even though I include -- with-talloc-include-dir with configure, cc does not know the -isystem it seems I can circumvent this issue by passing the dir in CCFLAGS in my environment variable Snippet from config.log: === configure:7294: cc -c -g -mt -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -isystem /opt/csw/include/ conftest.c >&5 cc: Warning: Option -ystem passed to ld, if ld is invoked, ignored otherwise === Upon setting CFLAGS=' -L/opt/csw/lib -R/opt/csw/lib -I/opt/csw/include', this is resolved - I have tried compiling arran's Freeradius 3.0.7 RC0, but keep getting an error that my compiler must support C11, I am using Solaris Studio 12.4, whoch should support C11: https://docs.oracle.com/cd/E37069_01/html/E37074/appxc.html#scrolltoc Is my compiler broken? Relevant info from config.log: ==== checking for the compiler flag to enable C11 support cc -c -Werror -std=c11 conftest.c >&5 configure: failed program was: <snip> | int | main () | { | | struct foo { | union { | int a; | int b; | }; | } bar; | return 0; | | ; | return 0; | } ==== If I try to compile the snippet itself I get a warning that the last return was not reached. Is my compiler broken, of what could be the issue here? With GCC I do not have this issue, but I end up in the problem that gcc does not know the -KPIC option, If I adjust the source to -fPIC, I end up in the same situation above with the udpfromto error. My apologies for combining so much info in one mail, but I tried to be as thorough as I could in combining everything I have tried until now :) Thank you very much in advance Kind regards Sander Eerdekens
On Feb 17, 2015, at 5:45 AM, Sander Eerdekens <sander.eerdekens@uzleuven.be> wrote:
Now, we are trying to compile freeradius 3.0.6 on solaris 11.2 (SPARC). I am using GCC 4.8.2 and gmake.
That should work.
The issue I am bumping into is the same as described here: http://lists.freeradius.org/pipermail/freeradius-users/2014-June/072438.html (compiling Freeradius 3.0.3 at Solaris). src/lib/udpfromto.c:251:6: error: 'struct msghdr' has no member named 'msg_control'
Is there anything I can do to help get this issue fixed?
This should help: ./configure —help ./configure ----with-udpfromto=no
Some other problems I ran into but managed to circumvent: - I have to use gmake, make gives an error on Make.inc, line 33: Unexpected end of line seen
Yes, the build requires GNU Make.
Same issue as http://lists.freeradius.org/pipermail/freeradius-users/2014-June/072411.html - I tried using solaris studio's cc, here I get stuck on "checking for talloc.h", even though I include -- with-talloc-include-dir with configure, cc does not know the -isystem it seems I can circumvent this issue by passing the dir in CCFLAGS in my environment variable
Well, the Solaris C compiler is garbage.
- I have tried compiling arran's Freeradius 3.0.7 RC0, but keep getting an error that my compiler must support C11, I am using Solaris Studio 12.4, whoch should support C11: https://docs.oracle.com/cd/E37069_01/html/E37074/appxc.html#scrolltoc Is my compiler broken?
I’d say so.
If I try to compile the snippet itself I get a warning that the last return was not reached.
It’s a warning. Not an error. Alan DeKok.
We are currently migrating to new servers for our freeradius setup, And would like to take the opportunity to switch from freeradius v2 to freeradius v3 as well. I am having some problems compiling freeradius v3 on Solaris 11, Though. Until now we compiled Freeradius v2 on Solaris 10.
You could take this opportunity to migrate away from solaris? :)
Now, we are trying to compile freeradius 3.0.6 on solaris 11.2 (SPARC).
Mm that's going to be fun.
I am using GCC 4.8.2 and gmake.
The issue I am bumping into is the same as described here: http://lists.freeradius.org/pipermail/freeradius-users/2014-June/072438.html (compiling Freeradius 3.0.3 at Solaris). src/lib/udpfromto.c:251:6: error: 'struct msghdr' has no member named 'msg_control'
Is there anything I can do to help get this issue fixed?
From previous notes/rants, you need to define -D_XOPEN_SOURCE to match the C standard used.
Some other problems I ran into but managed to circumvent: - I have to use gmake, make gives an error on Make.inc, line 33: Unexpected end of line seen Same issue as http://lists.freeradius.org/pipermail/freeradius-users/2014-June/072411.html - I tried using solaris studio's cc, here I get stuck on "checking for talloc.h", even though I include -- with-talloc-include-dir with configure, cc does not know the -isystem it seems
Ok. Well, you're welcome to write a patch to check for -isystem to enable/disable it. Or use gcc/clang.
If I try to compile the snippet itself I get a warning that the last return was not reached. Is my compiler broken, of what could be the issue here?
Hm. Fixed that. It's being extra picky.
With GCC I do not have this issue, but I end up in the problem that gcc does not know the -KPIC option, If I adjust the source to -fPIC, I end up in the same situation above with the udpfromto error.
Solaris is a complete pain to build on. I managed to do with with the ldap module disabled. -Arran Arran Cudbard-Bell <a.cudbardb@freeradius.org> FreeRADIUS development team FD31 3077 42EC 7FCD 32FE 5EE2 56CF 27F9 30A8 CAA2
participants (3)
-
Alan DeKok -
Arran Cudbard-Bell -
Sander Eerdekens