On Thu, Jan 23, 2020 at 04:48:14PM +0100, Robert-André Mauchin wrote: > How to fix the affected packages? For some I ised extern and it worked but for > other using extern resulted in error like: > > /usr/bin/ld: /builddir/build/BUILD/uTox-0.17.1/src/xlib/main.c:590: undefined > reference to `font_small_lineheight' > > Lots of undefined reference despite the var being marked as global. All the > packages I have to fix have deadish upstream. See https://gcc.gnu.org/gcc-10/porting_to.html#common The variables should be declared with extern in the header files and defined somewhere, in a single C source file. Which one really depends on what is the variable for, and what uses it. This is similar to C++, where common vars weren't supported (in standard C they aren't either), except that in C++17 and later there are inline variables, so also in C++ if you have (not in template) static data member declared in some header, you need to provide a definition in a single source file. Jakub _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx