Cannot compile master from github.

Added by kujaw 8 months ago

I get the error building ETLegacy using

./easybuild.sh

Linux version: 4.19.4-arch1-1-ARCH x86_64 GNU/Linux

...      
CC curl-tool_util.o
CC curl-tool_vms.o
CC curl-tool_writeout.o
CC curl-tool_xattr.o
CC ../lib/curl-strtoofft.o
CC ../lib/curl-nonblock.o
CC ../lib/curl-warnless.o
CC ../lib/curl-curl_ctype.o
CCLD curl
/usr/bin/ld: ../lib/.libs/libcurl.a(libcurl_la-version.o): in function `brotli_version’:
version.c:(.text+0x13): undefined reference to `BrotliDecoderVersion’
/usr/bin/ld: ../lib/.libs/libcurl.a(libcurl_la-version.o): in function `curl_version_info.part.1’:
version.c:(.text+0x10b): undefined reference to `BrotliDecoderVersion’
/usr/bin/ld: ../lib/.libs/libcurl.a(libcurl_la-content_encoding.o): in function `brotli_close_writer’:
content_encoding.c:(.text+0x120): undefined reference to `BrotliDecoderDestroyInstance’
/usr/bin/ld: ../lib/.libs/libcurl.a(libcurl_la-content_encoding.o): in function `brotli_init_writer’:
content_encoding.c:(.text+0x165): undefined reference to `BrotliDecoderCreateInstance’
/usr/bin/ld: ../lib/.libs/libcurl.a(libcurl_la-content_encoding.o): in function `brotli_unencode_write’:
content_encoding.c:(.text+0x687): undefined reference to `BrotliDecoderDecompressStream’
/usr/bin/ld: content_encoding.c:(.text+0x6d7): undefined reference to `BrotliDecoderDestroyInstance’
/usr/bin/ld: content_encoding.c:(.text+0x72f): undefined reference to `BrotliDecoderGetErrorCode’
collect2: error: ld returned 1 exit status
make[5]: * [Makefile:840: curl] Error 1
make[4]:
[Makefile:1878: all-recursive] Error 1
make[3]:
[Makefile:927: all-recursive] Error 1
make[2]:
[CMakeFiles/bundled_curl.dir/build.make:111: libs/curl/src/bundled_curl-stamp/bundled_curl-build] Error 2
make[1]:
[CMakeFiles/Makefile2:566: CMakeFiles/bundled_curl.dir/all] Error 2
make: *
[Makefile:152: all] Error 2
Exiting!

Any advice? Any library that I possibly don’t have?

[edit]
Updated necessary info.


Replies (23)

RE: Cannot compile from github. - Added by Ododo 8 months ago

Hello,

using my system’s lib32-curl worked for me, but i used "./easybuild.sh -systemlib" disabling all bundled dependancy
idk how to disable only one.

RE: Cannot compile from github. - Added by IR4T4 8 months ago

An info about used system and they way you compile would be more than nice!

As far as I can see Brotli is enabled in curl when brotli/decode.h is found. ETL doesn’t require it - set HAVE_BROTLI in curl to 0.

RE: Cannot compile from github. - Added by kujaw 2 months ago

I updated the first post. Please take a look.

RE: Cannot compile from github. - Added by IR4T4 2 months ago

HAVE_BROTLI in curl is 0 ?

RE: Cannot compile from github. - Added by kujaw 2 months ago

ok, with –without-brotli it goes deeper, but still not successful: https://pastebin.com/4WY1Zf22

RE: Cannot compile from github. - Added by IR4T4 2 months ago

Please use the exact part of 'if(BUNDLED_SDL AND BUILD_CLIENT)' from

https://github.com/etlegacy/etlegacy-libs/blob/e51c91f6f76624dc75ffe3733d00f11756e35252/CMakeLists.txt#L572 (our current etl libs are not in sync with master, there is already a tiny fix on top for opengGLES)

and add "-DVIDEO_KMSDR=OFF"

in line 590 or 591


Several libs (CURL, SDL ...) are trying to install extra features if they find the belonging libraries (for SDL see 'Wanted’ below).
But then also the headers are required and these are missing or are not found on your system.

SDL is configured this way on my system:

– VIDEO_DUMMY (Wanted: ON): ON
– VIDEO_KMSDRM (Wanted: ON): OFF
– VIDEO_MIR (Wanted: ON): OFF
– VIDEO_OPENGL (Wanted: ON): ON
– VIDEO_OPENGLES (Wanted: ON): OFF
– VIDEO_RPI (Wanted: ON): OFF
– VIDEO_VIVANTE (Wanted: ON): OFF
– VIDEO_VULKAN (Wanted: ON): OFF
– VIDEO_WAYLAND (Wanted: ON): OFF
– VIDEO_WAYLAND_QT_TOUCH (Wanted: ON): OFF
– VIDEO_X11 (Wanted: ON): ON
– VIDEO_X11_XCURSOR (Wanted: ON): ON
– VIDEO_X11_XINERAMA (Wanted: ON): ON
– VIDEO_X11_XINPUT (Wanted: ON): ON
– VIDEO_X11_XRANDR (Wanted: ON): ON
– VIDEO_X11_XSCRNSAVER (Wanted: ON): ON
– VIDEO_X11_XSHAPE (Wanted: ON): ON
– VIDEO_X11_XVM (Wanted: ON): ON
– WAYLAND_SHARED (Wanted: ON): OFF
– X11_SHARED (Wanted: ON): ON

RE: Cannot compile from github. - Added by IR4T4 2 months ago

... kind of interesting: my system has libdrm and the headers installed ....

RE: Cannot compile from github. - Added by kujaw 2 months ago

https://pastebin.com/0nwhZXs2

As I understood I should remove part of code in 'if(BUNDLED_SDL AND BUILD_CLIENT)' and paste the one that you linked, yes?
Where to get the info about sdl?
How to the info about SDL? There’s nothing like this in CMakeOutput.log.

RE: Cannot compile from github. - Added by IR4T4 2 months ago

Yes, change it. You are getting this info during compilation of SDL.

RE: Cannot compile from github. - Added by kujaw 2 months ago

ok, but I get this error after doing the above. Here’s my code: https://pastebin.com/GLczVzgH

RE: Cannot compile from github. - Added by IR4T4 2 months ago

which error?

RE: Cannot compile from github. - Added by IR4T4 2 months ago

  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 3.13)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".

We have this cmake_minimum_required function set to VERSION 3.3.2 in cMakeLists.txt of the main project (not the one you did edit in lib path)

What’s your cmake version?

RE: Cannot compile from github. - Added by kujaw 2 months ago

3.13.1, shouldn’t be ok?

RE: Cannot compile from github. - Added by IR4T4 2 months ago

Worst case - It should be ok ... but It seems there is a change in how to set target properties in newer cmake versions.

RE: Cannot compile from github. - Added by IR4T4 2 months ago

Not sure about if this is a bug now ...

https://pybullet.org/Bullet/phpBB3/viewtopic.php?t=6051

$ ./../easybuild.sh 

cd to your path and run ./easybuild.sh

RE: Cannot compile from github. - Added by kujaw about 1 month ago

K, after some delay I’m back to trying compiling this stuff.

https://pastebin.com/yPd23c1k

I can see in 'etlegacy/libs/sdl2/src/video/wayland/SDL_waylandopengles.h’:

#include "../../SDL_internal.h"

there’s an error in SDL_internal.h file:

In file included from <stdin>:21:
./../../SDL_internal.h:48:10: fatal error: 'SDL_config.h’ file not found
#include "SDL_config.h"
^~~~~~~~~~~~

I changed it to

#include "../include/SDL_config.h"

but it said:

Scanning dependencies of target SDL2-static
[ 5%] Building C object CMakeFiles/SDL2-static.dir/src/SDL.c.o
In file included from /home/kujaw/etlegacy/libs/sdl2/src/./SDL_internal.h:48,
from /home/kujaw/etlegacy/libs/sdl2/src/SDL.c:21:
/home/kujaw/etlegacy/libs/sdl2/src/./../include/SDL_config.h:50:2: error: #error Wrong SDL_config.h, check your include path?
#error Wrong SDL_config.h, check your include path?
^~~
make[5]: * [CMakeFiles/SDL2-static.dir/build.make:95: CMakeFiles/SDL2-static.dir/src/SDL.c.o] Error 1
make[4]:
[CMakeFiles/Makefile2:73: CMakeFiles/SDL2-static.dir/all] Error 2
make[3]:
[Makefile:130: all] Error 2
make[2]:
[CMakeFiles/bundled_sdl.dir/build.make:111: libs/sdl2/src/bundled_sdl-stamp/bundled_sdl-build] Error 2
make[1]:
[CMakeFiles/Makefile2:677: CMakeFiles/bundled_sdl.dir/all] Error 2
make: *
[Makefile:152: all] Error 2
Exiting!

RE: Cannot compile master from github. - Added by Spyhawk about 1 month ago

You shouldn’t need wayland support.
If you are using Arch Linux, check the etlegacy-git package in the AUR.

RE: Cannot compile master from github. - Added by kujaw 29 days ago

I shouldn’t but it need wayland, but the code yet complains about the file which is not there. I know about etlegacy-git, but I’d like to try to compile master from github.

RE: Cannot compile master from github. - Added by Spyhawk 29 days ago

etlegacy-git compiles from github.

RE: Cannot compile master from github. - Added by kujaw 29 days ago

But if I want to play a little bit with code I think I need source code and compile this code with my changes, isn’t it true?

RE: Cannot compile master from github. - Added by Spyhawk 29 days ago

Indeed. In that case, compile the code with system libs (-DBUNDLED_LIBS=0). You’ll get our latest code, while using the third party libs present on your system.
Note: it’s straightforward if you only need the 64bit version, but you’ll need to install the relevant 32bit libs if you want to connect any other mods other than Legacy (check the AUR package to see what you need).

(1-23/23)