Matt,Actually the makefiles/information are on Marius' page:http://www.yo2loj.ro/hamprojects/Seem credited to Bill, M1BKF.- Lynwood
Ok so I am going to take a break for the night but here are my steps that I have taken based on a lot of what I have seen in the archives here to give everyone a better idea of what exactly im doing. Maybe Im missing something, which Im sure... My setup is Ubuntu 22.04.1 on a VM.
Now all of my steps to this point... Well more but who's counting....
Created folder called ~/workspace
Extracted my targets SDK contents into ~/workspace
Entered the 2 environment veriables PATH=$PATH:~/workspace/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/bin export PATH STAGING_DIR=~/workspace/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/bin export STAGING_DIR
Downloaded and extracted ampr-ripd-2.4.1 source files here: ~/workspace/dl/ampr-ripd-2.4.1
Entered into ~/workspace/dl/ampr-ripd-2.4.1 and....
Entered make CC=mipsel-openwrt-linux-musl-cpp LD=mipsel-openwrt-linux-musl-ld (Used cpp because I saw someone in the archives from way back who used it)
and got: mipsel-openwrt-linux-musl-cpp -Wall -O2 -D HAVE_DEBUG -o ampr-ripd ampr-ripd.c ampr-ripd.c:125:10: fatal error: bits/getopt_core.h: No such file or directory 125 | #include <bits/getopt_core.h> | ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:30: ampr-ripd] Error 1
For S & G's I tried it with the other compilers, c++, g++, gcc and got the same response.
Commented out: //#include <bits/getopt_core.h> in ampr-ripd.c
Retyped: make CC=mipsel-openwrt-linux-musl-cpp LD=mipsel-openwrt-linux-musl-ld
and got: mipsel-openwrt-linux-musl-cpp -Wall -O2 -D HAVE_DEBUG -o ampr-ripd ampr-ripd.c ampr-ripd executable (assuming) appears in the folder. I think I'm doing good at this point.
Moved the executable to /usr/sbin on the target (Netgear R6220) and ran ./ampr-ripd
and got: root@OpenWrt:/usr/sbin# ./ampr-ripd ./ampr-ripd: line 14: typedef: not found ./ampr-ripd: line 16: typedef: not found ./ampr-ripd: line 18: typedef: not found ./ampr-ripd: line 23: typedef: not found ./ampr-ripd: line 28: typedef: not found ./ampr-ripd: line 33: typedef: not found ./ampr-ripd: line 38: typedef: not found ./ampr-ripd: line 43: typedef: not found ./ampr-ripd: line 48: typedef: not found ./ampr-ripd: line 53: typedef: not found ./ampr-ripd: line 58: typedef: not found ./ampr-ripd: line 60: typedef: not found ./ampr-ripd: line 63: typedef: not found ./ampr-ripd: line 64: typedef: not found ./ampr-ripd: line 66: typedef: not found ./ampr-ripd: line 67: typedef: not found ./ampr-ripd: line 68: typedef: not found ./ampr-ripd: line 69: typedef: not found ./ampr-ripd: line 71: typedef: not found ./ampr-ripd: line 72: typedef: not found ./ampr-ripd: line 74: typedef: not found ./ampr-ripd: line 75: typedef: not found ./ampr-ripd: line 76: typedef: not found ./ampr-ripd: line 77: typedef: not found ./ampr-ripd: line 80: typedef: not found ./ampr-ripd: line 81: typedef: not found ./ampr-ripd: line 82: typedef: not found ./ampr-ripd: line 83: typedef: not found ./ampr-ripd: line 99: typedef: not found ./ampr-ripd: line 101: typedef: not found ./ampr-ripd: line 104: syntax error: unexpected "("
(I saw this error in the archives but had no answer for his issue)
Deleted the assumed executable from the working environment and....
Changed compilers make CC=mipsel-openwrt-linux-musl-gcc LD=mipsel-openwrt-linux-musl-ld
and got: mipsel-openwrt-linux-musl-gcc -Wall -O2 -D HAVE_DEBUG -o ampr-ripd ampr-ripd.c ampr-ripd.c: In function 'create_fwsd': ampr-ripd.c:1593:30: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function); did you mean 'IPPORT_RESERVED'? 1593 | sin.sin_port = htons(IPPORT_ROUTESERVER); | ^~~~~~~~~~~~~~~~~~ | IPPORT_RESERVED ampr-ripd.c:1593:30: note: each undeclared identifier is reported only once for each function it appears in ampr-ripd.c: In function 'create_amprfwsd': ampr-ripd.c:1658:30: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function); did you mean 'IPPORT_RESERVED'? 1658 | sin.sin_port = htons(IPPORT_ROUTESERVER); | ^~~~~~~~~~~~~~~~~~ | IPPORT_RESERVED ampr-ripd.c: In function 'on_alarm': ampr-ripd.c:1800:34: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function); did you mean 'IPPORT_RESERVED'? 1800 | sin.sin_port = htons(IPPORT_ROUTESERVER); | ^~~~~~~~~~~~~~~~~~ | IPPORT_RESERVED ampr-ripd.c: In function 'main': ampr-ripd.c:2132:38: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function); did you mean 'IPPORT_RESERVED'? 2132 | sin.sin_port = htons(IPPORT_ROUTESERVER); | ^~~~~~~~~~~~~~~~~~ | IPPORT_RESERVED ampr-ripd.c:2238:49: error: 'struct udphdr' has no member named 'dest' 2238 | (udh->dest == htons(IPPORT_ROUTESERVER)) && | ^~ ampr-ripd.c:2239:49: error: 'struct udphdr' has no member named 'source' 2239 | (udh->source == htons(IPPORT_ROUTESERVER))) | ^~ make: *** [Makefile:30: ampr-ripd] Error 1
(I got the same when using some of the other compiler options)
so I added to ampr-ripd.c as seen in the groups #define IPPORT_ROUTESERVER 520
Retyped: make CC=mipsel-openwrt-linux-musl-gcc LD=mipsel-openwrt-linux-musl-ld
now i get: mipsel-openwrt-linux-musl-gcc -Wall -O2 -D HAVE_DEBUG -o ampr-ripd ampr-ripd.c ampr-ripd.c: In function 'main': ampr-ripd.c:2240:49: error: 'struct udphdr' has no member named 'dest' 2240 | (udh->dest == htons(IPPORT_ROUTESERVER)) && | ^~ ampr-ripd.c:2241:49: error: 'struct udphdr' has no member named 'source' 2241 | (udh->source == htons(IPPORT_ROUTESERVER))) | ^~ make: *** [Makefile:30: ampr-ripd] Error 1
Stopped right here and this is where Im staying for now. LOL
Whats next gang?
Thanks a million if i had it give away....
Harold K7ILO
________________________________ From: lleachii--- via 44net 44net@mailman.ampr.org Sent: Friday, January 27, 2023 5:00 PM To: Matt Peterson via 44net 44net@mailman.ampr.org Subject: [44net] Re: ampr-ripd 2.4.1 / openwrt
Matt,
Actually the makefiles/information are on Marius' page:
http://www.yo2loj.ro/hamprojects/
Seem credited to Bill, M1BKF.
- Lynwood
Hello Harold,
I was able to make it build with the musl libc by the followin patches: https://git.ampr.org/oz3rf/ampr-ripd/-/compare/main...50ddab03626a92cef38acf...
Tested for make CC=aarch64-linux-musl-gcc LD=aarch64-linux-musl-ld
Maybe it works for your arch as well?
Nick OZ3RF
On Sat, 28 Jan 2023 at 04:24, Harold Kinchelow via 44net < 44net@mailman.ampr.org> wrote:
Ok so I am going to take a break for the night but here are my steps that I have taken based on a lot of what I have seen in the archives here to give everyone a better idea of what exactly im doing. Maybe Im missing something, which Im sure... My setup is Ubuntu 22.04.1 on a VM.
Now all of my steps to this point... Well more but who's counting....
Created folder called ~/workspace
Extracted my targets SDK contents into ~/workspace
Entered the 2 environment veriables
PATH=$PATH:~/workspace/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/bin export PATH
STAGING_DIR=~/workspace/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/bin export STAGING_DIR
Downloaded and extracted ampr-ripd-2.4.1 source files here: ~/workspace/dl/ampr-ripd-2.4.1
Entered into ~/workspace/dl/ampr-ripd-2.4.1 and....
Entered make CC=mipsel-openwrt-linux-musl-cpp LD=mipsel-openwrt-linux-musl-ld (Used cpp because I saw someone in the archives from way back who used it)
and got: mipsel-openwrt-linux-musl-cpp -Wall -O2 -D HAVE_DEBUG -o ampr-ripd ampr-ripd.c ampr-ripd.c:125:10: fatal error: bits/getopt_core.h: No such file or directory 125 | #include <bits/getopt_core.h> | ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:30: ampr-ripd] Error 1
For S & G's I tried it with the other compilers, c++, g++, gcc and got the same response.
Commented out: //#include <bits/getopt_core.h> in ampr-ripd.c
Retyped: make CC=mipsel-openwrt-linux-musl-cpp LD=mipsel-openwrt-linux-musl-ld
and got: mipsel-openwrt-linux-musl-cpp -Wall -O2 -D HAVE_DEBUG -o ampr-ripd ampr-ripd.c ampr-ripd executable (assuming) appears in the folder. I think I'm doing good at this point.
Moved the executable to /usr/sbin on the target (Netgear R6220) and ran ./ampr-ripd
and got: root@OpenWrt:/usr/sbin# ./ampr-ripd ./ampr-ripd: line 14: typedef: not found ./ampr-ripd: line 16: typedef: not found ./ampr-ripd: line 18: typedef: not found ./ampr-ripd: line 23: typedef: not found ./ampr-ripd: line 28: typedef: not found ./ampr-ripd: line 33: typedef: not found ./ampr-ripd: line 38: typedef: not found ./ampr-ripd: line 43: typedef: not found ./ampr-ripd: line 48: typedef: not found ./ampr-ripd: line 53: typedef: not found ./ampr-ripd: line 58: typedef: not found ./ampr-ripd: line 60: typedef: not found ./ampr-ripd: line 63: typedef: not found ./ampr-ripd: line 64: typedef: not found ./ampr-ripd: line 66: typedef: not found ./ampr-ripd: line 67: typedef: not found ./ampr-ripd: line 68: typedef: not found ./ampr-ripd: line 69: typedef: not found ./ampr-ripd: line 71: typedef: not found ./ampr-ripd: line 72: typedef: not found ./ampr-ripd: line 74: typedef: not found ./ampr-ripd: line 75: typedef: not found ./ampr-ripd: line 76: typedef: not found ./ampr-ripd: line 77: typedef: not found ./ampr-ripd: line 80: typedef: not found ./ampr-ripd: line 81: typedef: not found ./ampr-ripd: line 82: typedef: not found ./ampr-ripd: line 83: typedef: not found ./ampr-ripd: line 99: typedef: not found ./ampr-ripd: line 101: typedef: not found ./ampr-ripd: line 104: syntax error: unexpected "("
(I saw this error in the archives but had no answer for his issue)
Deleted the assumed executable from the working environment and....
Changed compilers make CC=mipsel-openwrt-linux-musl-gcc LD=mipsel-openwrt-linux-musl-ld
and got: mipsel-openwrt-linux-musl-gcc -Wall -O2 -D HAVE_DEBUG -o ampr-ripd ampr-ripd.c ampr-ripd.c: In function 'create_fwsd': ampr-ripd.c:1593:30: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function); did you mean 'IPPORT_RESERVED'? 1593 | sin.sin_port = htons(IPPORT_ROUTESERVER); | ^~~~~~~~~~~~~~~~~~ | IPPORT_RESERVED ampr-ripd.c:1593:30: note: each undeclared identifier is reported only once for each function it appears in ampr-ripd.c: In function 'create_amprfwsd': ampr-ripd.c:1658:30: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function); did you mean 'IPPORT_RESERVED'? 1658 | sin.sin_port = htons(IPPORT_ROUTESERVER); | ^~~~~~~~~~~~~~~~~~ | IPPORT_RESERVED ampr-ripd.c: In function 'on_alarm': ampr-ripd.c:1800:34: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function); did you mean 'IPPORT_RESERVED'? 1800 | sin.sin_port = htons(IPPORT_ROUTESERVER); | ^~~~~~~~~~~~~~~~~~ | IPPORT_RESERVED ampr-ripd.c: In function 'main': ampr-ripd.c:2132:38: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function); did you mean 'IPPORT_RESERVED'? 2132 | sin.sin_port = htons(IPPORT_ROUTESERVER); | ^~~~~~~~~~~~~~~~~~ | IPPORT_RESERVED ampr-ripd.c:2238:49: error: 'struct udphdr' has no member named 'dest' 2238 | (udh->dest == htons(IPPORT_ROUTESERVER)) && | ^~ ampr-ripd.c:2239:49: error: 'struct udphdr' has no member named 'source' 2239 | (udh->source == htons(IPPORT_ROUTESERVER))) | ^~ make: *** [Makefile:30: ampr-ripd] Error 1
(I got the same when using some of the other compiler options)
so I added to ampr-ripd.c as seen in the groups #define IPPORT_ROUTESERVER 520
Retyped: make CC=mipsel-openwrt-linux-musl-gcc LD=mipsel-openwrt-linux-musl-ld
now i get: mipsel-openwrt-linux-musl-gcc -Wall -O2 -D HAVE_DEBUG -o ampr-ripd ampr-ripd.c ampr-ripd.c: In function 'main': ampr-ripd.c:2240:49: error: 'struct udphdr' has no member named 'dest' 2240 | (udh->dest == htons(IPPORT_ROUTESERVER)) && | ^~ ampr-ripd.c:2241:49: error: 'struct udphdr' has no member named 'source' 2241 | (udh->source == htons(IPPORT_ROUTESERVER))) | ^~ make: *** [Makefile:30: ampr-ripd] Error 1
Stopped right here and this is where Im staying for now. LOL
Whats next gang?
Thanks a million if i had it give away....
Harold K7ILO
*From:* lleachii--- via 44net 44net@mailman.ampr.org *Sent:* Friday, January 27, 2023 5:00 PM *To:* Matt Peterson via 44net 44net@mailman.ampr.org *Subject:* [44net] Re: ampr-ripd 2.4.1 / openwrt
Matt,
Actually the makefiles/information are on Marius' page:
http://www.yo2loj.ro/hamprojects/
Seem credited to Bill, M1BKF.
- Lynwood
44net mailing list -- 44net@mailman.ampr.org To unsubscribe send an email to 44net-leave@mailman.ampr.org
Hey Nick
Lynwood was able to provide the keyboard history of his steps to compile the executable and we have it running now.
Thanks for replying with this information though.
I will keep it handy.
Harold K7ILO ________________________________ From: Nick Østergaard oe.nick@gmail.com Sent: Monday, March 6, 2023 2:43 PM To: Harold Kinchelow k7ilo@outlook.com Cc: Matt Peterson via 44net 44net@mailman.ampr.org; lleachii@aol.com lleachii@aol.com Subject: Re: [44net] Re: ampr-ripd 2.4.1 / openwrt
Hello Harold,
I was able to make it build with the musl libc by the followin patches: https://git.ampr.org/oz3rf/ampr-ripd/-/compare/main...50ddab03626a92cef38acf...
Tested for make CC=aarch64-linux-musl-gcc LD=aarch64-linux-musl-ld
Maybe it works for your arch as well?
Nick OZ3RF
On Sat, 28 Jan 2023 at 04:24, Harold Kinchelow via 44net <44net@mailman.ampr.orgmailto:44net@mailman.ampr.org> wrote: Ok so I am going to take a break for the night but here are my steps that I have taken based on a lot of what I have seen in the archives here to give everyone a better idea of what exactly im doing. Maybe Im missing something, which Im sure... My setup is Ubuntu 22.04.1 on a VM.
Now all of my steps to this point... Well more but who's counting....
Created folder called ~/workspace
Extracted my targets SDK contents into ~/workspace
Entered the 2 environment veriables PATH=$PATH:~/workspace/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/bin export PATH STAGING_DIR=~/workspace/staging_dir/toolchain-mipsel_24kc_gcc-11.2.0_musl/bin export STAGING_DIR
Downloaded and extracted ampr-ripd-2.4.1 source files here: ~/workspace/dl/ampr-ripd-2.4.1
Entered into ~/workspace/dl/ampr-ripd-2.4.1 and....
Entered make CC=mipsel-openwrt-linux-musl-cpp LD=mipsel-openwrt-linux-musl-ld (Used cpp because I saw someone in the archives from way back who used it)
and got: mipsel-openwrt-linux-musl-cpp -Wall -O2 -D HAVE_DEBUG -o ampr-ripd ampr-ripd.c ampr-ripd.c:125:10: fatal error: bits/getopt_core.h: No such file or directory 125 | #include <bits/getopt_core.h> | ^~~~~~~~~~~~~~~~~~~~ compilation terminated. make: *** [Makefile:30: ampr-ripd] Error 1
For S & G's I tried it with the other compilers, c++, g++, gcc and got the same response.
Commented out: //#include <bits/getopt_core.h> in ampr-ripd.c
Retyped: make CC=mipsel-openwrt-linux-musl-cpp LD=mipsel-openwrt-linux-musl-ld
and got: mipsel-openwrt-linux-musl-cpp -Wall -O2 -D HAVE_DEBUG -o ampr-ripd ampr-ripd.c ampr-ripd executable (assuming) appears in the folder. I think I'm doing good at this point.
Moved the executable to /usr/sbin on the target (Netgear R6220) and ran ./ampr-ripd
and got: root@OpenWrt:/usr/sbin# ./ampr-ripd ./ampr-ripd: line 14: typedef: not found ./ampr-ripd: line 16: typedef: not found ./ampr-ripd: line 18: typedef: not found ./ampr-ripd: line 23: typedef: not found ./ampr-ripd: line 28: typedef: not found ./ampr-ripd: line 33: typedef: not found ./ampr-ripd: line 38: typedef: not found ./ampr-ripd: line 43: typedef: not found ./ampr-ripd: line 48: typedef: not found ./ampr-ripd: line 53: typedef: not found ./ampr-ripd: line 58: typedef: not found ./ampr-ripd: line 60: typedef: not found ./ampr-ripd: line 63: typedef: not found ./ampr-ripd: line 64: typedef: not found ./ampr-ripd: line 66: typedef: not found ./ampr-ripd: line 67: typedef: not found ./ampr-ripd: line 68: typedef: not found ./ampr-ripd: line 69: typedef: not found ./ampr-ripd: line 71: typedef: not found ./ampr-ripd: line 72: typedef: not found ./ampr-ripd: line 74: typedef: not found ./ampr-ripd: line 75: typedef: not found ./ampr-ripd: line 76: typedef: not found ./ampr-ripd: line 77: typedef: not found ./ampr-ripd: line 80: typedef: not found ./ampr-ripd: line 81: typedef: not found ./ampr-ripd: line 82: typedef: not found ./ampr-ripd: line 83: typedef: not found ./ampr-ripd: line 99: typedef: not found ./ampr-ripd: line 101: typedef: not found ./ampr-ripd: line 104: syntax error: unexpected "("
(I saw this error in the archives but had no answer for his issue)
Deleted the assumed executable from the working environment and....
Changed compilers make CC=mipsel-openwrt-linux-musl-gcc LD=mipsel-openwrt-linux-musl-ld
and got: mipsel-openwrt-linux-musl-gcc -Wall -O2 -D HAVE_DEBUG -o ampr-ripd ampr-ripd.c ampr-ripd.c: In function 'create_fwsd': ampr-ripd.c:1593:30: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function); did you mean 'IPPORT_RESERVED'? 1593 | sin.sin_port = htons(IPPORT_ROUTESERVER); | ^~~~~~~~~~~~~~~~~~ | IPPORT_RESERVED ampr-ripd.c:1593:30: note: each undeclared identifier is reported only once for each function it appears in ampr-ripd.c: In function 'create_amprfwsd': ampr-ripd.c:1658:30: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function); did you mean 'IPPORT_RESERVED'? 1658 | sin.sin_port = htons(IPPORT_ROUTESERVER); | ^~~~~~~~~~~~~~~~~~ | IPPORT_RESERVED ampr-ripd.c: In function 'on_alarm': ampr-ripd.c:1800:34: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function); did you mean 'IPPORT_RESERVED'? 1800 | sin.sin_port = htons(IPPORT_ROUTESERVER); | ^~~~~~~~~~~~~~~~~~ | IPPORT_RESERVED ampr-ripd.c: In function 'main': ampr-ripd.c:2132:38: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function); did you mean 'IPPORT_RESERVED'? 2132 | sin.sin_port = htons(IPPORT_ROUTESERVER); | ^~~~~~~~~~~~~~~~~~ | IPPORT_RESERVED ampr-ripd.c:2238:49: error: 'struct udphdr' has no member named 'dest' 2238 | (udh->dest == htons(IPPORT_ROUTESERVER)) && | ^~ ampr-ripd.c:2239:49: error: 'struct udphdr' has no member named 'source' 2239 | (udh->source == htons(IPPORT_ROUTESERVER))) | ^~ make: *** [Makefile:30: ampr-ripd] Error 1
(I got the same when using some of the other compiler options)
so I added to ampr-ripd.c as seen in the groups #define IPPORT_ROUTESERVER 520
Retyped: make CC=mipsel-openwrt-linux-musl-gcc LD=mipsel-openwrt-linux-musl-ld
now i get: mipsel-openwrt-linux-musl-gcc -Wall -O2 -D HAVE_DEBUG -o ampr-ripd ampr-ripd.c ampr-ripd.c: In function 'main': ampr-ripd.c:2240:49: error: 'struct udphdr' has no member named 'dest' 2240 | (udh->dest == htons(IPPORT_ROUTESERVER)) && | ^~ ampr-ripd.c:2241:49: error: 'struct udphdr' has no member named 'source' 2241 | (udh->source == htons(IPPORT_ROUTESERVER))) | ^~ make: *** [Makefile:30: ampr-ripd] Error 1
Stopped right here and this is where Im staying for now. LOL
Whats next gang?
Thanks a million if i had it give away....
Harold K7ILO
________________________________ From: lleachii--- via 44net <44net@mailman.ampr.orgmailto:44net@mailman.ampr.org> Sent: Friday, January 27, 2023 5:00 PM To: Matt Peterson via 44net <44net@mailman.ampr.orgmailto:44net@mailman.ampr.org> Subject: [44net] Re: ampr-ripd 2.4.1 / openwrt
Matt,
Actually the makefiles/information are on Marius' page:
http://www.yo2loj.ro/hamprojects/
Seem credited to Bill, M1BKF.
- Lynwood
_______________________________________________ 44net mailing list -- 44net@mailman.ampr.orgmailto:44net@mailman.ampr.org To unsubscribe send an email to 44net-leave@mailman.ampr.orgmailto:44net-leave@mailman.ampr.org