ZDoom / Raze

Build engine port backed by GZDoom tech. Currently supports Duke Nukem 3D, Blood, Shadow Warrior, Redneck Rampage and Powerslave/Exhumed.
690 stars 59 forks source link

[BUG] Linux x64 Build Failure #1075

Open coreybruce opened 6 months ago

coreybruce commented 6 months ago

Raze version

Master

Which game are you running with Raze?

Duke Nukem 3D

What Operating System are you using?

Linux x86_64

Please describe your specific OS version

Manjaro

Relevant hardware info

AMD Ryzen™ 7 5700X , AMD Radeon™ RX 6700 XT

Have you checked that no other similar issue already exists?

A clear and concise description of what the bug is.

Fails to build on Linux x64 when it gets to vcpkg compiling

Steps to reproduce the behaviour.

No response

Your configuration

No response

Provide a Log

https://gist.github.com/coreybruce/847ad8b40e1e368845c40b2b49567483

coelckers commented 6 months ago

This is the error message:

"CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool."

This looks like a setup problem outside the project's control.

coreybruce commented 6 months ago

Wow there @coelckers I think you were way to quick and hasty closing this as you didn't fully look into the issue at all. I can see the build script is doing things incorrectly or at least that's causing issues, I copied the build instructions from the AUR packages https://aur.archlinux.org/packages/zmusic and https://aur.archlinux.org/packages/raze and was able to build both without any issues and I didn't need to change anything on my end.

Also vcpkg on the AUR has no issues building https://aur.archlinux.org/packages/vcpkg

after I installed that (just to be safe and incase it was still needed) I built both ZMusic and Raze following the AUR package build commands they used to have it compiled. Turns out vcpkg isn't even needed to build either of them.

For example with Raze doing if I follow the AUR package and use these following commands to build will successfully build without issues

 mkdir -p build
    cmake -B build \
          -D CMAKE_BUILD_TYPE=Release \
          -D CMAKE_CXX_FLAGS="${CXXFLAGS} -ffile-prefix-map=\"$PWD\"=." \
          -D DYN_GTK=OFF \
          -D DYN_OPENAL=OFF \
          -D CMAKE_INSTALL_PREFIX=/usr \
          -D SYSTEMINSTALL=ON
    make -j $(nproc) -C build

While these commands cause issues for building Raze

cmake -S .. -B . \
    -DCMAKE_TOOLCHAIN_FILE=./vcpkg/scripts/buildsystems/vcpkg.cmake \
    -DCMAKE_BUILD_TYPE=RelWithDebInfo \
    -DVCPKG_INSTALLLED_DIR=./vcpkg_installed/
make -j $(nproc); rc=$?
madame-rachelle commented 6 months ago

I will quite be the first to admit that the build script could use improvements. I know this because I am the one who designed it.

But I cannot test it in every possible environment that it is going to run in. I also have no idea how to account for the wildly different ways distros do things.

Personally, I'd be happier with pull requests that suggest improvements to it than snippy comments at the developer because you aren't happy with how he handled it. But it needs to be able to account for the environments within which it does still work and not break in those. If you need you can simply make a copy of the file and call it "auto-setup-linux-arch.sh" and call it a day and it will be accepted sight-unseen if it resembles doing anything it is supposed to be doing.

coreybruce commented 6 months ago

Wow hey I am on your side here and I haven't made any snippy comments here, all I said was you were quick to close this and blame the user in a friendly,constructive and informative way and show where the issue happened and how to fix it.

I would suggest making generic build instructions instead of a generic build script as they can cause problems and be a pain to maintain for multiple distros and those build instructions would work on other distros as well. :)

I would appreciate it if the issue was reopened and the tag got changed back to bug.

madame-rachelle commented 6 months ago

Sorry I misread your meaning then, inflection does not carry through in text.

Documentation actually is a secondary purpose to the build scripts. If they fail they serve as documentation for instructions on how to compile and can be adjusted as needed or even just manually replayed from the command line. For that reason we don't want them to get too complicated and only branch when absolutely necessary. It's one of the reasons why the Ubuntu package names are listed in the comments header - that helps someone figure out what packages they need for their own distro to make this work.

I know it's kind of a weird way of doing things, but if the requested packages are present there is no reason other than something the script cannot anticipate, that it shouldn't work. As is the case, here. If the scripts break in their intended environment then this serves as a first point where they need to be updated - which, in a way, forces us to keep them updated somehow or other.

We'd prefer things to be automatic to be as convenient as possible - we know that isn't always going to be possible in every environment. But that's why the script is committed as chmod +x'd.

coreybruce commented 6 months ago

It's no problem, I didn't take it personally haha

Yeah I get that tho I honestly think it can't get any simpler for you and the user by just having the proper build commands, it will be far less hassle for you to maintain and it's only a couple simple commands/steps to build both projects to play Duke3D tho if zmusic was a submodule for Raze it would be even easier and more convenient

billbeans commented 3 months ago

im having the same problem running the auto configure script on Ubuntu 22.04. I even installed vcpkg via this tutorial which seems to manually put it in /opt/ then creates symbolic links to /usr/lib. I didn't really imagine that to work but I thought it was worth a try. Is there a way I can skip the vcpkg installation part and have it still compile?