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

[Testing] Fix building on Linux #2277

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

thrimbor
Copy link
Contributor

@thrimbor thrimbor commented Aug 6, 2024

This fixes building Xenia on my Arch Linux machine. Without these changes, building throws the following error:

==== Building xenia-debug-ui (debug_linux) ====
Creating obj/Linux/Debug/Linux/Debug/xenia-debug-ui
debug_window.cc
/usr/bin/ld: obj/Linux/Debug/Linux/Debug/xenia-vfs-tests/console_app_main_posix.o: in function `main':
/.../xenia/build/../src/xenia/base/console_app_main_posix.cc:21:(.text+0x7d): undefined reference to `cvar::ParseLaunchArguments(int&, char**&, std::basic_string_view<char, std::char_traits<char> >, std::__debug::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&)'
/usr/bin/ld: /.../xenia/build/../src/xenia/base/console_app_main_posix.cc:26:(.text+0xcb): undefined reference to `xe::InitializeLogging(std::basic_string_view<char, std::char_traits<char> >)'
/usr/bin/ld: /.../xenia/build/../src/xenia/base/console_app_main_posix.cc:35:(.text+0x180): undefined reference to `xe::ShutdownLogging()'
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [xenia-vfs-tests.make:121: bin/Linux/Debug/xenia-vfs-tests] Error 1
make: *** [Makefile:419: xenia-vfs-tests] Error 2
make: *** Waiting for unfinished jobs....

I also had to modify the build system to find my system's version of premake5, I can PR that as well if desired.

@Shoegzer
Copy link
Contributor

Shoegzer commented Aug 6, 2024

Thanks, but I tried your PR and it's still failing for me. Can you have a look at my comment in #2275 regarding building with gcc-14?

@thrimbor
Copy link
Contributor Author

thrimbor commented Aug 6, 2024

Yeah, there are multiple issues, this only fixes the testing-specific one.

As far as I saw the cxxopts submodule is quite old, and might already have a fix in never versions. I did a cheap workaround by commenting out this line:

"FatalWarnings", -- Treat warnings as errors.

Other than that and premake5 not getting found I had no issues.

@Shoegzer
Copy link
Contributor

Shoegzer commented Aug 6, 2024

Thanks. What compiler are you using? I'm sure there's a way to force gcc-13 to avoid the issue I mentioned (perhaps you know off the top?) so I can at least get it to build with your PR.

@thrimbor
Copy link
Contributor Author

thrimbor commented Aug 6, 2024

Xenia seems to build with clang by default, so clang 18.1.8.
Removing FatalWarnings might already work for your problem, too, though.

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

Successfully merging this pull request may close these issues.

2 participants