Bug 273685 - misc/g810-led: Fails to build with GCC 13: src/helpers/help.h:24:37: error: found ':' in nested-name-specifier, expected '::'
Summary: misc/g810-led: Fails to build with GCC 13: src/helpers/help.h:24:37: error: f...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Lorenzo Salvadore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-09-10 07:49 UTC by Lorenzo Salvadore
Modified: 2023-11-18 10:25 UTC (History)
1 user (show)

See Also:
Alexander88207: maintainer-feedback+


Attachments
0001-misc-g810-led-Update-to-v0.4.3-Fix-build-for-GCC13.patch (1.83 KB, patch)
2023-09-30 17:45 UTC, Alexander Vereeken
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Lorenzo Salvadore freebsd_committer freebsd_triage 2023-09-10 07:49:08 UTC
This bug report blocks the update of GCC_DEFAULT to 13. This webpage can help finding a fix: https://gcc.gnu.org/gcc-13/porting_to.html

gmake[1]: Entering directory '/wrkdirs/usr/ports/misc/g810-led/work/g810-led-0.4.2'
g++13 -Dhidapi -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc13  -Wl,-rpath=/usr/local/lib/gcc13  -std=gnu++11 -DVERSION=\"0.4.2\"  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc13 -L/usr/local/lib/gcc13  -fPIC -shared -Wl,-soname,libg810-led.so -o lib/libg810-led.so.0.4.2 src/classes/Keyboard.cpp -lhidapi
g++13 -Dhidapi -O2 -pipe  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc13  -Wl,-rpath=/usr/local/lib/gcc13  -std=gnu++11 -DVERSION=\"0.4.2\"  -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc13 -L/usr/local/lib/gcc13  src/main.cpp src/helpers/help.cpp src/helpers/utils.cpp src/classes/Keyboard.cpp -o bin/g810-led -lhidapi
In file included from src/helpers/help.cpp:17:
src/helpers/help.h:24:14: warning: elaborated-type-specifier for a scoped enum must not use the 'class' keyword
   24 |         enum class KeyboardFeatures : uint16_t {
      |         ~~~~ ^~~~~
      |              -----
src/helpers/help.h:24:37: error: found ':' in nested-name-specifier, expected '::'
   24 |         enum class KeyboardFeatures : uint16_t {
      |                                     ^
      |                                     ::

Full log: https://pkg-status.freebsd.org/package18/data/124amd64-default-foo/2023-09-06_17h55m19s/logs/errors/g810-led-0.4.2_1.log
Comment 1 Alexander Vereeken 2023-09-17 21:54:30 UTC
Hello Lorenzo,

sorry for the delay, will take a look tomorrow at this.
Comment 2 Alexander Vereeken 2023-09-30 17:45:22 UTC
Created attachment 245336 [details]
0001-misc-g810-led-Update-to-v0.4.3-Fix-build-for-GCC13.patch

This patch is an minor update to v0.4.3 and should fix the build for GCC 13.

Can you retry?
Comment 3 Lorenzo Salvadore freebsd_committer freebsd_triage 2023-11-18 10:25:04 UTC
I remove the block for GCC default version update: latest test on FreeBSD 13.2 did not report any issue with this port. The bug report can probably be safely closed  once FreeBSD 12 goes EOL.

I will however test the proposed patch as soon as possible. Thanks Alexander.