Compilation errors on Ubuntu 22.04 LTS

11 views
Skip to first unread message

Peter Barada

unread,
Mar 20, 2023, 3:58:17 PM3/20/23
to KeyKit
Tim,
KeyKit fails to build with gcc-11.3.0 compiler in Ubuntu 22.04LTS due to multiple definitions of Midiinput/output and Debug symbols.

I've created a "reduce-warnings" branch in https://github.com/pbarada/mykeykit.git (cloned from your repo) which contains fixes and other changes to reduce warning when building on Ubuntu.

One addition is to modify protoflp to allow "NO_RETURN_ATTRIBUTE" as part of a function definition, and for stdio and Linux build targets, provide GCC "__attribute__((__noreturn__))" telling GCC the function doesn't return (e.g. execerror, underflow, etc).  Since GCC doesn't only allows the attribute on the prototype, not function definition, make key.h both make define NO_RETURN_ATTRIBUTE as empty string if mdep.h doesn't define it, and after the prototypes are included to redefine NO_RETURN_ATTRIBUTE as the empty string.

I only have access to Ubuntu, and believe my changes will build in Windows (and elsewhere), but don't have a build environment to verify it.

Hopefully you find the changes (so far) useful...

--
Peter
Reply all
Reply to author
Forward
0 new messages