Compiling Shibboleth-2.1 on FreeBSD

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Compiling Shibboleth-2.1 on FreeBSD

Tristan Waddington
Hey all, for the past week or so I've been trying to build
Shibboleth-2.1 on our FreeBSD box. I realize it's not officially
supported, but I figured it should be possible.

I've been able to get all the dependencies to compile (after some
struggling), but now I'm running into a compile error with Shibboleth.

Here's what I'm seeing:

remoting/impl/TCPListener.cpp: In member function 'void
shibsp::TCPListener::setup_tcp_sockaddr(shibsp::sockaddr_in*) const':
remoting/impl/TCPListener.cpp:124: error: invalid application of
'sizeof' to incomplete type 'shibsp::sockaddr_in'
remoting/impl/TCPListener.cpp:125: error: invalid use of incomplete type
'struct shibsp::sockaddr_in'
remoting/impl/TCPListener.cpp:73: error: forward declaration of 'struct
shibsp::sockaddr_in'
remoting/impl/TCPListener.cpp:126: error: invalid use of incomplete type
'struct shibsp::sockaddr_in'
remoting/impl/TCPListener.cpp:73: error: forward declaration of 'struct
shibsp::sockaddr_in'
remoting/impl/TCPListener.cpp:127: error: invalid use of incomplete type
'struct shibsp::sockaddr_in'
remoting/impl/TCPListener.cpp:73: error: forward declaration of 'struct
shibsp::sockaddr_in'
remoting/impl/TCPListener.cpp: In member function 'virtual bool
shibsp::TCPListener::bind(int&, bool) const':
remoting/impl/TCPListener.cpp:144: error: aggregate 'shibsp::sockaddr_in
addr' has incomplete type and cannot be defined
remoting/impl/TCPListener.cpp: In member function 'virtual bool
shibsp::TCPListener::connect(int&) const':
remoting/impl/TCPListener.cpp:170: error: aggregate 'shibsp::sockaddr_in
addr' has incomplete type and cannot be defined
remoting/impl/TCPListener.cpp: In member function 'virtual bool
shibsp::TCPListener::accept(int&, int&) const':
remoting/impl/TCPListener.cpp:194: error: aggregate 'shibsp::sockaddr_in
addr' has incomplete type and cannot be defined
gmake[3]: *** [TCPListener.lo] Error 1
gmake[3]: Leaving directory `/usr/home/tristan/shib/shibboleth-2.1/shibsp'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/usr/home/tristan/shib/shibboleth-2.1/shibsp'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/usr/home/tristan/shib/shibboleth-2.1'
gmake: *** [all] Error 2

You can see the config.log here:
http://dev.emu.uoregon.edu/~tristan/config.log

I have some programming experience, but almost none in C++, so I'm
having a hell of a time trying to figure out what's wrong. I did some
poking around and am wondering if there is a problem with conflicting
namespaces or an improperly included file, but I'm really not sure.

I was hoping one of you might be able to point me in the right direction.

If all else fails I'll try installing the Shibboleth-2.1 RPM in Linux
compatibility mode, but I'm so close to getting this compiled and
installed that I'd really like to just get it working.

Thanks!

--
Tristan Waddington
[hidden email]
EMU Marketing — Assistant Web Developer
http://emumarketing.uoregon.edu


--
Tristan Waddington
[hidden email]
EMU Marketing — Assistant Web Developer
http://emumarketing.uoregon.edu
Reply | Threaded
Open this post in threaded view
|

RE: Compiling Shibboleth-2.1 on FreeBSD

Cantor, Scott E.
Tristan Waddington wrote on 2009-01-14:
> I have some programming experience, but almost none in C++, so I'm
> having a hell of a time trying to figure out what's wrong. I did some
> poking around and am wondering if there is a problem with conflicting
> namespaces or an improperly included file, but I'm really not sure.

I would assume it's a non-included file. The definition of sockaddr_in isn't
being handled by whatever the non-Windows branch of header inclusion is.

I don't think there's any C++ involved at all, that's just a spurious
assumption by the compiler because sockaddr_in isn't defined and it's just
picking one of the in-use namespaces as a possible home for the undeclared
type.

This is a standard/vanilla socket programming portability bug.

-- Scott



Reply | Threaded
Open this post in threaded view
|

Re: Compiling Shibboleth-2.1 on FreeBSD

Tristan Waddington
Scott,

Looks like I was finally able to get Shibboleth compiled. I posted a
request for help over at www.daemonforums.org (a FreeBSD forum I
frequent) and they recommended I add the following line to the
TCPListener.cpp file:

#include <netinet/in.h>

This seemed to have solved the compile errors. I still got some
warnings, but everything seems to have installed properly now.

Thanks again for all your help on this.

-Tristan

Scott Cantor wrote:

> Tristan Waddington wrote on 2009-01-14:
>> I have some programming experience, but almost none in C++, so I'm
>> having a hell of a time trying to figure out what's wrong. I did some
>> poking around and am wondering if there is a problem with conflicting
>> namespaces or an improperly included file, but I'm really not sure.
>
> I would assume it's a non-included file. The definition of sockaddr_in isn't
> being handled by whatever the non-Windows branch of header inclusion is.
>
> I don't think there's any C++ involved at all, that's just a spurious
> assumption by the compiler because sockaddr_in isn't defined and it's just
> picking one of the in-use namespaces as a possible home for the undeclared
> type.
>
> This is a standard/vanilla socket programming portability bug.
>
> -- Scott
>
>
>

--
Tristan Waddington
[hidden email]
EMU Marketing — Assistant Web Developer
http://emumarketing.uoregon.edu