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

Building Cardinal on Arch Linux fails with an error pointing to Surge #889

Closed
maxigaz opened this issue Jun 20, 2023 · 8 comments
Closed

Comments

@maxigaz
Copy link

maxigaz commented Jun 20, 2023

When I try building Cardinal with all the submodules pulled on Arch Linux, the building process fails with an error pointing to Surge.

Reproduction Steps:
Run the following commands from the terminal:

git clone --depth=1 https://github.com/DISTRHO/Cardinal
cd Cardinal
git submodule update --init --recursive
make

Expected Behavior:
Cardinal compiles.

Computer Information:

  • OS: Arch Linux
  • GCC version: 13.1.1 20230429

Additional Information:
Here's the error:

In file included from /media/pici/Cardinal/plugins/surgext/surge/src/common/SkinColors.cpp:1:
/media/pici/Cardinal/plugins/surgext/surge/src/common/SkinColors.h:22:36: error: ‘uint32_t’ has not been declared
   22 |     Color(const std::string &name, uint32_t argb);
      |                                    ^~~~~~~~
/media/pici/Cardinal/plugins/surgext/surge/src/common/SkinColors.h:23:36: error: ‘uint32_t’ has not been declared
   23 |     Color(const std::string &name, uint32_t rgb, char alpha);
      |                                    ^~~~~~~~
/media/pici/Cardinal/plugins/surgext/surge/src/common/SkinColors.h:29:5: error: ‘uint8_t’ does not name a type
   29 |     uint8_t r, g, b, a;
      |     ^~~~~~~
/media/pici/Cardinal/plugins/surgext/surge/src/common/SkinColors.h:5:1: note: ‘uint8_t’ is defined in header ‘<cstdint>’; did you forget to ‘#include <cstdint>’?
    4 | #include <vector>
  +++ |+#include <cstdint>
    5 |
make[5]: *** [src/common/CMakeFiles/surge-common.dir/build.make:174: src/common/CMakeFiles/surge-common.dir/SkinColors.cpp.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory '/media/pici/Cardinal/deps/surge-build'
make[4]: *** [CMakeFiles/Makefile2:782: src/common/CMakeFiles/surge-common.dir/all] Error 2
make[4]: Leaving directory '/media/pici/Cardinal/deps/surge-build'
make[3]: *** [CMakeFiles/Makefile2:789: src/common/CMakeFiles/surge-common.dir/rule] Error 2
make[3]: Leaving directory '/media/pici/Cardinal/deps/surge-build'
make[2]: *** [Makefile:332: surge-common] Error 2
make[2]: Leaving directory '/media/pici/Cardinal/deps/surge-build'
make[1]: *** [Makefile:299: /media/pici/Cardinal/deps/surge-build/src/common/libsurge-common.a] Error 2
make[1]: Leaving directory '/media/pici/Cardinal/deps'
make: *** [Makefile:176: deps] Error 2
@baconpaul
Copy link
Contributor

As I mentioned, this has been fixed in surge mainline but surge mainline is not stable

By far the easiest fix is for Cardinal to add a -Icstdint to its make rules until we upgrade surge rack to 1.3, which will be the fall. I really don't want to run rack against a fork just for this case.

@baconpaul
Copy link
Contributor

Alternately, build with gcc12, which is the compiler we test the rack code with.

Thanks!

@baconpaul
Copy link
Contributor

Tagging @falkTX into this also.

@baconpaul
Copy link
Contributor

Oh and the final option is for cardinal to just apply the patch required at build time.

@falkTX
Copy link
Contributor

falkTX commented Jun 20, 2023

I pushed a workaround in DISTRHO/Cardinal@12878db
dont have CI tests using gcc13 though, so need @maxigaz to verify the fix

@baconpaul
Copy link
Contributor

Thank you @falkTX

@maxigaz
Copy link
Author

maxigaz commented Jun 24, 2023

Thank you @falkTX and @baconpaul and sorry for the late answer!

Shorty after reading your comments, I tried building Cardinal again while giving falkTX feedback through IRC. There were still build errors (some of which are yet to be resolved), but to my understanding none of them were unrelated to Surge, so I'm closing this issue. Thank you again!

@maxigaz maxigaz closed this as completed Jun 24, 2023
@baconpaul
Copy link
Contributor

Thanks!

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