SGDBoop icon indicating copy to clipboard operation
SGDBoop copied to clipboard

Build failure

Open SolitudeSF opened this issue 10 months ago • 11 comments

sgdboop.c:1280:60: error: too many arguments to function ‘getMods’; expected 0, have 1
 1280 |                                                 appsMods = getMods(includeMods);
      |                                                            ^~~~~~~ ~~~~~~~~~~~

gcc 15

SolitudeSF avatar May 13 '25 17:05 SolitudeSF

same issue

muznyo avatar May 21 '25 07:05 muznyo

This is due to the gcc15 update, if you run the build with CC=gcc-14 set it will build with gcc14 and the build succeeds.

raku-cat avatar May 26 '25 20:05 raku-cat

thank you, seems to have fixed the problem

for anyone who's installing this from a package manager on arch linux, use yay and run these commands (process should be similar on other distros)

Install gcc 14 (if not already installed):

sudo pacman -S gcc14

Run:

yay -G sgdboop cd sgdboop

Edit the PKGBUILD:

nano PKGBUILD

Add this line before the make or build() function:

export CC=gcc-14 export CXX=g++-14

then build

makepkg -si

Djihads80 avatar Jun 03 '25 18:06 Djihads80

You can also just specify the environment variables before using your pacman wrapper.

CC=gcc-14 CXX=g++-14 paru -S sgdboop

I am curious, what changed in gcc15 that it can't compile SGDBoop?

papaj-na-wrotkach avatar Jun 20 '25 15:06 papaj-na-wrotkach

You can also just specify the environment variables before using your pacman wrapper.

CC=gcc-14 CXX=g++-14 paru -S sgdboop I am curious, what changed in gcc15 that it can't compile SGDBoop?

Broke builds for a lot of projects, I believe it was the change to C23, but 15 was a big bump, could've been any number of other changes.

raku-cat avatar Jun 20 '25 15:06 raku-cat

You can also just specify the environment variables before using your pacman wrapper. CC=gcc-14 CXX=g++-14 paru -S sgdboop I am curious, what changed in gcc15 that it can't compile SGDBoop?

Broke builds for a lot of projects, I believe it was the change to C23, but 15 was a big bump, could've been any number of other changes.

Alright, thanks. I am just trying to analyze how this C code works because I never really used C (only very basic C++).

getMods is defined like this: https://github.com/SteamGridDB/SGDBoop/blob/9be5d26881099e6d3c89e125dd8cdcfc20e595a4/sgdboop.c#L933-L959 It is used here: https://github.com/SteamGridDB/SGDBoop/blob/9be5d26881099e6d3c89e125dd8cdcfc20e595a4/sgdboop.c#L1279-L1281

Why is includeMods passed to getMods? I don't see how it is used there. Shouldn't getMods be defined like this and used without any arguments?

struct nonSteamApp* getMods(void)

I think you are right about the change to C23. C always treated empty parentheses as unknown number of unknown arguments, right? It might be that for C23 getMods() is now the same as getMods(void), just like in C++.

I might be wrong though - as I said I have no experience with C 😅

papaj-na-wrotkach avatar Jun 20 '25 16:06 papaj-na-wrotkach

thank you, seems to have fixed the problem

for anyone who's installing this from a package manager on arch linux, use yay and run these commands (process should be similar on other distros)

Install gcc 14 (if not already installed):

sudo pacman -S gcc14

Run:

yay -G sgdboop cd sgdboop

Edit the PKGBUILD:

nano PKGBUILD

Add this line before the make or build() function:

export CC=gcc-14 export CXX=g++-14

then build

makepkg -si

just tried to add this to the PKGBUILD but it's literally not doing anything, just exits with no error or output

claymorwan avatar Aug 26 '25 15:08 claymorwan

If you want to edit the PKGBUILD, just change gcc to gcc-14 in makedepends and in build function change make to CC=gcc-14 CXX=g++-14 make.

It is easier to use env vars with an AUR helper (or makepkg) as I suggested here. You can also export the env vars before running the commands as usual.

I think your problem was putting two export statements in one line. It should be either

export CC=gcc-14 CXX=g++-14

or

export CC=gcc-14
export CXX=g++-14

papaj-na-wrotkach avatar Aug 26 '25 16:08 papaj-na-wrotkach

It is easier to use env vars with an AUR helper (or makepkg) as I suggested here. You can also export the env vars before running the commands as usual.

ye i could, the thing is i wanna actually do it in the PKGBUILD script cuz im the maintainer of the aur pkg and i want it to work directly with it

i exported the env variables line by line like u said and it worked now thanks, im gonna push it to the aur so it should work just fine now

claymorwan avatar Aug 26 '25 22:08 claymorwan

thank you for maintaining SGDBoop for the aur twin ❤️

Djihads80 avatar Aug 27 '25 22:08 Djihads80

thank you for maintaining SGDBoop for the aur twin ❤️

yw twin, glad to help

claymorwan avatar Aug 29 '25 18:08 claymorwan