Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dahdi-tools-3.2.0, build failure with GCC 9.4.0 (crosstool-NG 1.25.0) #11

Open
abelbeck opened this issue Dec 19, 2022 · 0 comments · May be fixed by #23
Open

dahdi-tools-3.2.0, build failure with GCC 9.4.0 (crosstool-NG 1.25.0) #11

abelbeck opened this issue Dec 19, 2022 · 0 comments · May be fixed by #23

Comments

@abelbeck
Copy link

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.

InterLinked1 added a commit to InterLinked1/dahdi-tools that referenced this issue Mar 2, 2025
get_ver is not used outside of xpp/echo_loader.c and needs to be
declared static.

Resolves: asterisk#11
@InterLinked1 InterLinked1 linked a pull request Mar 2, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant