dahdi-tools
dahdi-tools copied to clipboard
dahdi-tools-3.2.0, build failure with GCC 9.4.0 (crosstool-NG 1.25.0)
dahdi-tools-3.2.0, build failure with GCC 9.4.0 (crosstool-NG 1.25.0)
CC astribank_hexload-astribank_hexload.o
CC astribank_hexload-pic_loader.o
CCLD astribank_hexload
/home/dev/astlinux/x-tools-1.25.0-5.10-2.31/x86_64-unknown-linux-gnu/lib/gcc/x86_64-unknown-linux-gnu/9.4.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ./.libs/libecholoader.a(libecholoader_la-echo_loader.o): in function `init_octasic':
echo_loader.c:(.text+0xcda): undefined reference to `get_ver'
/home/dev/astlinux/x-tools-1.25.0-5.10-2.31/x86_64-unknown-linux-gnu/lib/gcc/x86_64-unknown-linux-gnu/9.4.0/../../../../x86_64-unknown-linux-gnu/bin/ld: ./.libs/libecholoader.a(libecholoader_la-echo_loader.o): in function `echo_ver':
echo_loader.c:(.text+0x1764): undefined reference to `get_ver'
collect2: error: ld returned 1 exit status
Fix was to add static
to the inline int get_ver(struct astribank *astribank)
--- dahdi-tools-3.2.0/xpp/echo_loader.c.orig 2022-12-19 10:32:32.725491385 -0600
+++ dahdi-tools-3.2.0/xpp/echo_loader.c 2022-12-19 10:33:26.515289142 -0600
@@ -564,7 +564,7 @@
return cOCT6100_ERR_OK;
}
-inline int get_ver(struct astribank *astribank)
+static inline int get_ver(struct astribank *astribank)
{
return spi_send(astribank, 0, 0, 1, 1);
}
Solved the issue.