Repository navigation
Description
Additionally. unfortunately, protobuf also requires at least C++14 but the configure only set `-std=gnu++11`, making the compilation of the test programs, which check for the protobuf headers, fail.
(This is after applying the fix for the protobuf version check in #1875.)
configure:25968: checking for google/protobuf/compiler/command_line_interface.h
configure:25968: g++ -c -g -O2 -std=gnu++11 conftest.cpp >&5
In file included from /usr/include/absl/base/config.h:86,
from /usr/include/absl/base/attributes.h:37,
from /usr/include/absl/base/internal/raw_logging.h:24,
from /usr/include/absl/container/internal/btree.h:61,
from /usr/include/absl/container/btree_map.h:56,
from /usr/include/google/protobuf/compiler/command_line_interface.h:48,
from conftest.cpp:178:
/usr/include/absl/base/policy_checks.h:79:2: error: #error "C++ versions less than C++14 are not supported."
79 | #error "C++ versions less than C++14 are not supported."
| ^~~~~
Originally posted by @SpotlightKid in #1867 (comment)
This says that protobuf supported C++11 until just before version 22.0:
https://protobuf.dev/news/2022-08-03/
Likewise this release of Abseil should work with C++11:
https://github.com/abseil/abseil-cpp/tree/20220623.1
Originally posted by @peternewman in #1867 (comment)
Alas, that doesn't help when compiling ola for packages of Linux distributions, which ship newer protobuf versions.
Originally posted by @SpotlightKid in #1867 (comment)
You can also try this branch where I've made some very rudimentary attempts:
https://github.com/peternewman/ola/tree/0.10-c14-compat
More generally if someone can either do us a GitHub Action which compiles against Arch or can run a Buildbot or something we should catch these issues a lot sooner and be able to react to them better. Otherwise it's likely to be a case of pull requests welcome unfortunately...
Originally posted by @peternewman in #1867 (comment)
Activity
peternewman commentedon Jul 13, 2023
Does anyone know a way around that issue here? I don't want to cross compile, just x86_64.
I use this arch pkgbuild and change it's source to this branch.
Originally posted by @topas-rec in #1875 (comment)
Can you share your config.log please?
Alternatively have a look here for something else to test that might help...:
#1867 (comment)
Originally posted by @peternewman in #1875 (comment)
Sure
ola-git configuration log
I'll try that when I'm back at that machine. Thanks.
Originally posted by @topas-rec in #1875 (comment)
That's not quite what I'm looking for unfortunately. When it runs ./configure within that process, that should generate a file called config.log with a more verbose view of the configuration stage (and the failure).
Thanks.
Originally posted by @peternewman in #1875 (comment)
I cannot put this in here as text and even pastebin doesn't accept that size.
Most likely this is the problem:
error: static assertion failed: Protobuf only supports C++14 and newer.Originally posted by @topas-rec in #1875 (comment)
#1867 (comment)
I picked the two commits with the version check into my C14 branch and added
--with-protoc=/usr/bin/protoc(from #1864 (comment)) to the build command and I get this far in configuration:Originally posted by @topas-rec in #1875 (comment)
That looks fine.
You don't need that bit unless you're trying to cross-compile, which I suspect you aren't.
Again this doesn't tell us enough and we need the config.log which will have a more informative error like you found above, but also some key info in the lines above the error, like did my gnu++11 flagging get correctly through to that code...
Originally posted by @peternewman in #1875 (comment)
config.log
Originally posted by @topas-rec in #1875 (comment)
peternewman commentedon Jul 13, 2023
So @topas-rec the underlying error in those seems to be:
This tells us that std::in_place_t is only since C++17
https://en.cppreference.com/w/cpp/utility/in_place
Which I think is down to the slightly daft live at head nonsense from the absl library. Which "version"/LTS of abseil are you using, or is it just pulling down the git head each time?
If you try and change all the 14s to 17s in the branch I pointed to or your clone, does that allow it to build, and if so do all the tests still pass? I fear unfortunately it's going to fail and you'll be stuck, becuase we're still using auto_ptr which is removed in C++17:
https://en.cppreference.com/w/cpp/memory/auto_ptr
I think that's going to be a 0.12 release feature for us I'd imagine (with 500+ of them in the codebase), so you might have to live with a slightly older abseil for now if you want to build OLA, but as always PRs welcome!
[-]Newer protobuf requires at least C++14[/-][+]Newer protobuf requires at least C++14, abseil may need C++17[/+]topas-rec commentedon Jul 13, 2023
Thanks for your help so far.
Sadly (but obviously) this is not enough. (There are many 14s in that code and comments. I replaced all
++14with++17only. Occurrances were found only inconfigure.ac.I'll check if I can downgrade abseil (I use
abseil-cpp 20230125.3-1currently.config.log
peternewman commentedon Jul 13, 2023
No worries, thanks for reporting the error, it would get to the more stable releases in due course.
Erm configure succeeded in that config.log, what's the error you actually had with building with that change in place?
Cool, hopefully that might be an option in the interim.
topas-rec commentedon Jul 14, 2023
Yeah, the build started. Output was:
Build output
I didn't look into it, because I can imagine how much there is to do and I guess that exceeds my time for that. Maybe I will try that some day.
topas-rec commentedon Jul 14, 2023
For everyone on arch:
makes ola-git run again.
peternewman commentedon Jul 14, 2023
Excellent, I'm glad you've got an interim solution sorted.
Hopefully it's already obvious to arch users, but would you mind sharing the command to run to downgrade protobuf for the future selves who find themselves at this issue?
peternewman commentedon Jul 14, 2023
Well that's progress at least! 😄
So there are three core classes of issue in that so far:
This seems to be fixed by dropping the old macro and replacing it with some delete commands:
From:
https://github.com/protocolbuffers/protobuf/pull/5368/files#diff-9ed8738d1449f4760c3f4865d147678a024a6d73d35ed94999db2d74b4bfa2edL65-L66
To:
https://github.com/protocolbuffers/protobuf/pull/5368/files#diff-9ed8738d1449f4760c3f4865d147678a024a6d73d35ed94999db2d74b4bfa2edR50-R52
This are just doing some compilation checks, so you could just delete/comment them out as a test.
Likewise again.
That ought to prove fairly quickly whether it will just work after that, or there will be a never ending list of further issues.
I'll also flag again, if someone either wants to volunteer a machine for us to test with via Buildbot, or better yet an Arch docker image or something we can run continuous integration against, we'd hopefully catch these issues sooner and maybe even before you notice as an end user...
topas-rec commentedon Jul 14, 2023
My command is not everyone elses command because it depends on the installed packages (and arch users should know where to find such information ;-)).
One has to downgrade all packages that have unmet dependencies if
protobufwould be downgraded until the transaction is valid for pacman.The arch wiki: Downgrading packages holds all necessary information about this. Including warnings, that partially upgrades are not supported. So this should be a temporary solution.
A better temporary solution would be to create a compat package (from the arch FAQ).
Start with
sudo pacman --upgrade /var/cache/pacman/pkg/protobuf-21.12-2-x86_64.pkg.tar.zst(use packages from the cache on the hard drive or from the arch linux archive - see link to arch wiki: Downgrading packages above)Then read the problems that pacman prints about packages that would have unmet dependencies if
protobufwould be downgraded.Then downgrade those packages, too.
My specific command was
sudo pacman --upgrade /var/cache/pacman/pkg/protobuf-21.12-2-x86_64.pkg.tar.zst /var/cache/pacman/pkg/libphonenumber-1:8.13.14-1-x86_64.pkg.tar.zst /var/cache/pacman/pkg/mumble-1.5.517-1-x86_64.pkg.tar.zst /var/cache/pacman/pkg/mumble-server-1.5.517-1-x86_64.pkg.tar.zst /var/cache/pacman/pkg/python-protobuf-21.12-2-x86_64.pkg.tar.zstThen
pacmanneeds to ignore those packages on updates (see wiki link).topas-rec commentedon Aug 8, 2023
This (holding back
protobufand the dependencies listed above) doesn't work for me anymore. Other tools (Evolution in this case) need the updated libs.I derived a "compat" package (see above) from the
protobufPKGBUILD. It provides just the missingprotobufc.so.32library. This works for me and is the better temporary solution.I'll try to get this package into the AUR and link it here.
topas-rec commentedon Aug 10, 2023
compat package for arch created at: https://aur.archlinux.org/packages/libprotobuf-compat-32
cbix commentedon Dec 12, 2023
@topas-rec did you also manage to build ola on Arch? I believe for that we'll also need an older
abseil-cpp.Update: legacy protobuf + abseil versions + fixed ola are now in proaudio + AUR.
misc/ola: Change LIB_DEPENDS from protobuf to protobuf3
vermaete commentedon Dec 26, 2023
The current Yocto version if failing due to the version of protoc is now 23.4.0
In the previous release of Yocto (Mickeldore) is was 3.21.12.
Is there already a solution (at branch or patch) for the fix of the
checking for google/protobuf/compiler/command_line_interface.h... noissue?The patch Fix protoc version checking, since v20.x did help to detect the protoc.
br
kripton commentedon Mar 27, 2024
In the Gentoo Linux world, it's not yet a problem for stable amd64 systems (since other packages suffer the same pain as we do, see tracker bug at https://bugs.gentoo.org/912819). However, for unstable ~amd64 systems, protobuf might already be at 23.3.
Ola's reference to the TRACKER bug is https://bugs.gentoo.org/923757
kripton commentedon Jan 1, 2025
@peternewman this is getting more critical. As far as I know, the latest version of protobuf that OLA successfully configures, compiles and runs with is 21.x. More and more distributions do no longer support that version and we risk getting OLA dropped from those.
In Gentoo, I have to hold back updates of other software packages that do require a later version of protobuf and OLA is the last piece that needs this old version of protobuf.
I know that protobuf is very deeply rooted in OLA but some action needs to be taken, better sooner than later.
Would maybe also be a good opportunity to make OLA 0.11.x the "official" version and let 0.10.x phase out?
package/ola: remove package
package/ola: remove package
misc/ola: Change LIB_DEPENDS from protobuf to protobuf3
package/ola: remove package