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

Patch to compile under bullseye with gcc10 (RaspberryPi debian standard) #1041

Open
g-vidal opened this issue Nov 11, 2020 · 0 comments
Open

Comments

@g-vidal
Copy link
Contributor

g-vidal commented Nov 11, 2020

gcc10 introduces stronger regulations and the linker fails with duplicate gVERSION and gVERSION_SHORT definition error.
The trick I have found is to make those variables extern in mraahome/include/version.h, here is the patch that worked for me, I do not know if it is the "right way" to handle the problem that's why I do not push a PR, I will if it is OK and helps.

--- include/version.h~	2020-11-10 19:47:03.734243366 +0100
+++ include/version.h	2020-11-11 10:43:19.870180059 +0100
@@ -11,8 +11,8 @@
 extern "C" {
 #endif
 
-const char* gVERSION;
-const char* gVERSION_SHORT;
+extern const char* gVERSION;
+extern const char* gVERSION_SHORT;
 
 #ifdef __cplusplus
 }
@g-vidal g-vidal changed the title Patch to compile under bullseye with gcc10 (RaspberryPi debian stabdard) Patch to compile under bullseye with gcc10 (RaspberryPi debian standard) Nov 11, 2020
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

No branches or pull requests

1 participant