xenia icon indicating copy to clipboard operation
xenia copied to clipboard

[Linux] Build failure

Open Shoegzer opened this issue 2 years ago • 0 comments

Validation

  • [X] I've read the FAQ.
  • [X] The Xenia build used is from the master branch (not MLBS/AlexVS/Canary/pull requests, etc.)
  • [X] This issue isn't for tech support (help with Xenia).
  • [X] If this issue occurs in a specific game, I've done analysis to locate the faulty subsystem of the emulator and a potential reason in it.
  • [X] I've checked if this issue hasn't already been reported.
  • [X] My device meets the minimum requirements: https://github.com/xenia-project/xenia/wiki/Quickstart#system-requirements
  • [X] (If building) I have read the building doc: https://github.com/xenia-project/xenia/blob/master/docs/building.md

Describe what's going wrong

Xenia fails to build under linux for reasons related to SDL, specifically throwing the build-time exception:

/usr/bin/ld: bin/Linux/Debug/libxenia-hid-sdl.a(sdl_input_driver.o): in function `xe::hid::sdl::SDLInputDriver::OnControllerDeviceAdded(SDL_Event const&)':
/home/testing/Desktop/xenia/xenia/build/../src/xenia/hid/sdl/sdl_input_driver.cc:441: undefined reference to `SDL_GameControllerGetType'
/usr/bin/ld: /home/testing/Desktop/xenia/xenia/build/../src/xenia/hid/sdl/sdl_input_driver.cc:467: undefined reference to `SDL_GameControllerSetPlayerIndex'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [xenia-hid-demo.make:119: bin/Linux/Debug/xenia-hid-demo] Error 1
make: *** [Makefile:368: xenia-hid-demo] Error 2

Test system is Linux Mint 20.3 / kernel 5.15, using gcc-11.1.0

Describe what should happen

Xenia should compile. Build failure encountered with this commit. Last known good compile with this commit.

If applicable, provide a callstack here, especially for crashes

No response

If applicable, upload a logfile and link it here

Full compile log: build_log.txt

Shoegzer avatar Jul 18 '22 18:07 Shoegzer

Update: After updating test system from Linux Mint 20.3 > 21.0, xenia now builds. However, I'm only getting a debug binary (no release binary). I'm just running xb-setup and xb-build. @JoelLinn can I assume this is normal given the experimenatal nature of Linux support?

Shoegzer avatar Aug 13 '22 19:08 Shoegzer

As with most build systems you need to select a configuration. Check the documentation on xb build

JoelLinn avatar Aug 13 '22 21:08 JoelLinn

Got it, thanks. I assumed the release binary would be built by default but you're right, the xb build doc suggests otherwise and of course provides the options. Closing this issue now.

Shoegzer avatar Aug 13 '22 22:08 Shoegzer