BlindMindStudios / StarRuler2-Source

4X Space Strategy game Star Ruler 2's open source distribution.
http://starruler2.com
Other
1.45k stars 244 forks source link

Comprehesive List of dependancies for linux #34

Open se5a opened 5 years ago

se5a commented 5 years ago

here's a list of dependencies I needed to install for Linux Mint 18.3 so far:

Libpng: Errors indicating you don' have these:

error: cannot convert ‘unsigned int*’ to ‘png_uint_32* {aka long unsigned int*}’ for argument ‘3’ to ‘png_uint_32 png_get_IHDR(png_structp, png_infop, png_uint_32*, png_uint_32*, int*, int*, int*, int*, int*)’
 t_IHDR(png, png_info, &w, &h, &depth, &format, &interlace, &compress, &filter); 

apt-get install
libpng16-16
libpng16-dev
libpng16-devtools

Freetype:
Errors:

make: *** No rule to make target '/usr/include/freetype2/freetype/freetype.h', needed by 'obj/lin64/render/font_ft2.o'. Stop. 

apt-get install
libfreetype6-dev
libfontconfig1-dev
libxft2-dev

Others as people point them out, I'm still getting errors.

se5a commented 5 years ago

currently getting this now, not sure if it's a dependancy issue or...

...

../../source/as_builder.cpp: In member function ‘asCObjectType* asCBuilder::GetObjectType(const char*, asSNameSpace*)’:
../../source/as_builder.cpp:5676:2: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
  auto* typeInfo = GetType(type, ns, 0);
  ^
../../source/as_builder.cpp:5676:8: error: ISO C++ forbids declaration of ‘typeInfo’ with no type [-fpermissive]
  auto* typeInfo = GetType(type, ns, 0);
        ^
../../source/as_builder.cpp:5676:38: error: cannot convert ‘asCTypeInfo*’ to ‘int*’ in initialization
  auto* typeInfo = GetType(type, ns, 0);
                                      ^
../../source/as_builder.cpp:5678:10: error: ‘nullptr’ was not declared in this scope
   return nullptr;
          ^
../../source/as_builder.cpp:5679:19: error: request for member ‘CastToObjectType’ in ‘* typeInfo’, which is of non-class type ‘int’
  return typeInfo->CastToObjectType();
                   ^
g++ -m64 -march=athlon64 -mtune=generic -Ofast -flto -Wall -fPIC -fno-strict-aliasing -o obj/as_datatype.o -c ../../source/as_datatype.cpp
makefile:127: recipe for target 'obj/as_builder.o' failed
make[1]: *** [obj/as_builder.o] Error 1
make[1]: *** Waiting for unfinished jobs....
../../source/as_compiler.cpp: In member function ‘asUINT asCCompiler::ImplicitConvObjectToPrimitive(asCExprContext*, const asCDataType&, asCScriptNode*, EImplicitConv, bool)’:
../../source/as_compiler.cpp:6158:2: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
  auto *typeInfo = ctx->type.dataType.GetTypeInfo();
  ^
../../source/as_compiler.cpp:6158:8: error: ISO C++ forbids declaration of ‘typeInfo’ with no type [-fpermissive]
  auto *typeInfo = ctx->type.dataType.GetTypeInfo();
        ^
../../source/as_compiler.cpp:6158:50: error: cannot convert ‘asCTypeInfo*’ to ‘int*’ in initialization
  auto *typeInfo = ctx->type.dataType.GetTypeInfo();
                                                  ^
../../source/as_compiler.cpp:6159:43: error: request for member ‘CastToObjectType’ in ‘* typeInfo’, which is of non-class type ‘int’
  asCObjectType *ot = typeInfo ? typeInfo->CastToObjectType() : 0;
                                           ^
../../source/as_compiler.cpp: In member function ‘asUINT asCCompiler::ImplicitConvObjectValue(asCExprContext*, const asCDataType&, asCScriptNode*, EImplicitConv, bool)’:
../../source/as_compiler.cpp:6471:3: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
   auto* typeInfo =ctx->type.dataType.GetTypeInfo();
   ^
../../source/as_compiler.cpp:6471:9: error: ISO C++ forbids declaration of ‘typeInfo’ with no type [-fpermissive]
   auto* typeInfo =ctx->type.dataType.GetTypeInfo();
         ^
../../source/as_compiler.cpp:6471:50: error: cannot convert ‘asCTypeInfo*’ to ‘int*’ in initialization
   auto* typeInfo =ctx->type.dataType.GetTypeInfo();
                                                  ^
../../source/as_compiler.cpp:6472:44: error: request for member ‘CastToObjectType’ in ‘* typeInfo’, which is of non-class type ‘int’
   asCObjectType *ot = typeInfo ? typeInfo->CastToObjectType() : 0;
                                            ^
makefile:127: recipe for target 'obj/as_compiler.o' failed
make[1]: *** [obj/as_compiler.o] Error 1
make[1]: Leaving directory '/mnt/98448323-4372-4c8a-904a-30b587cc3685/Games/StarRuler2-Source-master/source/angelscript/projects/gnuc'
cp: cannot stat 'source/angelscript/lib/libangelscript.a': No such file or directory
source/linux/Makefile:353: recipe for target 'obj/lin64/libangelscript.a' failed
make: *** [obj/lin64/libangelscript.a] Error 1
Rewarp commented 5 years ago

I am adding the following dependencies that also need to be installed in openSUSE Tumbleweed in addition to the ones mentioned in the readme file due to the following errors.

CMake Error at CMakeLists.txt:203 (message): The XInput library and headers were not found

Install xorg-x11-devel

/usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: cannot find -lopenal

Install openal-soft-devel

kwll01 commented 5 years ago

currently getting this now, not sure if it's a dependancy issue or...

...

../../source/as_builder.cpp: In member function ‘asCObjectType* asCBuilder::GetObjectType(const char*, asSNameSpace*)’:
../../source/as_builder.cpp:5676:2: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
  auto* typeInfo = GetType(type, ns, 0);
  ^
../../source/as_builder.cpp:5676:8: error: ISO C++ forbids declaration of ‘typeInfo’ with no type [-fpermissive]
  auto* typeInfo = GetType(type, ns, 0);
        ^
../../source/as_builder.cpp:5676:38: error: cannot convert ‘asCTypeInfo*’ to ‘int*’ in initialization
  auto* typeInfo = GetType(type, ns, 0);
                                      ^
../../source/as_builder.cpp:5678:10: error: ‘nullptr’ was not declared in this scope
   return nullptr;
          ^
../../source/as_builder.cpp:5679:19: error: request for member ‘CastToObjectType’ in ‘* typeInfo’, which is of non-class type ‘int’
  return typeInfo->CastToObjectType();
                   ^
g++ -m64 -march=athlon64 -mtune=generic -Ofast -flto -Wall -fPIC -fno-strict-aliasing -o obj/as_datatype.o -c ../../source/as_datatype.cpp
makefile:127: recipe for target 'obj/as_builder.o' failed
make[1]: *** [obj/as_builder.o] Error 1
make[1]: *** Waiting for unfinished jobs....
../../source/as_compiler.cpp: In member function ‘asUINT asCCompiler::ImplicitConvObjectToPrimitive(asCExprContext*, const asCDataType&, asCScriptNode*, EImplicitConv, bool)’:
../../source/as_compiler.cpp:6158:2: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
  auto *typeInfo = ctx->type.dataType.GetTypeInfo();
  ^
../../source/as_compiler.cpp:6158:8: error: ISO C++ forbids declaration of ‘typeInfo’ with no type [-fpermissive]
  auto *typeInfo = ctx->type.dataType.GetTypeInfo();
        ^
../../source/as_compiler.cpp:6158:50: error: cannot convert ‘asCTypeInfo*’ to ‘int*’ in initialization
  auto *typeInfo = ctx->type.dataType.GetTypeInfo();
                                                  ^
../../source/as_compiler.cpp:6159:43: error: request for member ‘CastToObjectType’ in ‘* typeInfo’, which is of non-class type ‘int’
  asCObjectType *ot = typeInfo ? typeInfo->CastToObjectType() : 0;
                                           ^
../../source/as_compiler.cpp: In member function ‘asUINT asCCompiler::ImplicitConvObjectValue(asCExprContext*, const asCDataType&, asCScriptNode*, EImplicitConv, bool)’:
../../source/as_compiler.cpp:6471:3: warning: ‘auto’ changes meaning in C++11; please remove it [-Wc++0x-compat]
   auto* typeInfo =ctx->type.dataType.GetTypeInfo();
   ^
../../source/as_compiler.cpp:6471:9: error: ISO C++ forbids declaration of ‘typeInfo’ with no type [-fpermissive]
   auto* typeInfo =ctx->type.dataType.GetTypeInfo();
         ^
../../source/as_compiler.cpp:6471:50: error: cannot convert ‘asCTypeInfo*’ to ‘int*’ in initialization
   auto* typeInfo =ctx->type.dataType.GetTypeInfo();
                                                  ^
../../source/as_compiler.cpp:6472:44: error: request for member ‘CastToObjectType’ in ‘* typeInfo’, which is of non-class type ‘int’
   asCObjectType *ot = typeInfo ? typeInfo->CastToObjectType() : 0;
                                            ^
makefile:127: recipe for target 'obj/as_compiler.o' failed
make[1]: *** [obj/as_compiler.o] Error 1
make[1]: Leaving directory '/mnt/98448323-4372-4c8a-904a-30b587cc3685/Games/StarRuler2-Source-master/source/angelscript/projects/gnuc'
cp: cannot stat 'source/angelscript/lib/libangelscript.a': No such file or directory
source/linux/Makefile:353: recipe for target 'obj/lin64/libangelscript.a' failed
make: *** [obj/lin64/libangelscript.a] Error 1

I am having the exact same error right now. Were you able to track the issue?

se5a commented 5 years ago

No, I never managed to figure it out and the whole thing ended up in the "too hard basket". I've also moved onto mint 19 now and so it's a bunch of different errors.

Dependency issues and trying to find out exactly what one needs to get is something that is starting to frustrate me with linux, I'm finding I have less and less appetite for trying to figure these sorts of problems.

lucyllewy commented 5 years ago

Compiling software from source code is not easy. If you were to try compiling this on any other operating system you will face the same dependency issues you have been struggling with on your Linux distribution. I'd hate for you to feel that compiling software causes you to conclude that using Linux is a difficult minefield because it need not be that way.

Luckily most distributions provide most software, that the upstream project distributes in source code form, precompiled in the distro's software repositories. For applications that aren't available freely, they can often be found in snap packages, flatpaks, or appimages for easy installation on any Linux-based system. You might even find that kind folk in the community are also maintaining such packages for software as I do with a Snap of StarRuler2. On Ubuntu systems, you can install it directly from the Software Centre, and on other systems that support snap packages, it can be installed using the command line or possibly their own software centres if they support showing snaps in them.

Using the command line:

sudo snap install starruler2
kwll01 commented 5 years ago

I am really willing to take the effort and time to make this thing compile, but this error is really tricky. It seems that the addons for the AngelScript engine shipping with the Star Rule 2 code are failing to compile at all. Newer versions succeed, but break the API expected by the rest of the code. Not sure where to go from there.

What would be really helpful would be to have a list of the library versions and compiler version used to produce the Linux build. Is there somewhere where I can ask questions if I want to dig deeper into the code?

se5a commented 5 years ago

Sigh I know this is not really the place but it needs being said, Linux has problems, and until we admit that the problems actually exist, they'll never get fixed. counter:

Why is it so hard to get a list of dependencies that can be apt-get, Trying to guess what is needed to apt-get from the error message is painful, tedious, and time consuming, and you end up getting a bunch of stuff that you probably didn't really need.