From sven.huster at hosteurope.com Tue Jan 13 10:55:02 2004 From: sven.huster at hosteurope.com (sven.huster at hosteurope.com) Date: Tue, 13 Jan 2004 09:55:02 +0000 Subject: Problem with inet-rtr object Message-ID: <20040113095502.GA8730@nms.hosteurope.net> Hello I got some problems trying to use the inet-rtr object. It creates a lot of route-maps for one peer (8 in this case). I would think it should create just one for in and one for out in a normal (simple) case. Any suggestions what I do wrong or what's broken here? Following the input and output used (obviously I removed parts which I consider irrelevant). Regards Sven inet-rtr: r01.hosteurope.net local-as: AS20738 ifaddr: 195.66.226.100 masklen 23 ifaddr: 217.199.160.42 masklen 32 ifaddr: 217.199.160.6 masklen 26 ifaddr: 213.248.100.30 masklen 30 peer: BGP4 195.66.226.12 asno(AS2529) [...] aut-num: AS20738 [...] import: from AS2529 action pref=100; accept AS-DEMON AND NOT {0.0.0.0/0} export: to AS2529 announce AS-MAGMOM [...] echo "@RtConfig configureRouter r01.hosteurope.net" | RtConfig -cisco_use_prefix_lists ! no ip prefix-list pl100 ip prefix-list pl100 permit 62.49.0.0/16 ip prefix-list pl100 permit 62.56.0.0/17 [...] ip prefix-list pl100 permit 213.222.0.0/19 ip prefix-list pl100 permit 217.22.144.0/20 ip prefix-list pl100 deny 0.0.0.0/0 le 32 ! no route-map MyMap_2529_1 ! route-map MyMap_2529_1 permit 1 match ip address prefix-list pl100 set local-preference 900 ! router bgp 20738 neighbor 195.66.226.12 route-map MyMap_2529_1 in ! no ip prefix-list pl101 ip prefix-list pl101 permit 212.67.192.0/19 ip prefix-list pl101 permit 217.199.160.0/19 ip prefix-list pl101 deny 0.0.0.0/0 le 32 ! no route-map MyMap_2529_2 ! route-map MyMap_2529_2 permit 1 match ip address prefix-list pl101 ! router bgp 20738 neighbor 195.66.226.12 route-map MyMap_2529_2 out ! no route-map MyMap_2529_3 ! route-map MyMap_2529_3 permit 1 match ip address prefix-list pl100 set local-preference 900 ! router bgp 20738 neighbor 195.66.226.12 route-map MyMap_2529_3 in ! no route-map MyMap_2529_4 ! route-map MyMap_2529_4 permit 1 match ip address prefix-list pl101 ! router bgp 20738 neighbor 195.66.226.12 route-map MyMap_2529_4 out ! no route-map MyMap_2529_5 ! route-map MyMap_2529_5 permit 1 match ip address prefix-list pl100 set local-preference 900 ! router bgp 20738 neighbor 195.66.226.12 route-map MyMap_2529_5 in ! no route-map MyMap_2529_6 ! route-map MyMap_2529_6 permit 1 match ip address prefix-list pl101 ! router bgp 20738 neighbor 195.66.226.12 route-map MyMap_2529_6 out ! no route-map MyMap_2529_7 ! route-map MyMap_2529_7 permit 1 match ip address prefix-list pl100 set local-preference 900 ! router bgp 20738 neighbor 195.66.226.12 route-map MyMap_2529_7 in ! no route-map MyMap_2529_8 ! route-map MyMap_2529_8 permit 1 match ip address prefix-list pl101 ! router bgp 20738 neighbor 195.66.226.12 route-map MyMap_2529_8 out From katie at ripe.net Wed Jan 14 12:37:32 2004 From: katie at ripe.net (Katie Petrusha) Date: Wed, 14 Jan 2004 12:37:32 +0100 Subject: Problem with inet-rtr object In-Reply-To: <20040113132707.6a114492.BECHA@ripe.net> References: <20040113132707.6a114492.BECHA@ripe.net> Message-ID: <20040114113732.GA20460@ripe.net> Dear Sven, As far as I can see from your AS20738 aut-num object: aut-num: AS20738 import: from AS2529 action pref=100; accept AS-DEMON AND NOT {0.0.0.0/0} export: to AS2529 announce AS-MAGMOM Your peering description of AS2529 is not detailed enough for RtConfig to select your policy correctly. You may try something like: import: from AS2529 at action ... export: to AS2529 at announce ... where peerIP and localIP are matching IPs from your inet-rtr object for this peer. The fully specified description of the peering in this case should be: [ at ] where [] part is optional. But in case if you use inet-rtr, you should use this more detailed description, so that policy selection can be done properly by RtConfig. If your aut-num doesn't have full specification of the peering, like: import: from AS1 export to AS2 then all possible interface addresses will be selected from your inet-rtr object, as there's no indication which local/remote IP pair you use for the peer. I hope I understood the question correctly and this will be helpful. If you need more details on how policy selection is made (in the software) etc, please let me know. The basics are as usual available in RFC2622. Katie Petrusha Software Engineering Department RIPE NCC > Date: Tue, 13 Jan 2004 09:55:02 +0000 > From: sven.huster at hosteurope.com > To: irrtoolset at ripe.net > Subject: Problem with inet-rtr object > > > Hello > > I got some problems trying to use the inet-rtr object. > It creates a lot of route-maps for one peer (8 in this case). > I would think it should create just one for in and one for out in a normal > (simple) case. > > Any suggestions what I do wrong or what's broken here? > > Following the input and output used (obviously I removed parts which I > consider irrelevant). > > Regards > Sven > > inet-rtr: r01.hosteurope.net > local-as: AS20738 > ifaddr: 195.66.226.100 masklen 23 > ifaddr: 217.199.160.42 masklen 32 > ifaddr: 217.199.160.6 masklen 26 > ifaddr: 213.248.100.30 masklen 30 > peer: BGP4 195.66.226.12 asno(AS2529) > [...] > > aut-num: AS20738 > [...] > import: from AS2529 action pref=100; accept AS-DEMON AND NOT > {0.0.0.0/0} > export: to AS2529 announce AS-MAGMOM > [...] > > echo "@RtConfig configureRouter r01.hosteurope.net" | RtConfig > -cisco_use_prefix_lists > ! > no ip prefix-list pl100 > ip prefix-list pl100 permit 62.49.0.0/16 > ip prefix-list pl100 permit 62.56.0.0/17 > [...] > ip prefix-list pl100 permit 213.222.0.0/19 > ip prefix-list pl100 permit 217.22.144.0/20 > ip prefix-list pl100 deny 0.0.0.0/0 le 32 > ! > no route-map MyMap_2529_1 > ! > route-map MyMap_2529_1 permit 1 > match ip address prefix-list pl100 > set local-preference 900 > ! > router bgp 20738 > neighbor 195.66.226.12 route-map MyMap_2529_1 in > ! > no ip prefix-list pl101 > ip prefix-list pl101 permit 212.67.192.0/19 > ip prefix-list pl101 permit 217.199.160.0/19 > ip prefix-list pl101 deny 0.0.0.0/0 le 32 > ! > no route-map MyMap_2529_2 > ! > route-map MyMap_2529_2 permit 1 > match ip address prefix-list pl101 > ! > router bgp 20738 > neighbor 195.66.226.12 route-map MyMap_2529_2 out > ! > no route-map MyMap_2529_3 > ! > route-map MyMap_2529_3 permit 1 > match ip address prefix-list pl100 > set local-preference 900 > ! > router bgp 20738 > neighbor 195.66.226.12 route-map MyMap_2529_3 in > ! > no route-map MyMap_2529_4 > ! > route-map MyMap_2529_4 permit 1 > match ip address prefix-list pl101 > ! > router bgp 20738 > neighbor 195.66.226.12 route-map MyMap_2529_4 out > ! > no route-map MyMap_2529_5 > ! > route-map MyMap_2529_5 permit 1 > match ip address prefix-list pl100 > set local-preference 900 > ! > router bgp 20738 > neighbor 195.66.226.12 route-map MyMap_2529_5 in > ! > no route-map MyMap_2529_6 > ! > route-map MyMap_2529_6 permit 1 > match ip address prefix-list pl101 > ! > router bgp 20738 > neighbor 195.66.226.12 route-map MyMap_2529_6 out > ! > no route-map MyMap_2529_7 > ! > route-map MyMap_2529_7 permit 1 > match ip address prefix-list pl100 > set local-preference 900 > ! > router bgp 20738 > neighbor 195.66.226.12 route-map MyMap_2529_7 in > ! > no route-map MyMap_2529_8 > ! > route-map MyMap_2529_8 permit 1 > match ip address prefix-list pl101 > ! > router bgp 20738 > neighbor 195.66.226.12 route-map MyMap_2529_8 out > From sven.huster at hosteurope.com Wed Jan 14 12:40:17 2004 From: sven.huster at hosteurope.com (Sven Huster) Date: Wed, 14 Jan 2004 11:40:17 -0000 Subject: [irrtoolset]RE: Problem with inet-rtr object Message-ID: <8E442592152B1244995DC6313709A3747515AB@hermione.internal.hosteurope.com> Katie Thanks for this enlightening reply. > -----Original Message----- > From: Katie Petrusha [mailto:katie at ripe.net] > Sent: 14 January 2004 11:38 > To: Sven Huster > Cc: irrtoolset at ripe.net > Subject: Re: Problem with inet-rtr object > > > Dear Sven, > > As far as I can see from your AS20738 aut-num object: > > aut-num: AS20738 > import: from AS2529 action pref=100; accept AS-DEMON > AND NOT {0.0.0.0/0} > export: to AS2529 announce AS-MAGMOM > > Your peering description of AS2529 is not detailed enough for > RtConfig to select your policy correctly. > You may try something like: > > import: from AS2529 at action ... > export: to AS2529 at announce ... > ... > If your aut-num doesn't have full specification of the peering, like: > > import: from AS1 > export to AS2 > > then all possible interface addresses will be selected from > your inet-rtr object, as there's no indication which > local/remote IP pair you use for the peer. 4 interfaces in the inet-rtr => 4 route-maps generated, quite logical Sven From he at uninett.no Tue Jan 20 21:32:53 2004 From: he at uninett.no (Havard Eidnes) Date: Tue, 20 Jan 2004 21:32:53 +0100 (CET) Subject: [irrtoolset]Porting RAToolSet 4.7.1 to the NetBSD package system Message-ID: <20040120.213253.87403660.he@uninett.no> Hi, I'm in the process of making a package in the NetBSD package system for RAToolSet, version 4.7.1. In the process I've uncovered a few issues which I think merit fixing cross-platform: o As far as I know, it is quite non-portable to link C++ programs using $(LD) directly. The reason is that you then have to know or detect what system-, architecture-, and compiler-dependent libraries need to be supplied. It is much easier to just rely on the C++ compiler dealing with those issues, so in the individual Makefile.in's I'm using $(CXX) instead of $(LD). (My ld doesn't much care for -O2 or -I options...) o Your bison invocations all use the '-p' option to specify a different file prefix than 'y.'. However, the subsequent renames do not take into account that the output files are no longer named y.tab.c and y.tab.h. o Some of the Makefile.in's in the tree suppress compiler invocation with @ and instead emit "Compiling ...". This is IMHO unnecessary obfuscation making it more difficult to debug build problems, so I've obliterated a few of them. o src/roe/RadixSet.hh and src/Core/util/List.hh needed to have a few instances of NULL replaced with 0. The complaint from gcc 2.95.3 (which is newer than the documented minimum version) was: c++ -c -I/usr/pkg/include -I/usr/X11R6/include -O2 -I/usr/pkg/include -I/usr/X11R6/include -DHAVE_CONFIG_H -I. -I. -I../../src -I.. -I../../src/Core -I../../src/rpsl -I/usr/X11R6/include object.cc In file included from route-list.hh:42, from object.cc:40: RadixSet.hh:63: `NULL' was not declared in this scope RadixSet.hh:63: confused by earlier errors, bailing out gmake[2]: *** [object.o] Error 1 gmake[2]: Leaving directory `/usr/pkgsrc/net/RAToolSet/work/RAToolSet-4.7.1/src/roe' I suspect the template implementation has not fully settled to tackle this. Using the 0 literal in a pointer context should, if I recall correctly, not cause any portability problems, but I am no C++ language expert... o I needed some system-dependent changes to get proper run-path set in the executables on NetBSD. NetBSD requires explicit -Wl,-R specification, and does not derive that information from passed -L options. I've omitted most of these changes (I'm a little doubtful of their portability), except I've left in the change in which src/roe gets $(LDFLAGS) passed to the compiler's link step. The patches to the individual files I touched can be found in the shar archive attached below. Regards, - H?vard -------------- next part -------------- # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # patch-aa # patch-ab # patch-ac # patch-ad # patch-ae # patch-af # patch-ag # patch-ah # patch-ai # patch-aj # patch-ak # patch-al # patch-am # patch-an # echo x - patch-aa sed 's/^X//' >patch-aa << 'END-of-patch-aa' X$NetBSD$ X X--- src/rpsl/rpsl/Makefile.in.orig Thu Oct 28 20:43:33 1999 X+++ src/rpsl/rpsl/Makefile.in X@@ -60,8 +60,8 @@ default: all X %.y.cc %.y.hh: %.y X @echo Compiling: `basename $<` X $(BISON) -d -p `basename $< .y` $< X- mv y.tab.c `basename $<`.cc X- mv y.tab.h `basename $<`.hh X+ mv `basename $< .y`.tab.c `basename $<`.cc X+ mv `basename $< .y`.tab.h `basename $<`.hh X X %.l.cc: %.l X @echo Compiling: `basename $<` END-of-patch-aa echo x - patch-ab sed 's/^X//' >patch-ab << 'END-of-patch-ab' X$NetBSD$ X X--- src/Core/gnu/Makefile.in.orig Thu Jan 6 00:23:23 2000 X+++ src/Core/gnu/Makefile.in X@@ -60,12 +60,10 @@ default: all X .y.o: X X .c.o: X- @echo Compiling: `basename $<` X- @$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< X X .cc.o: X- @echo Compiling: `basename $<` X- @$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< X X .SUFFIXES: .cc X END-of-patch-ab echo x - patch-ac sed 's/^X//' >patch-ac << 'END-of-patch-ac' X$NetBSD$ X X--- src/Core/sched/Makefile.in.orig Tue Jun 15 17:39:18 1999 X+++ src/Core/sched/Makefile.in X@@ -45,12 +45,10 @@ default: all X .y.o: X X .c.o: X- @echo Compiling: `basename $<` X- @$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< X X .cc.o: X- @echo Compiling: `basename $<` X- @$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< X X .SUFFIXES: .cc X END-of-patch-ac echo x - patch-ad sed 's/^X//' >patch-ad << 'END-of-patch-ad' X$NetBSD$ X X--- src/Core/sys/Makefile.in.orig Tue Jun 15 17:39:18 1999 X+++ src/Core/sys/Makefile.in X@@ -65,12 +65,10 @@ default: all X .y.o: X X .c.o: X- @echo Compiling: `basename $<` X- @$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< X X .cc.o: X- @echo Compiling: `basename $<` X- @$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< X X .SUFFIXES: .cc X END-of-patch-ad echo x - patch-ae sed 's/^X//' >patch-ae << 'END-of-patch-ae' X$NetBSD$ X X--- src/Core/util/Makefile.in.orig Tue Jul 20 20:48:49 1999 X+++ src/Core/util/Makefile.in X@@ -49,12 +49,10 @@ default: all X .y.o: X X .c.o: X- @echo Compiling: `basename $<` X- @$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< X X .cc.o: X- @echo Compiling: `basename $<` X- @$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< X X .SUFFIXES: .cc X END-of-patch-ae echo x - patch-af sed 's/^X//' >patch-af << 'END-of-patch-af' X$NetBSD$ X X--- src/rpslcheck/Makefile.in.orig Thu Jun 15 20:51:23 2000 X+++ src/rpslcheck/Makefile.in X@@ -74,7 +74,7 @@ default: all X all: $(GOAL) X X $(GOAL): $(OBJS) dolibs X- $(LD) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) X+ $(CXX) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) X X dolibs: X @ for f in $(REQUIRES); do cd ../$$f; $(MAKE) $(MFLAGS); done END-of-patch-af echo x - patch-ag sed 's/^X//' >patch-ag << 'END-of-patch-ag' X$NetBSD$ X X--- src/peval/Makefile.in.orig Thu Jun 15 20:51:23 2000 X+++ src/peval/Makefile.in X@@ -52,8 +52,8 @@ default: all X %.y.cc %.y.hh: %.y X @echo Compiling: `basename $<` X $(BISON) -d -p `basename $< .y` $< X- mv y.tab.c $<.cc X- mv y.tab.h $<.hh X+ mv `basename $< .y`.tab.c $<.cc X+ mv `basename $< .y`.tab.h $<.hh X X %.l.cc: %.l X @echo Compiling: `basename $<` X@@ -74,7 +74,7 @@ default: all X all: $(GOAL) X X $(GOAL): $(OBJS) dolibs X- $(LD) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) X+ $(CXX) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) X X dolibs: X @ for f in $(REQUIRES); do cd ../$$f; $(MAKE) $(MFLAGS); done END-of-patch-ag echo x - patch-ah sed 's/^X//' >patch-ah << 'END-of-patch-ah' X$NetBSD$ X X--- src/RtConfig/Makefile.in.orig Thu Jun 15 20:51:23 2000 X+++ src/RtConfig/Makefile.in X@@ -52,8 +52,8 @@ default: all X %.y.cc %.y.hh: %.y X @echo Compiling: `basename $<` X $(BISON) -d -p `basename $< .y` $< X- mv y.tab.c `basename $<`.cc X- mv y.tab.h `basename $<`.hh X+ mv `basename $< .y`.tab.c `basename $<`.cc X+ mv `basename $< .y`.tab.h `basename $<`.hh X X %.l.cc: %.l X @echo Compiling: `basename $<` X@@ -74,7 +74,7 @@ default: all X all: $(GOAL) X X $(GOAL): $(OBJS) dolibs X- $(LD) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) X+ $(CXX) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) X X dolibs: X @ for f in $(REQUIRES); do cd ../$$f; $(MAKE) $(MFLAGS); done END-of-patch-ah echo x - patch-ai sed 's/^X//' >patch-ai << 'END-of-patch-ai' X$NetBSD$ X X--- src/prtraceroute/Makefile.in.orig Thu Jun 15 20:51:23 2000 X+++ src/prtraceroute/Makefile.in X@@ -53,8 +53,8 @@ default: all X %.y.cc %.y.hh: %.y X @echo Compiling: `basename $<` X $(BISON) -d -p `basename $< .y` $< X- mv y.tab.c `basename $<`.cc X- mv y.tab.h `basename $<`.hh X+ mv `basename $< .y`.tab.c `basename $<`.cc X+ mv `basename $< .y`.tab.h `basename $<`.hh X X %.l.cc: %.l X @echo Compiling: `basename $<` X@@ -75,7 +75,7 @@ default: all X all: $(GOAL) X X $(GOAL): $(OBJS) dolibs X- $(LD) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) X+ $(CXX) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) X X dolibs: X @ for f in $(REQUIRES); do cd ../$$f; $(MAKE) $(MFLAGS); done END-of-patch-ai echo x - patch-aj sed 's/^X//' >patch-aj << 'END-of-patch-aj' X$NetBSD$ X X--- src/CIDRAdvisor/Makefile.in.orig Thu Jun 15 20:51:23 2000 X+++ src/CIDRAdvisor/Makefile.in X@@ -50,8 +50,8 @@ default: all X %.y.cc %.y.hh: %.y X @echo Compiling: `basename $<` X $(BISON) -d -p `basename $< .y` $< X- mv y.tab.c `basename $<`.cc X- mv y.tab.h `basename $<`.hh X+ mv `basename $< .y`.tab.c `basename $<`.cc X+ mv `basename $< .y`.tab.h `basename $<`.hh X X %.l.cc: %.l X @echo Compiling: `basename $<` X@@ -72,7 +72,7 @@ default: all X all: $(GOAL) X X $(GOAL): $(OBJS) dolibs X- $(LD) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) X+ $(CXX) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) X X dolibs: X @ for f in $(REQUIRES); do cd ../$$f; $(MAKE) $(MFLAGS); done END-of-patch-aj echo x - patch-ak sed 's/^X//' >patch-ak << 'END-of-patch-ak' X$NetBSD$ X X--- src/roe/Makefile.in.orig Thu Jun 15 20:51:23 2000 X+++ src/roe/Makefile.in X@@ -63,8 +63,8 @@ default: all X %.y.cc %.y.hh: %.y X @echo Compiling: `basename $<` X $(BISON) -d -p `basename $< .y` $< X- mv y.tab.c $<.cc X- mv y.tab.h $<.hh X+ mv `basename $< .y`.tab.c $<.cc X+ mv `basename $< .y`.tab.h $<.hh X X %.l.cc: %.l X @echo Compiling: `basename $<` X@@ -72,12 +72,10 @@ default: all X mv lex.`basename $< .l`.c $<.cc X X .c.o: X- @echo Compiling: `basename $<` X- @$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< X X .cc.o: X- @echo Compiling: `basename $<` X- @$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< X X # Transformations applied to each line of the file: X # eliminate blank lines X@@ -117,7 +115,7 @@ default: all X all: $(GOAL) X X $(GOAL): $(OBJS) dolibs X- $(LD) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) X+ $(CXX) $(CFLAGS) -o $(GOAL) $(OBJS) $(LDFLAGS) $(LIBS) X X dolibs: X @ cd ..; $(MAKE) $(MFLAGS) dolibs END-of-patch-ak echo x - patch-al sed 's/^X//' >patch-al << 'END-of-patch-al' X$NetBSD$ X X--- src/roe/RadixSet.hh.orig Tue Feb 20 17:11:55 2001 X+++ src/roe/RadixSet.hh X@@ -46,10 +46,10 @@ X X class RadixNode { X public: X- RadixNode() : left(NULL), rght(NULL), prnt(NULL), X- state(RADIX_EMPTY), data(NULL) {} X- RadixNode(RadixNode *p) : left(NULL), rght(NULL), prnt(p), X- state(RADIX_EMPTY), data(NULL){} X+ RadixNode() : left(0), rght(0), prnt(0), X+ state(RADIX_EMPTY), data(0) {} X+ RadixNode(RadixNode *p) : left(0), rght(0), prnt(p), X+ state(RADIX_EMPTY), data(0){} X X RadixNode *left; // left child X RadixNode *rght; // right child X@@ -58,7 +58,7 @@ public: X int state; // state == empty is an intermediate node which is not in tree X void *data; // X X- RadixNode *insert(void *dt = NULL); X+ RadixNode *insert(void *dt = 0); X RadixNode *find(PrefixRange *dt); X RadixNode *next(); // returns the next rt in radix order X X@@ -69,7 +69,7 @@ private: X template X class Radix : public RadixNode { X public: X- RadixNode *insert(T *dt = NULL) { X+ RadixNode *insert(T *dt = 0) { X return RadixNode::insert(dt); X } X X@@ -79,9 +79,9 @@ public: X X void clear(void) { X clear(this); X- left = rght = prnt = NULL; X+ left = rght = prnt = 0; X state = RADIX_EMPTY; X- data = NULL; X+ data = 0; X } X void clear(RadixNode *r) { X if (!r) return; END-of-patch-al echo x - patch-am sed 's/^X//' >patch-am << 'END-of-patch-am' X$NetBSD$ X X--- src/prpath/Makefile.in.orig Thu Jun 15 20:51:23 2000 X+++ src/prpath/Makefile.in X@@ -50,8 +50,8 @@ default: all X %.y.cc %.y.hh: %.y X @echo Compiling: `basename $<` X $(BISON) -d -p `basename $< .y` $< X- mv y.tab.c `basename $<`.cc X- mv y.tab.h `basename $<`.hh X+ mv `basename $< .y`.tab.c `basename $<`.cc X+ mv `basename $< .y`.tab.h `basename $<`.hh X X %.l.cc: %.l X @echo Compiling: `basename $<` X@@ -72,7 +72,7 @@ default: all X all: $(GOAL) X X $(GOAL): $(OBJS) dolibs X- $(LD) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) X+ $(CXX) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) X X dolibs: X @ for f in $(REQUIRES); do cd ../$$f; $(MAKE) $(MFLAGS); done END-of-patch-am echo x - patch-an sed 's/^X//' >patch-an << 'END-of-patch-an' X$NetBSD$ X X--- src/Core/util/List.hh.orig Fri Nov 10 00:50:57 2000 X+++ src/Core/util/List.hh X@@ -352,19 +352,19 @@ public: X X // traversal routines X T *head() const { X- return (forw == (const ListNode *) this) ? (T *) NULL : (T *) forw; X+ return (forw == (const ListNode *) this) ? (T *) 0 : (T *) forw; X } X X T *tail() const { X- return (back == (const ListNode *) this) ? (T *) NULL : (T *) back; X+ return (back == (const ListNode *) this) ? (T *) 0 : (T *) back; X } X X T *next(const T *n) const { X- return (n->forw == (const ListNode *) this) ? (T *) NULL : (T *) n->forw; X+ return (n->forw == (const ListNode *) this) ? (T *) 0 : (T *) n->forw; X } X X T *prev(const T *n) const { X- return (n->back == (const ListNode *) this) ? (T *) NULL : (T *) n->back; X+ return (n->back == (const ListNode *) this) ? (T *) 0 : (T *) n->back; X } X }; X END-of-patch-an exit From he at uninett.no Wed Jan 21 22:55:59 2004 From: he at uninett.no (Havard Eidnes) Date: Wed, 21 Jan 2004 22:55:59 +0100 (CET) Subject: [irrtoolset]Making IRRToolSet compile... Message-ID: <20040121.225559.35625018.he@uninett.no> Hi, me again. Someone pointed me towards IRRToolSet which is a bit newer than RAToolSet. I'm trying to make IRRToolSet 4.8.1 compile on NetBSD 1.6 with gcc 2.95.3 and the libsdc++ which came with that compiler. First off: it seems that almost all of the diffs I sent earlier against RAToolSet still have to be applied to IRRToolSet. Second: how has anyone got IRRToolSet 4.8.1 to compile?!? I have to ask, because I get: c++ -c -I/usr/pkg/include -I/usr/X11R6/include -O2 -I/usr/pkg/include -I/usr/X11R6/include -DHAVE_CONFIG_H -I. -I. -I.. -I../src -I../../Core prefix.cc prefix.cc: In method `void MPPrefixRanges::and(MPPrefixRanges *)': prefix.cc:1147: implicit declaration of function `int assign(...)' gmake[4]: *** [prefix.o] Error 1 gmake[4]: Leaving directory `/usr/pkgsrc/net/IRRToolSet/work/IRRToolSet-4.8.1/src/rpsl/rpsl' ...and implicit declarations in C++ are as far as I know fatal. How can this compile at all on any other platform? Fixing this appears to require more C++ skills or familiarity with the code than I have, so assistance on this point would be much appreciated. Regards, - H?vard From jon at lawrence.org.uk Wed Jan 21 23:08:05 2004 From: jon at lawrence.org.uk (Jon Lawrence) Date: Wed, 21 Jan 2004 22:08:05 +0000 Subject: [irrtoolset]Making IRRToolSet compile... In-Reply-To: <20040121.225559.35625018.he@uninett.no> References: <20040121.225559.35625018.he@uninett.no> Message-ID: <200401212208.05470.jon@lawrence.org.uk> On Wednesday 21 January 2004 9:55 pm, Havard Eidnes wrote: > Hi, > > me again. Someone pointed me towards IRRToolSet which is a bit > newer than RAToolSet. I'm trying to make IRRToolSet 4.8.1 > compile on NetBSD 1.6 with gcc 2.95.3 and the libsdc++ which came > with that compiler. > > First off: it seems that almost all of the diffs I sent earlier > against RAToolSet still have to be applied to IRRToolSet. > > Second: how has anyone got IRRToolSet 4.8.1 to compile?!? I have > to ask, because I get: > > c++ -c -I/usr/pkg/include -I/usr/X11R6/include -O2 -I/usr/pkg/include > -I/usr/X11R6/include -DHAVE_CONFIG_H -I. -I. -I.. -I../src -I../../Core > prefix.cc prefix.cc: In method `void MPPrefixRanges::and(MPPrefixRanges > *)': prefix.cc:1147: implicit declaration of function `int assign(...)' > gmake[4]: *** [prefix.o] Error 1 > gmake[4]: Leaving directory > `/usr/pkgsrc/net/IRRToolSet/work/IRRToolSet-4.8.1/src/rpsl/rpsl' > > ...and implicit declarations in C++ are as far as I know fatal. > How can this compile at all on any other platform? > > Fixing this appears to require more C++ skills or familiarity > with the code than I have, so assistance on this point would be > much appreciated. > I also haven't yet managed to get it to compile - I've just setup a debian 3.0 box so that I have a system with References: <20040121.225559.35625018.he@uninett.no> Message-ID: <20040122092531.GA10349@ripe.net> On Wed, Jan 21, 2004 at 10:55:59PM +0100, Havard Eidnes wrote: Dear Havard, All information about IRRToolSet and supported platforms is available at: http://www.ripe.net/db/irrtoolset You can also find link to ftp site there. The development platform ( for last 2 years at least) was Linux PC using gcc-2.95.3 and libstdc++-2.9.0. I haven't seen any compilation problems there. There are binaries available for FreeBSD, Solaris and Linux (see ftp site). Unfortunately we don't have NetBSD platform here to use it as a test platform; If you manage to compile with patches you supply on your NetBSD, we can incorporate them into the source code (however I can't test it here myself). Please also note that IRRToolSet-4.8.1 supports RPSLng, so you might need a IRR server which supports RPSLng too. See RELEASE-NOTES for further details. Hopefully it will be helpful. > Hi, > > me again. Someone pointed me towards IRRToolSet which is a bit > newer than RAToolSet. I'm trying to make IRRToolSet 4.8.1 > compile on NetBSD 1.6 with gcc 2.95.3 and the libsdc++ which came > with that compiler. Which version of libstdc++ are you using? > > First off: it seems that almost all of the diffs I sent earlier > against RAToolSet still have to be applied to IRRToolSet. > > Second: how has anyone got IRRToolSet 4.8.1 to compile?!? I have > to ask, because I get: > > c++ -c -I/usr/pkg/include -I/usr/X11R6/include -O2 -I/usr/pkg/include -I/usr/X11R6/include -DHAVE_CONFIG_H -I. -I. -I.. -I../src -I../../Core prefix.cc > prefix.cc: In method `void MPPrefixRanges::and(MPPrefixRanges *)': > prefix.cc:1147: implicit declaration of function `int assign(...)' > gmake[4]: *** [prefix.o] Error 1 > gmake[4]: Leaving directory `/usr/pkgsrc/net/IRRToolSet/work/IRRToolSet-4.8.1/src/rpsl/rpsl' > > ...and implicit declarations in C++ are as far as I know fatal. > How can this compile at all on any other platform? > > Fixing this appears to require more C++ skills or familiarity > with the code than I have, so assistance on this point would be > much appreciated. assign() is a standard STL function (as insert, erase) to operate with STL vectors. I do have it in my STL libraries, but maybe you don't? Could it be deprecated? :( I shall look what could be used instead. Thanks for highlighting this issue! > > Regards, > > - H?vard > -- Kind regards, Katie Petrusha Software Engineering Department RIPE NCC From katie at ripe.net Thu Jan 22 10:28:27 2004 From: katie at ripe.net (Katie Petrusha) Date: Thu, 22 Jan 2004 10:28:27 +0100 Subject: [irrtoolset]Making IRRToolSet compile... In-Reply-To: <200401212208.05470.jon@lawrence.org.uk> References: <20040121.225559.35625018.he@uninett.no> <200401212208.05470.jon@lawrence.org.uk> Message-ID: <20040122092827.GB10349@ripe.net> On Wed, Jan 21, 2004 at 10:08:05PM +0000, Jon Lawrence wrote: > On Wednesday 21 January 2004 9:55 pm, Havard Eidnes wrote: > > Hi, > > > > me again. Someone pointed me towards IRRToolSet which is a bit > > newer than RAToolSet. I'm trying to make IRRToolSet 4.8.1 > > compile on NetBSD 1.6 with gcc 2.95.3 and the libsdc++ which came > > with that compiler. > > > > First off: it seems that almost all of the diffs I sent earlier > > against RAToolSet still have to be applied to IRRToolSet. > > > > Second: how has anyone got IRRToolSet 4.8.1 to compile?!? I have > > to ask, because I get: > > > > c++ -c -I/usr/pkg/include -I/usr/X11R6/include -O2 -I/usr/pkg/include > > -I/usr/X11R6/include -DHAVE_CONFIG_H -I. -I. -I.. -I../src -I../../Core > > prefix.cc prefix.cc: In method `void MPPrefixRanges::and(MPPrefixRanges > > *)': prefix.cc:1147: implicit declaration of function `int assign(...)' > > gmake[4]: *** [prefix.o] Error 1 > > gmake[4]: Leaving directory > > `/usr/pkgsrc/net/IRRToolSet/work/IRRToolSet-4.8.1/src/rpsl/rpsl' > > > > ...and implicit declarations in C++ are as far as I know fatal. > > How can this compile at all on any other platform? > > > > Fixing this appears to require more C++ skills or familiarity > > with the code than I have, so assistance on this point would be > > much appreciated. > > Dear Jon, Please see http://www.ripe.net/db/irrtoolset for all the information. > I also haven't yet managed to get it to compile - I've just setup a debian 3.0 > box so that I have a system with version runs fine on the Debian box, which is good enough for my purposes at > present :) As far as I can remember, the README supplied together with IRRToolSet mentions that IRRToolSet is unfortunately not yet gcc-3 compliant and therefore you cannot use this compiler :-( We will update the code to be gcc-3 compliant at some point. But for now, please use gcc-2.95-*. > > Could someone post a system spec (software wise) that is known to work (for > compiling) - please include distro if possible. I can send you the binaries for platforms where it was compiled, but probably ftp is more convenient source. > > Regards, > Jon -- Kind regards, Katie Petrusha Software Engineering Department RIPE NCC From katie at ripe.net Thu Jan 22 10:37:27 2004 From: katie at ripe.net (Katie Petrusha) Date: Thu, 22 Jan 2004 10:37:27 +0100 Subject: [irrtoolset]Porting RAToolSet 4.7.1 to the NetBSD package system In-Reply-To: <20040120.213253.87403660.he@uninett.no> References: <20040120.213253.87403660.he@uninett.no> Message-ID: <20040122093727.GC10349@ripe.net> On Tue, Jan 20, 2004 at 09:32:53PM +0100, Havard Eidnes wrote: Dear Havard, Thanks a lot for the patches. Let me try them on other platforms I have available to see how compatible they are; I'll come back to you as soon as I can. Thanks again! P.S. Please note that ratoolset at ISI.EDU has been moved to irrtoolset at ripe.net. Katie Petrusha Software Engineering Department RIPE NCC > Hi, > > I'm in the process of making a package in the NetBSD package > system for RAToolSet, version 4.7.1. In the process I've > uncovered a few issues which I think merit fixing cross-platform: > > o As far as I know, it is quite non-portable to link C++ programs > using $(LD) directly. The reason is that you then have to know > or detect what system-, architecture-, and compiler-dependent > libraries need to be supplied. It is much easier to just rely on > the C++ compiler dealing with those issues, so in the individual > Makefile.in's I'm using $(CXX) instead of $(LD). (My ld doesn't > much care for -O2 or -I options...) > > o Your bison invocations all use the '-p' option to specify a > different file prefix than 'y.'. However, the subsequent > renames do not take into account that the output files are no > longer named y.tab.c and y.tab.h. > > o Some of the Makefile.in's in the tree suppress compiler > invocation with @ and instead emit "Compiling ...". This is IMHO > unnecessary obfuscation making it more difficult to debug build > problems, so I've obliterated a few of them. > > o src/roe/RadixSet.hh and src/Core/util/List.hh needed to have a > few instances of NULL replaced with 0. The complaint from gcc > 2.95.3 (which is newer than the documented minimum version) > was: > > c++ -c -I/usr/pkg/include -I/usr/X11R6/include -O2 -I/usr/pkg/include -I/usr/X11R6/include -DHAVE_CONFIG_H -I. -I. -I../../src -I.. -I../../src/Core -I../../src/rpsl -I/usr/X11R6/include object.cc > In file included from route-list.hh:42, > from object.cc:40: > RadixSet.hh:63: `NULL' was not declared in this scope > RadixSet.hh:63: confused by earlier errors, bailing out > gmake[2]: *** [object.o] Error 1 > gmake[2]: Leaving directory `/usr/pkgsrc/net/RAToolSet/work/RAToolSet-4.7.1/src/roe' > > I suspect the template implementation has not fully settled to > tackle this. Using the 0 literal in a pointer context should, if > I recall correctly, not cause any portability problems, but I am > no C++ language expert... > > o I needed some system-dependent changes to get proper run-path set > in the executables on NetBSD. NetBSD requires explicit > -Wl,-R specification, and does not derive that > information from passed -L options. I've omitted most of > these changes (I'm a little doubtful of their portability), > except I've left in the change in which src/roe gets $(LDFLAGS) > passed to the compiler's link step. > > The patches to the individual files I touched can be found in the > shar archive attached below. > > Regards, > > - H?vard > # This is a shell archive. Save it in a file, remove anything before > # this line, and then unpack it by entering "sh file". Note, it may > # create directories; files and directories will be owned by you and > # have default permissions. > # > # This archive contains: > # > # patch-aa > # patch-ab > # patch-ac > # patch-ad > # patch-ae > # patch-af > # patch-ag > # patch-ah > # patch-ai > # patch-aj > # patch-ak > # patch-al > # patch-am > # patch-an > # > echo x - patch-aa > sed 's/^X//' >patch-aa << 'END-of-patch-aa' > X$NetBSD$ > X > X--- src/rpsl/rpsl/Makefile.in.orig Thu Oct 28 20:43:33 1999 > X+++ src/rpsl/rpsl/Makefile.in > X@@ -60,8 +60,8 @@ default: all > X %.y.cc %.y.hh: %.y > X @echo Compiling: `basename $<` > X $(BISON) -d -p `basename $< .y` $< > X- mv y.tab.c `basename $<`.cc > X- mv y.tab.h `basename $<`.hh > X+ mv `basename $< .y`.tab.c `basename $<`.cc > X+ mv `basename $< .y`.tab.h `basename $<`.hh > X > X %.l.cc: %.l > X @echo Compiling: `basename $<` > END-of-patch-aa > echo x - patch-ab > sed 's/^X//' >patch-ab << 'END-of-patch-ab' > X$NetBSD$ > X > X--- src/Core/gnu/Makefile.in.orig Thu Jan 6 00:23:23 2000 > X+++ src/Core/gnu/Makefile.in > X@@ -60,12 +60,10 @@ default: all > X .y.o: > X > X .c.o: > X- @echo Compiling: `basename $<` > X- @$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< > X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< > X > X .cc.o: > X- @echo Compiling: `basename $<` > X- @$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< > X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< > X > X .SUFFIXES: .cc > X > END-of-patch-ab > echo x - patch-ac > sed 's/^X//' >patch-ac << 'END-of-patch-ac' > X$NetBSD$ > X > X--- src/Core/sched/Makefile.in.orig Tue Jun 15 17:39:18 1999 > X+++ src/Core/sched/Makefile.in > X@@ -45,12 +45,10 @@ default: all > X .y.o: > X > X .c.o: > X- @echo Compiling: `basename $<` > X- @$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< > X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< > X > X .cc.o: > X- @echo Compiling: `basename $<` > X- @$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< > X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< > X > X .SUFFIXES: .cc > X > END-of-patch-ac > echo x - patch-ad > sed 's/^X//' >patch-ad << 'END-of-patch-ad' > X$NetBSD$ > X > X--- src/Core/sys/Makefile.in.orig Tue Jun 15 17:39:18 1999 > X+++ src/Core/sys/Makefile.in > X@@ -65,12 +65,10 @@ default: all > X .y.o: > X > X .c.o: > X- @echo Compiling: `basename $<` > X- @$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< > X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< > X > X .cc.o: > X- @echo Compiling: `basename $<` > X- @$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< > X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< > X > X .SUFFIXES: .cc > X > END-of-patch-ad > echo x - patch-ae > sed 's/^X//' >patch-ae << 'END-of-patch-ae' > X$NetBSD$ > X > X--- src/Core/util/Makefile.in.orig Tue Jul 20 20:48:49 1999 > X+++ src/Core/util/Makefile.in > X@@ -49,12 +49,10 @@ default: all > X .y.o: > X > X .c.o: > X- @echo Compiling: `basename $<` > X- @$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< > X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< > X > X .cc.o: > X- @echo Compiling: `basename $<` > X- @$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< > X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< > X > X .SUFFIXES: .cc > X > END-of-patch-ae > echo x - patch-af > sed 's/^X//' >patch-af << 'END-of-patch-af' > X$NetBSD$ > X > X--- src/rpslcheck/Makefile.in.orig Thu Jun 15 20:51:23 2000 > X+++ src/rpslcheck/Makefile.in > X@@ -74,7 +74,7 @@ default: all > X all: $(GOAL) > X > X $(GOAL): $(OBJS) dolibs > X- $(LD) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) > X+ $(CXX) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) > X > X dolibs: > X @ for f in $(REQUIRES); do cd ../$$f; $(MAKE) $(MFLAGS); done > END-of-patch-af > echo x - patch-ag > sed 's/^X//' >patch-ag << 'END-of-patch-ag' > X$NetBSD$ > X > X--- src/peval/Makefile.in.orig Thu Jun 15 20:51:23 2000 > X+++ src/peval/Makefile.in > X@@ -52,8 +52,8 @@ default: all > X %.y.cc %.y.hh: %.y > X @echo Compiling: `basename $<` > X $(BISON) -d -p `basename $< .y` $< > X- mv y.tab.c $<.cc > X- mv y.tab.h $<.hh > X+ mv `basename $< .y`.tab.c $<.cc > X+ mv `basename $< .y`.tab.h $<.hh > X > X %.l.cc: %.l > X @echo Compiling: `basename $<` > X@@ -74,7 +74,7 @@ default: all > X all: $(GOAL) > X > X $(GOAL): $(OBJS) dolibs > X- $(LD) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) > X+ $(CXX) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) > X > X dolibs: > X @ for f in $(REQUIRES); do cd ../$$f; $(MAKE) $(MFLAGS); done > END-of-patch-ag > echo x - patch-ah > sed 's/^X//' >patch-ah << 'END-of-patch-ah' > X$NetBSD$ > X > X--- src/RtConfig/Makefile.in.orig Thu Jun 15 20:51:23 2000 > X+++ src/RtConfig/Makefile.in > X@@ -52,8 +52,8 @@ default: all > X %.y.cc %.y.hh: %.y > X @echo Compiling: `basename $<` > X $(BISON) -d -p `basename $< .y` $< > X- mv y.tab.c `basename $<`.cc > X- mv y.tab.h `basename $<`.hh > X+ mv `basename $< .y`.tab.c `basename $<`.cc > X+ mv `basename $< .y`.tab.h `basename $<`.hh > X > X %.l.cc: %.l > X @echo Compiling: `basename $<` > X@@ -74,7 +74,7 @@ default: all > X all: $(GOAL) > X > X $(GOAL): $(OBJS) dolibs > X- $(LD) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) > X+ $(CXX) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) > X > X dolibs: > X @ for f in $(REQUIRES); do cd ../$$f; $(MAKE) $(MFLAGS); done > END-of-patch-ah > echo x - patch-ai > sed 's/^X//' >patch-ai << 'END-of-patch-ai' > X$NetBSD$ > X > X--- src/prtraceroute/Makefile.in.orig Thu Jun 15 20:51:23 2000 > X+++ src/prtraceroute/Makefile.in > X@@ -53,8 +53,8 @@ default: all > X %.y.cc %.y.hh: %.y > X @echo Compiling: `basename $<` > X $(BISON) -d -p `basename $< .y` $< > X- mv y.tab.c `basename $<`.cc > X- mv y.tab.h `basename $<`.hh > X+ mv `basename $< .y`.tab.c `basename $<`.cc > X+ mv `basename $< .y`.tab.h `basename $<`.hh > X > X %.l.cc: %.l > X @echo Compiling: `basename $<` > X@@ -75,7 +75,7 @@ default: all > X all: $(GOAL) > X > X $(GOAL): $(OBJS) dolibs > X- $(LD) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) > X+ $(CXX) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) > X > X dolibs: > X @ for f in $(REQUIRES); do cd ../$$f; $(MAKE) $(MFLAGS); done > END-of-patch-ai > echo x - patch-aj > sed 's/^X//' >patch-aj << 'END-of-patch-aj' > X$NetBSD$ > X > X--- src/CIDRAdvisor/Makefile.in.orig Thu Jun 15 20:51:23 2000 > X+++ src/CIDRAdvisor/Makefile.in > X@@ -50,8 +50,8 @@ default: all > X %.y.cc %.y.hh: %.y > X @echo Compiling: `basename $<` > X $(BISON) -d -p `basename $< .y` $< > X- mv y.tab.c `basename $<`.cc > X- mv y.tab.h `basename $<`.hh > X+ mv `basename $< .y`.tab.c `basename $<`.cc > X+ mv `basename $< .y`.tab.h `basename $<`.hh > X > X %.l.cc: %.l > X @echo Compiling: `basename $<` > X@@ -72,7 +72,7 @@ default: all > X all: $(GOAL) > X > X $(GOAL): $(OBJS) dolibs > X- $(LD) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) > X+ $(CXX) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) > X > X dolibs: > X @ for f in $(REQUIRES); do cd ../$$f; $(MAKE) $(MFLAGS); done > END-of-patch-aj > echo x - patch-ak > sed 's/^X//' >patch-ak << 'END-of-patch-ak' > X$NetBSD$ > X > X--- src/roe/Makefile.in.orig Thu Jun 15 20:51:23 2000 > X+++ src/roe/Makefile.in > X@@ -63,8 +63,8 @@ default: all > X %.y.cc %.y.hh: %.y > X @echo Compiling: `basename $<` > X $(BISON) -d -p `basename $< .y` $< > X- mv y.tab.c $<.cc > X- mv y.tab.h $<.hh > X+ mv `basename $< .y`.tab.c $<.cc > X+ mv `basename $< .y`.tab.h $<.hh > X > X %.l.cc: %.l > X @echo Compiling: `basename $<` > X@@ -72,12 +72,10 @@ default: all > X mv lex.`basename $< .l`.c $<.cc > X > X .c.o: > X- @echo Compiling: `basename $<` > X- @$(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< > X+ $(CC) -c $(CPPFLAGS) $(CFLAGS) $(DEFINES) $(INCDIRS) $< > X > X .cc.o: > X- @echo Compiling: `basename $<` > X- @$(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< > X+ $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(DEFINES) $(INCDIRS) $< > X > X # Transformations applied to each line of the file: > X # eliminate blank lines > X@@ -117,7 +115,7 @@ default: all > X all: $(GOAL) > X > X $(GOAL): $(OBJS) dolibs > X- $(LD) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) > X+ $(CXX) $(CFLAGS) -o $(GOAL) $(OBJS) $(LDFLAGS) $(LIBS) > X > X dolibs: > X @ cd ..; $(MAKE) $(MFLAGS) dolibs > END-of-patch-ak > echo x - patch-al > sed 's/^X//' >patch-al << 'END-of-patch-al' > X$NetBSD$ > X > X--- src/roe/RadixSet.hh.orig Tue Feb 20 17:11:55 2001 > X+++ src/roe/RadixSet.hh > X@@ -46,10 +46,10 @@ > X > X class RadixNode { > X public: > X- RadixNode() : left(NULL), rght(NULL), prnt(NULL), > X- state(RADIX_EMPTY), data(NULL) {} > X- RadixNode(RadixNode *p) : left(NULL), rght(NULL), prnt(p), > X- state(RADIX_EMPTY), data(NULL){} > X+ RadixNode() : left(0), rght(0), prnt(0), > X+ state(RADIX_EMPTY), data(0) {} > X+ RadixNode(RadixNode *p) : left(0), rght(0), prnt(p), > X+ state(RADIX_EMPTY), data(0){} > X > X RadixNode *left; // left child > X RadixNode *rght; // right child > X@@ -58,7 +58,7 @@ public: > X int state; // state == empty is an intermediate node which is not in tree > X void *data; // > X > X- RadixNode *insert(void *dt = NULL); > X+ RadixNode *insert(void *dt = 0); > X RadixNode *find(PrefixRange *dt); > X RadixNode *next(); // returns the next rt in radix order > X > X@@ -69,7 +69,7 @@ private: > X template > X class Radix : public RadixNode { > X public: > X- RadixNode *insert(T *dt = NULL) { > X+ RadixNode *insert(T *dt = 0) { > X return RadixNode::insert(dt); > X } > X > X@@ -79,9 +79,9 @@ public: > X > X void clear(void) { > X clear(this); > X- left = rght = prnt = NULL; > X+ left = rght = prnt = 0; > X state = RADIX_EMPTY; > X- data = NULL; > X+ data = 0; > X } > X void clear(RadixNode *r) { > X if (!r) return; > END-of-patch-al > echo x - patch-am > sed 's/^X//' >patch-am << 'END-of-patch-am' > X$NetBSD$ > X > X--- src/prpath/Makefile.in.orig Thu Jun 15 20:51:23 2000 > X+++ src/prpath/Makefile.in > X@@ -50,8 +50,8 @@ default: all > X %.y.cc %.y.hh: %.y > X @echo Compiling: `basename $<` > X $(BISON) -d -p `basename $< .y` $< > X- mv y.tab.c `basename $<`.cc > X- mv y.tab.h `basename $<`.hh > X+ mv `basename $< .y`.tab.c `basename $<`.cc > X+ mv `basename $< .y`.tab.h `basename $<`.hh > X > X %.l.cc: %.l > X @echo Compiling: `basename $<` > X@@ -72,7 +72,7 @@ default: all > X all: $(GOAL) > X > X $(GOAL): $(OBJS) dolibs > X- $(LD) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) > X+ $(CXX) $(CFLAGS) -o $(GOAL) $(OBJS) $(LIBS) > X > X dolibs: > X @ for f in $(REQUIRES); do cd ../$$f; $(MAKE) $(MFLAGS); done > END-of-patch-am > echo x - patch-an > sed 's/^X//' >patch-an << 'END-of-patch-an' > X$NetBSD$ > X > X--- src/Core/util/List.hh.orig Fri Nov 10 00:50:57 2000 > X+++ src/Core/util/List.hh > X@@ -352,19 +352,19 @@ public: > X > X // traversal routines > X T *head() const { > X- return (forw == (const ListNode *) this) ? (T *) NULL : (T *) forw; > X+ return (forw == (const ListNode *) this) ? (T *) 0 : (T *) forw; > X } > X > X T *tail() const { > X- return (back == (const ListNode *) this) ? (T *) NULL : (T *) back; > X+ return (back == (const ListNode *) this) ? (T *) 0 : (T *) back; > X } > X > X T *next(const T *n) const { > X- return (n->forw == (const ListNode *) this) ? (T *) NULL : (T *) n->forw; > X+ return (n->forw == (const ListNode *) this) ? (T *) 0 : (T *) n->forw; > X } > X > X T *prev(const T *n) const { > X- return (n->back == (const ListNode *) this) ? (T *) NULL : (T *) n->back; > X+ return (n->back == (const ListNode *) this) ? (T *) 0 : (T *) n->back; > X } > X }; > X > END-of-patch-an > exit > -- Kind regards, Katje From Tony.Li at procket.com Thu Jan 22 10:43:53 2004 From: Tony.Li at procket.com (Tony Li) Date: Thu, 22 Jan 2004 01:43:53 -0800 Subject: [irrtoolset]Making IRRToolSet compile... Message-ID: Katie, | As far as I can remember, the README supplied together with | IRRToolSet mentions that | IRRToolSet is unfortunately not yet gcc-3 compliant and | therefore you cannot | use this compiler :-( We will update the code to be gcc-3 | compliant at some point. | But for now, please use gcc-2.95-*. The README says: 0. To install, you need g++ 2.8.0 or higher, libstdc++-2.8.0 or higher, bison, flex and gmake. Please note that the toolset is not gcc3 compliant (yet). and The development platform is a linux PC using gcc-2.95.3 and libstdc++-2.9.0. I've been using gcc 2.96 as per the first paragraph, and things should work. Unfortunately, things are a bit more delicate. For example, 4.8.1 doesn't compile at all: c++ -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/rpsl/rpsl/rpsl_attr.hh:81, from ../../src/rpsl/rpsl/object.hh:63, from rpslcheck.cc:57: ../../src/rpsl/rpsl/prefix.hh:377: declaration does not declare anything ../../src/rpsl/rpsl/prefix.hh:377: parse error before `and' make[2]: *** [rpslcheck.o] Error 1 It seems to me that if you want others to help with this project, we either need to be a tad more portable in our coding or we need to be extremely specific about which tools are approved for use. Which way would you like to go? Regards, Tony p.s. Have you considered opening up your CVS server? This would allow folks to get the most up to date code much more easily. From boogman at ip-plus.net Thu Jan 22 10:53:57 2004 From: boogman at ip-plus.net (Jan Boogman) Date: Thu, 22 Jan 2004 10:53:57 +0100 Subject: [irrtoolset]Making IRRToolSet compile... In-Reply-To: <200401212208.05470.jon@lawrence.org.uk> References: <20040121.225559.35625018.he@uninett.no> <200401212208.05470.jon@lawrence.org.uk> Message-ID: <400F9DB5.1050604@ip-plus.net> Hi, i had 4.8.1 compile on a x86 gentoo-linux 2.4.22 with gcc2.95.3, but peval produced a segmentation fault so i went back to 4.7.3 which works well. The binary distributions (both 4.7.3 and 4.8.1) don't work on my system :-( Cheers Jan Jon Lawrence wrote: > On Wednesday 21 January 2004 9:55 pm, Havard Eidnes wrote: > >>Hi, >> >>me again. Someone pointed me towards IRRToolSet which is a bit >>newer than RAToolSet. I'm trying to make IRRToolSet 4.8.1 >>compile on NetBSD 1.6 with gcc 2.95.3 and the libsdc++ which came >>with that compiler. >> >>First off: it seems that almost all of the diffs I sent earlier >>against RAToolSet still have to be applied to IRRToolSet. >> >>Second: how has anyone got IRRToolSet 4.8.1 to compile?!? I have >>to ask, because I get: >> >>c++ -c -I/usr/pkg/include -I/usr/X11R6/include -O2 -I/usr/pkg/include >>-I/usr/X11R6/include -DHAVE_CONFIG_H -I. -I. -I.. -I../src -I../../Core >>prefix.cc prefix.cc: In method `void MPPrefixRanges::and(MPPrefixRanges >>*)': prefix.cc:1147: implicit declaration of function `int assign(...)' >>gmake[4]: *** [prefix.o] Error 1 >>gmake[4]: Leaving directory >>`/usr/pkgsrc/net/IRRToolSet/work/IRRToolSet-4.8.1/src/rpsl/rpsl' >> >>...and implicit declarations in C++ are as far as I know fatal. >>How can this compile at all on any other platform? >> >>Fixing this appears to require more C++ skills or familiarity >>with the code than I have, so assistance on this point would be >>much appreciated. >> > > I also haven't yet managed to get it to compile - I've just setup a debian 3.0 > box so that I have a system with version runs fine on the Debian box, which is good enough for my purposes at > present :) > > Could someone post a system spec (software wise) that is known to work (for > compiling) - please include distro if possible. > > Regards, > Jon > -- Jan Boogman / Swisscom IP-Plus AS3303 / Backbone Engineering / CCIE#7345 From he at uninett.no Wed Jan 21 16:46:09 2004 From: he at uninett.no (Havard Eidnes) Date: Wed, 21 Jan 2004 16:46:09 +0100 (CET) Subject: [irrtoolset]Re: Porting RAToolSet 4.7.1 to the NetBSD package system In-Reply-To: <20040120.213253.87403660.he@uninett.no> References: <20040120.213253.87403660.he@uninett.no> Message-ID: <20040121.164609.19048785.he@uninett.no> Hi, while trying to make RAToolSet 4.7.1 go on NetBSD, I have found a few problems: o The programs now compile and link OK on the netbsd-1-6 branch, where GCC version 2.95.3 is used. However, the "roe" program segfaults briefly after startup, as can be seen in the first attachment below. o Minor annoyance: The --enable-debug switch to configure does not work; if you specify it, the compiles are still done -O2 and with no debug info generation. However, passing the environment variables CFLAGS and CXXFLAGS set to "-g -O2" to configure doesn't really give any more information than what's shown in the attachment below. o Nitpick: The documentation for roe says "roe [flags] []". However, as far as I can see from later examples, it does not expect an AS number as argument, but rather a string which starts with the two letters AS immediately followed by the AS number. Whether it works to just pass the AS number I can't tell due to the problem above. o The good news is that on netbsd-1-6, of the other programs, at least peval works. I've so far not tested the other programs. o I tried compiling RAToolSet on the current development version of NetBSD which uses GCC 3.3.2. It immediately becomes apparent that the code as it stands today will not compile on that environment. There are several portability problems: 1) The source uses deprecated headers, e.g. instead of etc., resulting in warnings of this type: /usr/include/g++/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the header for the header for C++ includes, or instead of the deprecated header . To disable this warning use -Wno-deprecated. 2) The source uses implementation-specific headers and identifiers from the implementation-reserved name space, in that several headers include <_G_config.h> and make use of _G_uint32_t, for apparently no good reason at all. It looks like someone was let loose in the code without supervision. The example cited here is easily fixed by using and using e.g. uint32_t etc. 3) There are however more serious portability-related problems with the code of a nature where my inadequate C++ knowledge is unable to point me in the right direction. Some of this appears to be related to the standard C++ library. So far I've not even managed to compile the first C++ file. In short, I have the following two questions: o Does anyone maintain RAToolSet at the moment? o Is anyone working on getting it ported to a more modern C++ environment? Regards, - H?vard -------------- next part -------------- nsa: {108} gdb /usr/pkg/bin/roe GNU gdb 5.0nb1 Copyright 2000 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386--netbsdelf"...(no debugging symbols found)... (gdb) run AS224 Starting program: /usr/pkg/bin/roe AS224 (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... (no debugging symbols found)...(no debugging symbols found)... Program received signal SIGSEGV, Segmentation fault. 0x804c8dd in basic_string, __default_alloc_template >::Rep::clone () (gdb) where #0 0x804c8dd in basic_string, __default_alloc_template >::Rep::clone () #1 0x804b2ab in dladdr () #2 0x804ac60 in free () (gdb) From he at uninett.no Thu Jan 22 13:03:07 2004 From: he at uninett.no (Havard Eidnes) Date: Thu, 22 Jan 2004 13:03:07 +0100 (CET) Subject: [irrtoolset]Making IRRToolSet compile... In-Reply-To: <20040122092531.GA10349@ripe.net> References: <20040121.225559.35625018.he@uninett.no> <20040122092531.GA10349@ripe.net> Message-ID: <20040122.130307.25306392.he@uninett.no> > > me again. Someone pointed me towards IRRToolSet which is a bit > > newer than RAToolSet. I'm trying to make IRRToolSet 4.8.1 > > compile on NetBSD 1.6 with gcc 2.95.3 and the libsdc++ which came > > with that compiler. > > Which version of libstdc++ are you using? Hmm... It's supposed to be 2.10.0, but ... the header files which were installed on my system were older than that. I don't know offhand what's caused that. E.g. stl_vector.h was missing the assign() declaration. As much as I hate to admit it, it looks like it may have been something wrong with the local installation, so this may have been a false alarm. I'll try to look into what caused this to happen, as I've followed all the normal procedures for updating the system. Regards, - H?vard From Tony.Li at procket.com Fri Jan 23 10:15:36 2004 From: Tony.Li at procket.com (Tony Li) Date: Fri, 23 Jan 2004 01:15:36 -0800 Subject: [irrtoolset]FWIW... Message-ID: I've identified several bugs in g++ 2.96 that render it unuseable with current IRR sources (of many different versions). I strongly suggest that folks wanting to make forward progress use ONLY 2.95.3 until some C++ wizard makes the whole thing gcc3 compatible. Obviously, the README should be updated to reflect this. Tony