OpenRA / ra2

A Red Alert 2 mod for the OpenRA game engine
GNU General Public License v3.0
970 stars 160 forks source link

make not working in Linux Mint 19 #749

Closed aless80 closed 3 years ago

aless80 commented 3 years ago

The make command does not work on my machine

> cat /etc/linuxmint/info
RELEASE=19
CODENAME=tara
EDITION="MATE"
DESCRIPTION="Linux Mint 19 Tara"
DESKTOP=Gnome
TOOLKIT=GTK
NEW_FEATURES_URL=http://www.linuxmint.com/rel_tara_mate_whatsnew.php
RELEASE_NOTES_URL=http://www.linuxmint.com/rel_tara_mate.php
USER_GUIDE_URL=help:linuxmint
GRUB_TITLE=Linux Mint 19 MATE
git clone https://github.com/OpenRA/ra2.git
> cd ra2
> make
OpenRA engine version release-20200202 is required.
Downloading engine...
Compiling engine...
make[1]: Entering directory '/home/amarin/ra2/engine'
make[1]: Leaving directory '/home/amarin/ra2/engine'
make[1]: Entering directory '/home/amarin/ra2/engine'
Fetching ICSharpCode.SharpZipLib from NuGet
Fetching MaxMind.Db from NuGet
Fetching NUnit from NuGet
Fetching NUnit.Console from NuGet
Fetching Open.Nat from NuGet
Fetching FuzzyLogicLibrary from NuGet.
Fetching SDL2-CS from GitHub.
Fetching OpenAL-CS from GitHub.
Fetching Eluant from GitHub.
Fetching rix0rrr.BeaconLib from NuGet.
/bin/sh: 1: msbuild: not found
Makefile:171: recipe for target 'cli-dependencies' failed
make[1]: *** [cli-dependencies] Error 127
make[1]: Leaving directory '/home/amarin/ra2/engine'
Makefile:106: recipe for target 'engine-dependencies' failed
make: *** [engine-dependencies] Error 2
>launch-game.sh  #this kills the terminal 
Mailaender commented 3 years ago

Download msbuild from https://www.mono-project.com/download/stable/#download-lin-ubuntu

aless80 commented 3 years ago

After installing mono for ubuntu 18 I get past the make command, but . launch-game.sh kills the terminal. I'll open a new issue. I suggest making sure that launch-game.sh does not kill the terminal, so that one can see the warning about mono

Mailaender commented 3 years ago

I guess you are suffering from this problem https://github.com/OpenRA/OpenRA/pull/18375.

aless80 commented 3 years ago

I guess you are suffering from this problem OpenRA/OpenRA#18375.

I'm not sure, if I am not mistaken here you see that I am using python2.

>python -V
Python 2.7.17

>sudo update-alternatives --config python
[sudo] password for amarin:       
There are 2 choices for the alternative python (providing /usr/bin/python).

  Selection    Path              Priority   Status
------------------------------------------------------------
* 0            /usr/bin/python2   2         auto mode
  1            /usr/bin/python2   2         manual mode
  2            /usr/bin/python3   1         manual mode

Press <enter> to keep the current choice[*], or type selection number:

I am now trying the Installing the content manually section, though I will have to understand what game files are needed (the links seem to lead nowhere)

Mailaender commented 3 years ago

Please check if this change fixes it for you: https://github.com/OpenRA/OpenRAModSDK/pull/167

aless80 commented 3 years ago

Please check if this change fixes it for you: OpenRA/OpenRAModSDK#167

I am trying this change. First though, I change all exit 1 to return otherwise the terrminal gets killed (is this worth a new change?). I also add set -xv for troubleshooting.

>. launch-game.sh 
++ command -v mono
++ command -v python3
+++ python3 -c 'import os; print(os.path.realpath('\''bash'\''))'
++ TEMPLATE_LAUNCHER=/home/amarin/ra2/bash
+++ dirname /home/amarin/ra2/bash
++ TEMPLATE_ROOT=/home/amarin/ra2
++ MOD_SEARCH_PATHS=/home/amarin/ra2/mods,./mods
++ . /home/amarin/ra2/mod.config
+++ MOD_ID=ra2
+++ ENGINE_VERSION=release-20200202
+++ WHITELISTED_MOD_ASSEMBLIES=OpenRA.Mods.RA2.dll
+++ TRAVIS_TEST_MOD=True
+++ TRAVIS_TEST_PACKAGING=False
+++ PACKAGING_INSTALLER_NAME=RA2Mod
+++ PACKAGING_DISPLAY_NAME='Red Alert 2 Mod'
+++ PACKAGING_WEBSITE_URL=http://openra.net
+++ PACKAGING_FAQ_URL=http://wiki.openra.net/FAQ
+++ PACKAGING_AUTHORS='The Red Alert 2 Mod authors'
+++ PACKAGING_OSX_LAUNCHER_TAG=osx-launcher-20200209
+++ PACKAGING_OSX_DMG_MOD_ICON_POSITION='190, 210'
+++ PACKAGING_OSX_DMG_APPLICATION_ICON_POSITION='410, 210'
+++ PACKAGING_OSX_DMG_HIDDEN_ICON_POSITION='190, 350'
+++ PACKAGING_WINDOWS_LAUNCHER_NAME=RA2Mod
+++ PACKAGING_WINDOWS_INSTALL_DIR_NAME='OpenRA Red Alert 2 Mod'
+++ PACKAGING_WINDOWS_REGISTRY_KEY=OpenRARA2Mod
+++ PACKAGING_WINDOWS_LICENSE_FILE=./LICENSE
+++ PACKAGING_APPIMAGE_DEPENDENCIES_TAG=20200222
+++ PACKAGING_COPY_ENGINE_FILES=./mods/modcontent
+++ PACKAGING_OVERWRITE_MOD_VERSION=False
+++ AUTOMATIC_ENGINE_MANAGEMENT=True
+++ AUTOMATIC_ENGINE_SOURCE=https://github.com/OpenRA/OpenRA/archive/release-20200202.zip
+++ AUTOMATIC_ENGINE_EXTRACT_DIRECTORY=./engine_temp
+++ AUTOMATIC_ENGINE_TEMP_ARCHIVE_NAME=engine.zip
+++ ENGINE_DIRECTORY=./engine
+++ PACKAGING_OSX_LAUNCHER_SOURCE=https://github.com/OpenRA/OpenRALauncherOSX/releases/download/osx-launcher-20200209/launcher.zip
+++ PACKAGING_OSX_LAUNCHER_TEMP_ARCHIVE_NAME=launcher.zip
+++ PACKAGING_APPIMAGE_DEPENDENCIES_SOURCE=https://github.com/OpenRA/AppImageSupport/releases/download/20200222/libs.tar.bz2
+++ PACKAGING_APPIMAGE_DEPENDENCIES_TEMP_ARCHIVE_NAME=libs.tar.bz2
+++ WHITELISTED_OPENRA_ASSEMBLIES='OpenRA.Game.exe OpenRA.Utility.exe OpenRA.Platforms.Default.dll OpenRA.Mods.Common.dll OpenRA.Mods.Cnc.dll OpenRA.Game.dll'
+++ WHITELISTED_THIRDPARTY_ASSEMBLIES='ICSharpCode.SharpZipLib.dll FuzzyLogicLibrary.dll MaxMind.Db.dll Eluant.dll rix0rrr.BeaconLib.dll Open.Nat.dll SDL2-CS.dll OpenAL-CS.dll'
+++ WHITELISTED_CORE_ASSEMBLIES='mscorlib.dll System.dll System.Configuration.dll System.Core.dll System.Numerics.dll System.Security.dll System.Xml.dll Mono.Security.dll'
++ '[' -f /home/amarin/ra2/user.config ']'
++ require_variables MOD_ID ENGINE_VERSION ENGINE_DIRECTORY
++ missing=
++ for i in "$@"
++ eval 'check=$MOD_ID'
+++ check=ra2
++ '[' -z ra2 ']'
++ for i in "$@"
++ eval 'check=$ENGINE_VERSION'
+++ check=release-20200202
++ '[' -z release-20200202 ']'
++ for i in "$@"
++ eval 'check=$ENGINE_DIRECTORY'
+++ check=./engine
++ '[' -z ./engine ']'
++ '[' '!' -z '' ']'
++ cd /home/amarin/ra2
++ '[' '!' -f ./engine/OpenRA.Game.exe ']'
++ echo 'Required engine files not found.'
Required engine files not found.
++ echo 'Run `make` in the mod directory to fetch and build the required files, then try again.'
Run `make` in the mod directory to fetch and build the required files, then try again.
++ return
++ echo -ne '\033]0;ra2\007'

The problem seems to be that I have to install the mods with make. That is not working though


cd /home/amarin/ra2/mods
amarin> make
make: *** No targets specified and no makefile found.  Stop.
amarin> ls
ra2/
amarin> cd ../mods
amarin> make
make: *** No targets specified and no makefile found.  Stop.
amarin> cd /home/amarin/ra2
amarin> find . -name mods
./engine/mods
./mods
amarin> cd engine/mods/
amarin> make
make: *** No targets specified and no makefile found.  Stop.
Mailaender commented 3 years ago

I assume you are double-clicking the launch-game.sh file, because it works just fine when you ./lauch-game.sh and errors occur. exit 1 is a valid way to quit an application on errors.

Mailaender commented 3 years ago

I think you make is still failing. Follow the instructions at https://github.com/OpenRA/ra2/wiki and post the result of that.

Mailaender commented 3 years ago

You don't have to install any mods and those directories also contain no source code to compile.

aless80 commented 3 years ago

Oh, I see. No, I was running lauch-game.sh from terminal using bash. Anyway, when I double click on it nothing seems to happen.

I am back to the Dependencies section of the wiki. In the Linux section the make dependencies, make all commands (No rule to make target 'dependencies'.) are not working, so I skip those. I installed the packages in the Debian/Ubuntu section. make is indeed failing:

..
make[1]: *** [cli-dependencies] Error 127
make[1]: Leaving directory '/home/amarin/ra2/engine'
Makefile:106: recipe for target 'engine-dependencies' failed
make: *** [engine-dependencies] Error 2
Mailaender commented 3 years ago

The engine in here is quite ancient. Try if https://github.com/OpenRA/ra2/pull/738 fixes it for you.

aless80 commented 3 years ago

is there a quick way to import those files with git?

Mailaender commented 3 years ago

I use https://cli.github.com/ for that nowadays.

aless80 commented 3 years ago

I tried gh pr checkout 738 but I get the same error:

>make
...
Fetching rix0rrr.BeaconLib from NuGet.
/bin/sh: 1: msbuild: not found
Makefile:172: recipe for target 'cli-dependencies' failed
make[1]: *** [cli-dependencies] Error 127
make[1]: Leaving directory '/home/amarin/ra2_738/engine'
Makefile:106: recipe for target 'engine-dependencies' failed
make: *** [engine-dependencies] Error 2
abcdefg30 commented 3 years ago

msbuild missing could hint towards a similar issue as OpenRA/OpenRA#16615?

Mailaender commented 3 years ago

No, my first comment was just ignored https://github.com/OpenRA/ra2/issues/749#issuecomment-703070583. Linux Mint is practically Ubuntu.

aless80 commented 3 years ago

I think I solved this problem, but not using Mono as indicated in the wiki.

I googled a bit and for what I understood Mono uses xbuild instead of msbuild. I tried to use xbuild instead of ms (by creating a link in /usr/bin), but xbuild throws a >>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<< Next I did: sudo apt-get install msbuild and I can compile and launch the program

> msbuild
Microsoft (R) Build Engine version 16.6.0 for Mono

Thank you for your help