Skip to content

Comments

Adds support for compiling on Ubuntu 20.04 by lowering required cmake…#44

Merged
gamelaster merged 3 commits intopine64:masterfrom
Juul:master
Aug 1, 2023
Merged

Adds support for compiling on Ubuntu 20.04 by lowering required cmake…#44
gamelaster merged 3 commits intopine64:masterfrom
Juul:master

Conversation

@Juul
Copy link
Contributor

@Juul Juul commented Jul 17, 2023

… version to 3.16 (from 3.22) and removing the "set(CMAKE_C_STANDARD 20)" line which is not supported by cmake 3.16

Ubuntu 20.04 is still in support until April 2025 and in use by many people but the linux64 file in Releases is compiled against a glibc version that is too new, which means it doesn't run on Ubuntu 20.04. In addition, Ubuntu 20.04 only has cmake version 3.16 so compiling yourself is not possible.

I have compiled this on an a Linux x86 64 bit machine and tested firmware upgrading on a Pinecil v2, so it appears that using cmake 3.22 and setting the C standardard to 20 are both unnecessary.

… version to 3.16 (from 3.22) and removing the "set(CMAKE_C_STANDARD 20)" line which is not supported by cmake 3.16
@robertlipe
Copy link
Collaborator

robertlipe commented Jul 18, 2023 via email

@Juul
Copy link
Contributor Author

Juul commented Jul 18, 2023

Can you please find some way to address this that doesn't move the requirement backward and hold everyone else back a few years?

I think there is some confusion here. This project, as far as I can tell, doesn't use C++ at all. It is written in plain C.

The line I removed sets the variable C_STANDARD which specifies the version of C used and not the version of C++ used. I did mistype as the line actually sets the C standard to version 23.

There is no holding anyone back. Currently this program compiles fine without this setting and if anyone at a future date wants to use newer C features (unlikely I think) then they can simply add it back in. Hopefully at that point in a speculative future people aren't using Ubuntu 20.04 anymore, or if they are then hopefully you have a pre-compiled binary for them.

I have no idea how to keep C 23 support while supporting an old cmake but you could change it to 11 instead of 23 and that would work on older cmake. if you really want to keep this flag then I suggest adding a pre-compiled binary for older glibc versions because right now, for lots of people, this tools is not usable due to the sheer technical barrier presented by difficulty of compilation.

@gamelaster
Copy link
Member

Hey @Juul , thanks for PR.
Indeed this is good idea, although, instead of removing the whole C_STANDARD line, decrease it to version which will work properly with CMake 3.16? (Thus 17 or 11).

Thanks 🙏

@Juul
Copy link
Contributor Author

Juul commented Jul 20, 2023

@gamelaster Sure! Had to set it to 11. Pushed a new commit to this pull request. Let me know if you want me to make this pull request a single commit instead.

@gamelaster
Copy link
Member

@Juul Sorry, I forgot to merge it. Thank you very much.

@gamelaster gamelaster merged commit 48af2ad into pine64:master Aug 1, 2023
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 this pull request may close these issues.

3 participants