Adds support for compiling on Ubuntu 20.04 by lowering required cmake…#44
Adds support for compiling on Ubuntu 20.04 by lowering required cmake…#44gamelaster merged 3 commits intopine64:masterfrom
Conversation
… version to 3.16 (from 3.22) and removing the "set(CMAKE_C_STANDARD 20)" line which is not supported by cmake 3.16
|
Can you please find some way to address this that doesn't move the
requirement backward and hold everyone else back a few years? Even if the
project isn't using C++20 today, it's a burden on other devs to have to
remember to use old dialects of the language. It shrinks the pool of
available contributors when you require use of "funny" dialects and
increases the burden of people working in multiple environments.
Even if Pinecil isn't today using new range-for, spaceship, contains() in
maps, and such, it seems wrong to close that door for another two years
just because some users can't/won't run current tools. Having to look up
what can be used in each project individually is a pain for multi-platform
developers running current tools. Remembering you have to opencode
endswith() on a std::string - after fighting for it for years - because of
someone else's toolchain restrictions is just awkward.
In another windows RIGHT NOW, I'm moving a project to use a new feature in
C++ (it's admittedly more powerful than a soldering iron :-) and getting a
nice boost letting it parallelize loops with auto-vectorization (That can
decide to use threads if it wants) just by updating the language floor.
Benefits of keeping up to date are real.
Can that group really not just grab the source of current cmake from
cmake.org and compile it like everyone else?
…On Mon, Jul 17, 2023 at 5:40 PM Marc Juul ***@***.***> wrote:
… 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.
------------------------------
You can view, comment on, or merge this pull request online at:
#44
Commit Summary
- d4387f1
<d4387f1>
Adds support for compiling on Ubuntu 20.04 by lowering required cmake
version to 3.16 (from 3.22) and removing the "set(CMAKE_C_STANDARD 20)"
line which is not supported by cmake 3.16
File Changes
(1 file <https://github.com/pine64/blisp/pull/44/files>)
- *M* CMakeLists.txt
<https://github.com/pine64/blisp/pull/44/files#diff-1e7de1ae2d059d21e1dd75d5812d5a34b0222cef273b7c3a2af62eb747f9d20a>
(4)
Patch Links:
- https://github.com/pine64/blisp/pull/44.patch
- https://github.com/pine64/blisp/pull/44.diff
—
Reply to this email directly, view it on GitHub
<#44>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACCSD3ZGAVGL6MQQ772QXPLXQW5OFANCNFSM6AAAAAA2NSC4VM>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
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. |
|
Hey @Juul , thanks for PR. Thanks 🙏 |
…t version supported by cmake 3.16
|
@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. |
|
@Juul Sorry, I forgot to merge it. Thank you very much. |
… 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.