Skip to contentSkip to conversation

sbc: Fix for gcc 15 compile error

PATCH Superseded Ryan Eatmon 3 participants 7 messages May 21, 2025 – May 22, 2025

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sbc: Fix for gcc 15 compile error

With the move to gcc 15, the code is not generating a compile error.

../sbc-2.1/sbc/sbc_primitives_armv6.c:284:9:
error: too many arguments to function 'sbc_analyze_eight_armv6';
expected 0, have 3

Simple fix is to drop the C standard down to gnu17 to avoid this new error.

---
 meta/recipes-multimedia/sbc/sbc_2.1.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-multimedia/sbc/sbc_2.1.bb +2 -0
index 5aaa52313f..8b91e7e65b 100644
@@ -19,5 +19,7 @@ SRC_URI[sha256sum] = "426633cabd7c798236443516dfa8335b47e004b0ef37ff107e0c7ead32
 
 inherit autotools pkgconfig
 
+CFLAGS += "-std=gnu17"
+
 PACKAGES =+ "${PN}-examples"
 FILES:${PN}-examples += "${bindir}/*"
Signature · 1 line
2.17.1
#1 lore raw

Hi Ryan,

Quoted 1 line · Ryan Eatmon via lists.openembedded.org

With the move to gcc 15, the code is not generating a compile error.

Do you mean *now*generating a compile error?

I guess the YP AB doesn't have a build that catches this target.

Quoted 7 lines

../sbc-2.1/sbc/sbc_primitives_armv6.c:284:9:
error: too many arguments to function 'sbc_analyze_eight_armv6';
expected 0, have 3

Simple fix is to drop the C standard down to gnu17 to avoid this new error.

It would be better to file a bug or at least send the maintainer a patch or a bug description. That's:

   Marcel Holtmann <[email protected]>

from:
https://git.kernel.org/pub/scm/bluetooth/sbc.git/tree/README

Anyway, we do have 17 other such work-arounds:

poky.git
❯ rg gnu17 | wc -l
17

so one more won't hurt that much!

../Randy

Quoted 27 lines
---
  meta/recipes-multimedia/sbc/sbc_2.1.bb | 2 ++
  1 file changed, 2 insertions(+)
meta/recipes-multimedia/sbc/sbc_2.1.bb +2 -1
index 5aaa52313f..8b91e7e65b 100644
@@ -19,5 +19,7 @@ SRC_URI[sha256sum] = "426633cabd7c798236443516dfa8335b47e004b0ef37ff107e0c7ead32
 
  inherit autotools pkgconfig
 
+CFLAGS += "-std=gnu17"
+
  PACKAGES =+ "${PN}-examples"
  FILES:${PN}-examples += "${bindir}/*"
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#217048):https://lists.openembedded.org/g/openembedded-core/message/217048 Mute This Topic:https://lists.openembedded.org/mt/113232263/3616765
Group Owner:[email protected] Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 2 lines
# Randy MacLeod
# Wind River Linux
#2 lore raw
Quoted 6 lines · Randy MacLeod

Hi Ryan,

Quoted 1 line · Ryan Eatmon via lists.openembedded.org

With the move to gcc 15, the code is not generating a compile error.

Do you mean *now*generating a compile error?

Sigh... yes. Me speak/type good. =P

I'll send a v2.

Quoted 60 lines

I guess the YP AB doesn't have a build that catches this target.

Quoted 6 lines

../sbc-2.1/sbc/sbc_primitives_armv6.c:284:9:
error: too many arguments to function 'sbc_analyze_eight_armv6';
expected 0, have 3

Simple fix is to drop the C standard down to gnu17 to avoid this new error.

It would be better to file a bug or at least send the maintainer a patch or a bug description. That's:

   Marcel Holtmann <[email protected]>

from:
https://git.kernel.org/pub/scm/bluetooth/sbc.git/tree/README

Anyway, we do have 17 other such work-arounds:

poky.git
❯ rg gnu17 | wc -l
17

so one more won't hurt that much!

../Randy

Quoted 26 lines
---
  meta/recipes-multimedia/sbc/sbc_2.1.bb | 2 ++
  1 file changed, 2 insertions(+)
meta/recipes-multimedia/sbc/sbc_2.1.bb +2 -1
index 5aaa52313f..8b91e7e65b 100644
@@ -19,5 +19,7 @@ SRC_URI[sha256sum] = "426633cabd7c798236443516dfa8335b47e004b0ef37ff107e0c7ead32
 
  inherit autotools pkgconfig
 
+CFLAGS += "-std=gnu17"
+
  PACKAGES =+ "${PN}-examples"
  FILES:${PN}-examples += "${bindir}/*"
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#217048):https://lists.openembedded.org/g/openembedded-core/message/217048 Mute This Topic:https://lists.openembedded.org/mt/113232263/3616765
Group Owner:[email protected] Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 2 lines
# Randy MacLeod
# Wind River Linux
Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
#3 lore raw
In reply to Randy MacLeod
Quoted 17 lines · Randy MacLeod

Hi Ryan,

Quoted 1 line · Ryan Eatmon via lists.openembedded.org

With the move to gcc 15, the code is not generating a compile error.

Do you mean *now*generating a compile error?

I guess the YP AB doesn't have a build that catches this target.

Quoted 6 lines

../sbc-2.1/sbc/sbc_primitives_armv6.c:284:9:
error: too many arguments to function 'sbc_analyze_eight_armv6';
expected 0, have 3

Simple fix is to drop the C standard down to gnu17 to avoid this new error.

Quoted 7 lines

It would be better to file a bug or at least send the maintainer a patch or a bug description. That's:

   Marcel Holtmann <[email protected]>

from:
https://git.kernel.org/pub/scm/bluetooth/sbc.git/tree/README

Sent bug report.

Quoted 42 lines

Anyway, we do have 17 other such work-arounds:

poky.git
❯ rg gnu17 | wc -l
17

so one more won't hurt that much!

../Randy

Quoted 26 lines
---
  meta/recipes-multimedia/sbc/sbc_2.1.bb | 2 ++
  1 file changed, 2 insertions(+)
meta/recipes-multimedia/sbc/sbc_2.1.bb +2 -1
index 5aaa52313f..8b91e7e65b 100644
@@ -19,5 +19,7 @@ SRC_URI[sha256sum] = "426633cabd7c798236443516dfa8335b47e004b0ef37ff107e0c7ead32
 
  inherit autotools pkgconfig
 
+CFLAGS += "-std=gnu17"
+
  PACKAGES =+ "${PN}-examples"
  FILES:${PN}-examples += "${bindir}/*"
 
-=-=-=-=-=-=-=-=-=-=-=-

Links: You receive all messages sent to this group.
View/Reply Online (#217048):https://lists.openembedded.org/g/openembedded-core/message/217048 Mute This Topic:https://lists.openembedded.org/mt/113232263/3616765
Group Owner:[email protected] Unsubscribe:https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 2 lines
# Randy MacLeod
# Wind River Linux
Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
#4 lore raw
In reply to Ryan Eatmon
Quoted 20 lines · Ryan Eatmon via lists.openembedded.org

With the move to gcc 15, the code is not generating a compile error.

../sbc-2.1/sbc/sbc_primitives_armv6.c:284:9:
error: too many arguments to function 'sbc_analyze_eight_armv6';
expected 0, have 3

Simple fix is to drop the C standard down to gnu17 to avoid this new error.

---
 meta/recipes-multimedia/sbc/sbc_2.1.bb | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-multimedia/sbc/sbc_2.1.bb +0 -0
index 5aaa52313f..8b91e7e65b 100644

meta/recipes-multimedia/sbc/sbc_2.1.bb SRC_URI[sha256sum] = "426633cabd7c798236443516dfa8335b47e004b0ef37ff107e0c7ead32 · line 22

Quoted 4 lines
meta/recipes-multimedia/sbc/sbc_2.1.bb +1 -0
@@ -19,5 +19,7 @@ SRC_URI[sha256sum] = "426633cabd7c798236443516dfa8335b47e004b0ef37ff107e0c7ead32
 
 inherit autotools pkgconfig
 
+CFLAGS += "-std=gnu17"

maybe changing
static void __attribute__((naked)) sbc_analyze_eight_armv6()

to
static void __attribute__((naked)) sbc_analyze_eight_armv6(const unsigned char *buffer, int size, int channels)

in that file helps ?

Quoted 15 lines
meta/recipes-multimedia/sbc/sbc_2.1.bb +1 -1
+
 PACKAGES =+ "${PN}-examples"
 FILES:${PN}-examples += "${bindir}/*"
--

2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#217048): https://lists.openembedded.org/g/openembedded-core/message/217048
Mute This Topic: https://lists.openembedded.org/mt/113232263/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

#5 lore raw
Quoted 30 lines · Khem Raj
Quoted 20 lines · Ryan Eatmon via lists.openembedded.org

With the move to gcc 15, the code is not generating a compile error.

../sbc-2.1/sbc/sbc_primitives_armv6.c:284:9:
error: too many arguments to function 'sbc_analyze_eight_armv6';
expected 0, have 3

Simple fix is to drop the C standard down to gnu17 to avoid this new error.

---
  meta/recipes-multimedia/sbc/sbc_2.1.bb | 2 ++
  1 file changed, 2 insertions(+)
meta/recipes-multimedia/sbc/sbc_2.1.bb +0 -0
index 5aaa52313f..8b91e7e65b 100644

meta/recipes-multimedia/sbc/sbc_2.1.bb SRC_URI[sha256sum] = "426633cabd7c798236443516dfa8335b47e004b0ef37ff107e0c7ead32 · line 22

Quoted 4 lines
meta/recipes-multimedia/sbc/sbc_2.1.bb +1 -0
@@ -19,5 +19,7 @@ SRC_URI[sha256sum] = "426633cabd7c798236443516dfa8335b47e004b0ef37ff107e0c7ead32
 
  inherit autotools pkgconfig
 
+CFLAGS += "-std=gnu17"

maybe changing
static void __attribute__((naked)) sbc_analyze_eight_armv6()

Quoted 5 lines

to
static void __attribute__((naked)) sbc_analyze_eight_armv6(const unsigned char *buffer, int size, int channels)

in that file helps ?

Likely that would help. I guess the philosophy question is...

Patch the source code vs. Lower the C standard to match what the existing source was developed under?

What is the preferred method for handling things like this?

Quoted 17 lines
Quoted 17 lines
meta/recipes-multimedia/sbc/sbc_2.1.bb +1 -1
+
  PACKAGES =+ "${PN}-examples"
  FILES:${PN}-examples += "${bindir}/*"
--

2.17.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#217048): https://lists.openembedded.org/g/openembedded-core/message/217048
Mute This Topic: https://lists.openembedded.org/mt/113232263/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Signature · 3 lines
Ryan Eatmon                [email protected]
-----------------------------------------
Texas Instruments, Inc.  -  LCPD  -  MGTS
#6 lore raw
Quoted 38 lines · Ryan Eatmon
Quoted 34 lines · Khem Raj
Quoted 20 lines · Ryan Eatmon via lists.openembedded.org

With the move to gcc 15, the code is not generating a compile error.

../sbc-2.1/sbc/sbc_primitives_armv6.c:284:9:
error: too many arguments to function 'sbc_analyze_eight_armv6';
expected 0, have 3

Simple fix is to drop the C standard down to gnu17 to avoid this new error.

---
  meta/recipes-multimedia/sbc/sbc_2.1.bb | 2 ++
  1 file changed, 2 insertions(+)
meta/recipes-multimedia/sbc/sbc_2.1.bb +0 -0
index 5aaa52313f..8b91e7e65b 100644

meta/recipes-multimedia/sbc/sbc_2.1.bb SRC_URI[sha256sum] = "426633cabd7c798236443516dfa8335b47e004b0ef37ff107e0c7ead32 · line 22

Quoted 4 lines
meta/recipes-multimedia/sbc/sbc_2.1.bb +1 -0
@@ -19,5 +19,7 @@ SRC_URI[sha256sum] = "426633cabd7c798236443516dfa8335b47e004b0ef37ff107e0c7ead32
 
  inherit autotools pkgconfig
 
+CFLAGS += "-std=gnu17"

maybe changing
static void __attribute__((naked)) sbc_analyze_eight_armv6()

to
static void __attribute__((naked)) sbc_analyze_eight_armv6(const unsigned char *buffer, int size, int channels)

Quoted 8 lines
Quoted 1 line

in that file helps ?

Likely that would help. I guess the philosophy question is...

Patch the source code vs. Lower the C standard to match what the existing source was developed under?

What is the preferred method for handling things like this?

I think it's subjective. distro hat on you want to do minimal changes and perhaps pinning to C17 is fine, but we won't know when to remove it unless we put some markers so its technical debt we will carry

However, fixing the package itself is paying the debt now and helps the ecosystem but it does mean some extra work in upstreaming the patch I know you have already reported the bug but this is one step more to provide a potential fix as well.

Quoted 23 lines
Quoted 10 lines
Quoted 10 lines
meta/recipes-multimedia/sbc/sbc_2.1.bb +1 -1
+
  PACKAGES =+ "${PN}-examples"
  FILES:${PN}-examples += "${bindir}/*"
--

2.17.1

Quoted 8 lines
Quoted 8 lines

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#217048): https://lists.openembedded.org/g/openembedded-core/message/217048
Mute This Topic: https://lists.openembedded.org/mt/113232263/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

--
Ryan Eatmon [email protected]
-----------------------------------------
Texas Instruments, Inc. - LCPD - MGTS