All,
I've been able to successfully compile ampr-ripd for the native OS (Ubuntu Linux x64); but I receive errors when trying to compile for MIPS:
-------------------------------------------------------------------------- user@ubuntu-comp:~/ampr-ripd-1.16.2$ make CC=mips-openwrt-linux-musl-gcc LD=mips-openwrt-linux-musl-ld mips-openwrt-linux-musl-gcc -Wall -O2 -o ampr-ripd ampr-ripd.c ampr-ripd.c: In function 'create_fwsd': ampr-ripd.c:1536:23: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function) sin.sin_port = htons(IPPORT_ROUTESERVER); ^ ampr-ripd.c:1536:23: note: each undeclared identifier is reported only once for each function it appears in ampr-ripd.c: In function 'on_alarm': ampr-ripd.c:1629:27: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function) sin.sin_port = htons(IPPORT_ROUTESERVER); ^ ampr-ripd.c: In function 'main': ampr-ripd.c:1864:13: error: 'struct udphdr' has no member named 'dest' (udh->dest == htons(IPPORT_ROUTESERVER)) && ^ ampr-ripd.c:1864:29: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function) (udh->dest == htons(IPPORT_ROUTESERVER)) && ^ ampr-ripd.c:1865:13: error: 'struct udphdr' has no member named 'source' (udh->source == htons(IPPORT_ROUTESERVER))) ^ Makefile:30: recipe for target 'ampr-ripd' failed make: *** [ampr-ripd] Error 1
--------------------------------------------------------------------------
Any assistance is appreciated
73,
KB3VWG
This should not happen but anyway....
Add a line:
#define IPPORT_ROUTESERVER 520
somewhere at the beginning of the c file and try again.
Marius, YO2LOJ
On 2017-04-17 20:13, lleachii--- via 44Net wrote:
(Please trim inclusions from previous messages) _______________________________________________ All,
I've been able to successfully compile ampr-ripd for the native OS (Ubuntu Linux x64); but I receive errors when trying to compile for MIPS:
user@ubuntu-comp:~/ampr-ripd-1.16.2$ make CC=mips-openwrt-linux-musl-gcc LD=mips-openwrt-linux-musl-ld mips-openwrt-linux-musl-gcc -Wall -O2 -o ampr-ripd ampr-ripd.c ampr-ripd.c: In function 'create_fwsd': ampr-ripd.c:1536:23: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function) sin.sin_port = htons(IPPORT_ROUTESERVER); ^ ampr-ripd.c:1536:23: note: each undeclared identifier is reported only once for each function it appears in ampr-ripd.c: In function 'on_alarm': ampr-ripd.c:1629:27: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function) sin.sin_port = htons(IPPORT_ROUTESERVER); ^ ampr-ripd.c: In function 'main': ampr-ripd.c:1864:13: error: 'struct udphdr' has no member named 'dest' (udh->dest == htons(IPPORT_ROUTESERVER)) && ^ ampr-ripd.c:1864:29: error: 'IPPORT_ROUTESERVER' undeclared (first use in this function) (udh->dest == htons(IPPORT_ROUTESERVER)) && ^ ampr-ripd.c:1865:13: error: 'struct udphdr' has no member named 'source' (udh->source == htons(IPPORT_ROUTESERVER))) ^ Makefile:30: recipe for target 'ampr-ripd' failed make: *** [ampr-ripd] Error 1
Any assistance is appreciated
73,
KB3VWG
All,
An update - I had success using compiling using 'cpp' instead of 'gcc' in the toolchian.
I now have the following errors trying to execute the binary:
root@router:/etc/config# ./ampr-ripd-1.16.2_MIPS ./ampr-ripd-1.16.2_MIPS: line 28: typedef: not found ./ampr-ripd-1.16.2_MIPS: line 29: typedef: not found ./ampr-ripd-1.16.2_MIPS: line 30: typedef: not found ./ampr-ripd-1.16.2_MIPS: line 31: typedef: not found ./ampr-ripd-1.16.2_MIPS: line 34: typedef: not found ./ampr-ripd-1.16.2_MIPS: line 35: typedef: not found ./ampr-ripd-1.16.2_MIPS: line 36: typedef: not found ./ampr-ripd-1.16.2_MIPS: line 37: typedef: not found ./ampr-ripd-1.16.2_MIPS: line 38: typedef: not found ./ampr-ripd-1.16.2_MIPS: line 39: typedef: not found ./ampr-ripd-1.16.2_MIPS: line 44: __extension__: not found ./ampr-ripd-1.16.2_MIPS: line 45: __extension__: not found ./ampr-ripd-1.16.2_MIPS: line 50: typedef: not found ./ampr-ripd-1.16.2_MIPS: line 56: typedef: not found ./ampr-ripd-1.16.2_MIPS: line 58: typedef: not found ./ampr-ripd-1.16.2_MIPS: line 61: syntax error: unexpected "("
Marius,
I now receive less error output, but there's still an error:
--------------------------------------------------
user@ubuntu-comp:~/ampr-ripd-1.16.2$ make CC=mips-openwrt-linux-gcc LD=mips-openwrt-linux-ld mips-openwrt-linux-gcc -Wall -O2 -o ampr-ripd ampr-ripd.c ampr-ripd.c: In function 'main': ampr-ripd.c:1865:13: error: 'struct udphdr' has no member named 'dest' (udh->dest == htons(IPPORT_ROUTESERVER)) && ^ ampr-ripd.c:1866:13: error: 'struct udphdr' has no member named 'source' (udh->source == htons(IPPORT_ROUTESERVER))) ^ Makefile:30: recipe for target 'ampr-ripd' failed make: *** [ampr-ripd] Error 1
--------------------------------------------------
On 04/17/2017:
This should not happen but anyway....
Add a line:
#define IPPORT_ROUTESERVER 520
somewhere at the beginning of the c file and try again.
Marius, YO2LOJ