Unable to compile on FreeBSD
Havard Eidnes
he at uninett.no
Thu Oct 12 21:04:55 UTC 2006
> I maintain the FreeBSD port of the IRRToolSet and would like to bring
> the port up to date at 4.8.4. So far, I have had NO success at all. I
> was getting much farther in the past, but I suspect the gcc I am using is
> a bit more strict about things than the prior version and C++ is not
> something I am at all good with. (This does not make me the ideal port
> maintainer, but no one else would take it and the version in ports at
> the time was really old.)
> I get through configure and make depends, but the make dies almost
> immediately with a long list of warnings and errors:
> g++ -c -O3 -gstabs+ -frtti -DHAVE_CONFIG_H -I. -I. -I../../src -I.. -I../../src/Core -I../../src/rpsl rpslcheck.cc
> In file included from ../../src/Core/gnu/MLCG.h:24,
> from ../../src/Core/util/List.hh:66,
> from ../../src/rpsl/rpsl/object.hh:62,
> from rpslcheck.cc:57:
> ../../src/Core/gnu/RNG.h:26:23: _G_config.h: No such file or directory
Not to beat our drum too heavily, but irrtoolset 4.8.2 at least
builds with gcc 3.3.3 out of NetBSD's pkgsrc collection. On
superficial inspection many of the patches are still applicable,
though I've not yet tried to automatically apply them to 4.8.4.
Among the changes in the pkgsrc diffs there is a move away from
relying on the presence of _G_config.h, and at the same time a
move from _G_uint32_t to the non-implementation-namespace and
portable data type uint32_t.
The diffs are not perfect by any stretch of the imagination,
e.g. the package fails to build with gcc 4.1.2 -- complaints of
"extra qualification" etc., such as
../../src/rpsl/rpsl/prefix.hh:383: error: extra qualification 'MPPrefixRanges::' on member 'MPPrefixRanges'
I've already privately forwarded a pointer to the diffs to Shane
Kerr (putting on the pressure here :-), but for those interested
to have a look, they can either fetch them from
ftp://ftp.NetBSD.org/pub/NetBSD/packages/current-src/pkgsrc/net/irrtoolset-nox11/patches/
or inspect them at
http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/net/irrtoolset-nox11/patches/
A brief summary of the changes are:
o src/config.h.in is amended to conditionally define __P(x).
Use __P() instead of _G_ARGS() in various places.
o Many, many files are patched to replace occurrances of
_G_uint32_t with uint32_t. The former is in the host compiler
implementation's name space, and as far as I know, a library
writer has no business assuming anything about the types
defined in that name space (names starting with a single
underscore character).
o Instead of including <_G_config.h>, use <config.h>, and add
includes of e.g. <sys/types.h> where needed.
o In some places, ambigious qualifications are resolved by
making them explicit, for portability with slightly different
C++ compilers.
o In some cases, portability to newer C++ compilers than GNU C++
version 2.x.y is provided, where the syntax for "friend"
declarations has changed slightly.
o A few troublesome casts removed which newer C++ compilers balk
at.
o Retain <ostream.h> for gcc version <= 2, use <ostream> for
others.
o junos support enabled (+ fixed)
o Portability to Dragonfly BSD (treat as FreeBSD)
o Bugfix for cisco export filters
o One imported bugfix from the RIPE NCC
Best regards,
- Håvard
More information about the irrtoolset
mailing list