Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation fails with gcc 14 #228

Closed
wineee opened this issue Dec 28, 2024 · 5 comments
Closed

Compilation fails with gcc 14 #228

wineee opened this issue Dec 28, 2024 · 5 comments

Comments

@wineee
Copy link

wineee commented Dec 28, 2024

GCC 14 elevates some compilation warnings to errors, causing the jamesdsp compilation to fail.
We need to add the following compilation parameters to pass the compilation:

"-Wno-error=incompatible-pointer-types"                                                                                                                                                                          
"-Wno-error=implicit-int"                                                                                                                                                                                        
"-Wno-error=implicit-function-declaration"

The following should be similar issues:

@magdesign
Copy link

how would i have to add this parameters... trying to compile on aarch64, alpine64 for pulseaudio and stuck with:

../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp: In function 'void JdspImpResToolbox::decompressResamplerMQ(const double*, float*)':
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:23:5: error: 'int32_t' was not declared in this scope
   23 |     int32_t k;
      |     ^~~~~~~
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:9:1: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    8 | #include <float.h>
  +++ |+#include <cstdint>
    9 | 
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:28:10:error: 'k' was not declared in this scope
   28 |     for (k = 0; k < 700; k++)
      |          ^
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:38:10:error: 'k' was not declared in this scope
   38 |     for (k = 0; k < 699; k++)
      |          ^
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:47:10:error: 'k' was not declared in this scope
   47 |     for (k = 0; k < 698; k++)
      |          ^
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:57:10:error: 'k' was not declared in this scope
   57 |     for (k = 698; k >= 0; k--)
      |          ^
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:60:10:error: 'k' was not declared in this scope
   60 |     for (k = 0; k < 701; k++)
      |          ^
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:62:10:error: 'k' was not declared in this scope
   62 |     for (k = 0; k < 700; k++)
      |          ^
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:73:12:error: expected ';' before 'low_i'
   73 |     int32_t low_i, low_ip1, high_i, mid_i;
      |            ^~~~~~
      |            ;
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:74:10:error: 'k' was not declared in this scope
   74 |     for (k = 0; k < 22438; k++)
      |          ^
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:76:9: error: 'low_i' was not declared in this scope
   76 |         low_i = 0;
      |         ^~~~~
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:77:9: error: 'low_ip1' was not declared in this scope
   77 |         low_ip1 = 2;
      |         ^~~~~~~
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:78:9: error: 'high_i' was not declared in this scope
   78 |         high_i = 701;
      |         ^~~~~~
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:82:13:error: 'mid_i' was not declared in this scope
   82 |             mid_i = ((low_i + high_i) + 1) >> 1;
      |             ^~~~~
make[1]: *** [Makefile:3460: JdspImpResToolbox.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/me/Downloads/JDSP4Linux/build/src'
make: *** [Makefile:73: sub-src-make_first] Error 2

@timschneeb
Copy link
Member

I've added the compiler flags to the qmake project file.

The source of these errors is the libjamesdsp/libjdspimprestoolbox dependency which is not developed by me and doesn't really follow modern C conventions, so I'll just set the compiler flags.

@wineee
Copy link
Author

wineee commented Jan 9, 2025

how would i have to add this parameters... trying to compile on aarch64, alpine64 for pulseaudio and stuck with:

../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp: In function 'void JdspImpResToolbox::decompressResamplerMQ(const double*, float*)':
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:23:5: error: 'int32_t' was not declared in this scope
   23 |     int32_t k;
      |     ^~~~~~~
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:9:1: note: 'int32_t' is defined in header '<cstdint>'; this is probably fixable by adding '#include <cstdint>'
    8 | #include <float.h>
  +++ |+#include <cstdint>
    9 | 
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:28:10:error: 'k' was not declared in this scope
   28 |     for (k = 0; k < 700; k++)
      |          ^
../../src/subprojects/LiquidEqualizerWidget/3rdparty/JdspImpResToolbox.cpp:38:10:error: 'k' was not declared in this scope
   38 |     for (k = 0; k < 699; k++)

......

This should be a different issue,maybe adding "#include <cstdint>" in JdspImpResToolbox.cpp can fix this, the compiler is prompting you to do this

@magdesign
Copy link

thanks.

@timschneeb
Copy link
Member

Missing include is fixed with commits 087d4a5 and b6dca3d

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants