Opened 16 months ago

Last modified 16 months ago

#66599 assigned enhancement

irrlichtmt GLES & minetest

Reported by: Zweihorn (@Zweihorn) Owned by: Zweihorn (@Zweihorn)
Priority: Normal Milestone:
Component: ports Version: 2.8.0
Keywords: x86_64 Cc: l2dy (Zero King), reneeotten (Renee Otten)
Port: irrlichtmt

Description

irrlichtmt GLES support needed for "minetest" enhancement or improvement

There was the claim that "minetest" would depend on "mesa" and thus the need to re-introduce the "port:mesa" dependency to the new Portfile. However, this claim seems quite debatable.

The Minetest Core upstream README provides info on GLES such as: "ENABLE_GLES=OFF - Enable extra support code for OpenGL ES (requires support by IrrlichtMt)" See at: <https://github.com/minetest/minetest#cmake-options>

IMO either the "port:mesa" dependency will again be dropped in new PR for next revision or we find some proof for a.m. claim and/or could improve both "minetest" and "irrlichtmt" with true GLES support, if possible. The latter improve most preferable, I presume.

I became the new "minetest" maintainer. Hurray. I am a little lost and cannot find any reasonable use case for GLES and need support from "irrlichtmt" maintainer please.

For test purposes I specifically introduced the CMake option "-DENABLE_GLES=ON" to the "minetest" Portfile and made a complete build & install to no avail.

The config log shows no use or check of GLES although "-DENABLE_GLES=ON" is used with "cmake". IMO the comparison of "minetest" binaries between build without and with "mesa" dep shows no difference at all and in particular nothing of the claimed "mesa" dependency.

How to proceed? Any advice?

NB - I could just ignore this and have "mesa" being continued as useless dependency, but this would look unprofessional to me and I instead would like to improve & learn from this.

Please find the test "minetest" config log as follows:

--->  Configuring minetest
Executing:  cd "/opt/local/var/macports/build/_private_var_tmp_devtest_minetest/minetest/work/build" && /opt/local/bin/cmake -G "CodeBlocks - Unix Makefi
les" -DCMAKE_BUILD_TYPE=MacPorts -DCMAKE_INSTALL_PREFIX="/opt/local" -DCMAKE_INSTALL_NAME_DIR="/opt/local/lib" -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/us
r" -DCMAKE_C_COMPILER="$CC" -DCMAKE_CXX_COMPILER="$CXX" -DCMAKE_OBJC_COMPILER="$CC" -DCMAKE_OBJCXX_COMPILER="$CXX" -DCMAKE_POLICY_DEFAULT_CMP0025=NEW -DC
MAKE_POLICY_DEFAULT_CMP0060=NEW -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCM
AKE_MAKE_PROGRAM=/usr/bin/make -DCMAKE_MODULE_PATH="/opt/local/share/cmake/Modules" -DCMAKE_PREFIX_PATH="/opt/local/share/cmake/Modules" -DCMAKE_BUILD_WI
TH_INSTALL_RPATH:BOOL=ON -DCMAKE_INSTALL_RPATH="/opt/local/lib" -Wno-dev -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX:PATH=/Applications/MacPorts -D
BUILD_UNITTESTS=OFF -DENABLE_UPDATE_CHECKER=OFF -DBUILD_CLIENT=ON -DBUILD_SERVER=ON -DENABLE_SOUND=ON -DENABLE_REDIS=OFF -DENABLE_POSTGRESQL=OFF -DENABLE
_LEVELDB=ON -DENABLE_FREETYPE=ON -DENABLE_CURL=ON -DENABLE_GETTEXT=ON -DENABLE_GLES=ON -DENABLE_SPATIAL=ON -DENABLE_SYSTEM_GMP=ON -DENABLE_SYSTEM_JSONCPP
=ON -DCURSES_INCLUDE_PATH:FILEPATH=/opt/local/include -DENABLE_LUAJIT=ON -DLUA_INCLUDE_DIR:PATH=/opt/local/include/luajit-2.1 -DLUA_LIBRARY:FILEPATH=/opt
/local/lib/libluajit-5.1.dylib -DVERSION_EXTRA=MacPorts-rev1 -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="11.0" -DCMAKE_OSX_SYSROOT=
"/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk" /opt/local/var/macports/build/_private_var_tmp_devtest_minetest/minetest/work/minetest-5.6.1 
-- The C compiler identification is AppleClang 13.0.0.13000029
-- The CXX compiler identification is AppleClang 13.0.0.13000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- *** Will build version 5.6.1-MacPorts-rev1 ***
-- Found IrrlichtMt 1.9.0.8
-- Using GMP provided by system.
-- Found GMP: /opt/local/lib/libgmp.dylib  
-- Using JsonCpp provided by system.
-- Found Json: /opt/local/lib/libjsoncpp.dylib  
-- Found LuaJIT: /opt/local/lib/libluajit-5.1.dylib  
-- Using LuaJIT provided by system.
-- Found CURL: /opt/local/lib/libcurl.dylib  
-- cURL support enabled.
-- Found GettextLib: /opt/local/include  
-- GetText enabled; locales found: ar;be;bg;ca;cs;da;de;dv;el;eo;es;et;eu;fi;fil;fr;gd;gl;he;hi;hu;id;it;ja;jbo;kk;kn;ko;ky;lt;lv;lzh;mr;ms;ms_Arab;nb;nl
;nn;oc;pl;pt;pt_BR;ro;ru;sk;sl;sr_Cyrl;sr_Latn;sv;sw;th;tr;tt;uk;vi;yue;zh_CN;zh_TW
-- Found OpenAL: /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk/System/Library/Frameworks/OpenAL.framework  
-- Found Vorbis: /opt/local/include  
-- Sound enabled.
-- Found Freetype: /opt/local/lib/libfreetype.dylib (found version "2.12.1") 
-- Looking for cbreak in /opt/local/lib/libncursesw.dylib
-- Looking for cbreak in /opt/local/lib/libncursesw.dylib - found
-- Found Ncursesw: /opt/local/lib/libncursesw.dylib  
-- ncurses console enabled.
-- LevelDB backend enabled.
-- Found SQLite3: /opt/local/lib/libsqlite3.dylib  
-- Prometheus client disabled.
-- SpatialIndex AreaStore backend enabled.
-- Found ZLIB: /opt/local/lib/libz.dylib (found version "1.2.13") 
-- Looking for ZSTD_initCStream
-- Looking for ZSTD_initCStream - found
-- Found Zstd: /opt/local/lib/libzstd.dylib  
-- Looking for include file endian.h
-- Looking for include file endian.h - not found
-- Locale blacklist applied; Locales used: be;bg;ca;cs;da;de;el;eo;es;et;eu;fi;fil;fr;gd;gl;hu;id;it;ja;jbo;kk;ko;ky;lt;lv;lzh;mr;ms;nb;nl;nn;oc;pl;pt;pt_BR;ro;ru;sk;sl;sr_Cyrl;sr_Latn;sv;sw;tr;tt;uk;vi;yue;zh_CN;zh_TW
-- Found Doxygen: /opt/local/bin/doxygen (found version "1.9.3") found components: doxygen missing components: dot
-- Configuring done

Please find the "minetest" binary check result as follows:

% otool -L minetest
minetest:
	/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.13)
	/opt/local/lib/libIrrlichtMt.1.9.0.8.dylib (compatibility version 0.0.0, current version 1.9.0)
	/opt/local/lib/libzstd.1.dylib (compatibility version 1.0.0, current version 1.5.2)
	/System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL (compatibility version 1.0.0, current version 1.0.0)
	/opt/local/lib/libvorbisfile.3.dylib (compatibility version 7.0.0, current version 7.8.0)
	/opt/local/lib/libvorbis.0.dylib (compatibility version 5.0.0, current version 5.9.0)
	/opt/local/lib/libogg.0.dylib (compatibility version 9.0.0, current version 9.5.0)
	/opt/local/lib/libsqlite3.0.dylib (compatibility version 9.0.0, current version 9.6.0)
	/opt/local/lib/libluajit-5.1.2.dylib (compatibility version 2.1.0, current version 2.1.0)
	/opt/local/lib/libgmp.10.dylib (compatibility version 15.0.0, current version 15.1.0)
	/opt/local/lib/libjsoncpp.25.dylib (compatibility version 25.0.0, current version 1.9.5)
	/opt/local/lib/libfreetype.6.dylib (compatibility version 25.0.0, current version 25.3.0)
	/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1775.118.101)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1292.100.5)
	/opt/local/lib/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.0)
	/opt/local/lib/libcurl.4.dylib (compatibility version 13.0.0, current version 13.0.0)
	/opt/local/lib/libncurses.6.dylib (compatibility version 6.0.0, current version 6.0.0)
	/opt/local/lib/libform.6.dylib (compatibility version 6.0.0, current version 6.0.0)
	/opt/local/lib/libleveldb.1.dylib (compatibility version 0.0.0, current version 0.0.0)
	/opt/local/lib/libspatialindex.6.dylib (compatibility version 6.0.0, current version 6.1.1)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 905.6.0)

Change History (8)

comment:1 Changed 16 months ago by Zweihorn (@Zweihorn)

NB - Happy New Year (at least for the Western calendar)

comment:2 Changed 16 months ago by l2dy (Zero King)

See https://github.com/minetest/minetest/blob/5.6.1/src/CMakeLists.txt#L101-L103 and https://github.com/minetest/minetest/blob/5.6.1/src/cmake_config.h.in#L31. It does not introduce any new dependency in minetest. You can check if it's enabled in the generated cmake_config.h.

comment:3 Changed 16 months ago by Zweihorn (@Zweihorn)

IMO the "port:mesa" will be dropped.

AFAIK the enabled GLES results in a no-op (as mentioned above in this thread) or do I go wrong?

THX

  • - -

Found (again) no dependency of "minetest" for "mesa"

% port dependent mesa

gtk3 depends on mesa

Found just "#define ENABLE_GLES 1" and nothing new and no true dependency.

% cat cmake_config.h

// Filled in by the build system

#pragma once

#define PROJECT_NAME "minetest"
#define PROJECT_NAME_C "Minetest"
#define VERSION_MAJOR 5
#define VERSION_MINOR 6
#define VERSION_PATCH 1
#define VERSION_EXTRA "MacPorts-rev1"
#define VERSION_STRING "5.6.1-MacPorts-rev1"
#define PRODUCT_VERSION_STRING "5.6"
#define STATIC_SHAREDIR "minetest.app/Contents/Resources"
#define STATIC_LOCALEDIR "minetest.app/Contents/Resources/locale"
#define BUILD_TYPE "Release"
#define ICON_DIR ""
#define RUN_IN_PLACE 0
#define DEVELOPMENT_BUILD 0
#define ENABLE_UPDATE_CHECKER 0
#define USE_GETTEXT 1
#define USE_CURL 1
#define USE_SOUND 1
#define USE_CURSES 1
#define USE_LEVELDB 1
#define USE_LUAJIT 1
#define USE_POSTGRESQL 0
#define USE_PROMETHEUS 0
#define USE_SPATIAL 1
#define USE_SYSTEM_GMP 1
#define USE_REDIS 0
#define ENABLE_GLES 1
#define HAVE_ENDIAN_H 0
#define CURSES_HAVE_CURSES_H 1
#define CURSES_HAVE_NCURSES_H 1
#define CURSES_HAVE_NCURSES_NCURSES_H 0
#define CURSES_HAVE_NCURSES_CURSES_H 0
#define CURSES_HAVE_NCURSESW_NCURSES_H 0
#define CURSES_HAVE_NCURSESW_CURSES_H 0
#define BUILD_UNITTESTS 0
#define BUILD_BENCHMARKS 0

the search:

% find /System/Volumes/Data/opt/local/var/macports/build/_private_var_tmp_devtest_minetest/minetest/work/ -name "cmake_config*" -print

/System/Volumes/Data/opt/local/var/macports/build/_private_var_tmp_devtest_minetest/minetest/work//minetest-5.6.1/src/cmake_config_githash.h.in
/System/Volumes/Data/opt/local/var/macports/build/_private_var_tmp_devtest_minetest/minetest/work//minetest-5.6.1/src/cmake_config.h.in
/System/Volumes/Data/opt/local/var/macports/build/_private_var_tmp_devtest_minetest/minetest/work//build/src/cmake_config.h

comment:4 Changed 16 months ago by Zweihorn (@Zweihorn)

IMO "mesa" cannot be dropped (yet? OR never?) due to upstream IrrLicht 1.9.0mt9 only recently (2022-12-29)

That is quite funny and have a look at:

C'est la vie.

comment:5 in reply to:  3 ; Changed 16 months ago by l2dy (Zero King)

Replying to Zweihorn:

IMO the "port:mesa" will be dropped.

I'm not familiar with that part, but it's a build-time dependency (depends_build). If the port builds without mesa, you could drop it.

AFAIK the enabled GLES results in a no-op (as mentioned above in this thread) or do I go wrong?

No, it will enable several #if ENABLE_GLES blocks in code: https://github.com/minetest/minetest/search?q=ENABLE_GLES.

comment:6 in reply to:  5 Changed 16 months ago by Zweihorn (@Zweihorn)

THX

Thus I will :

  1. Make a "minetest" variant for optional support of ENABLE_GLES
  2. Make this new variant the default

Replying to l2dy:

Replying to Zweihorn:

IMO the "port:mesa" will be dropped.

I'm not familiar with that part, but it's a build-time dependency (depends_build). If the port builds without mesa, you could drop it.

AFAIK the enabled GLES results in a no-op (as mentioned above in this thread) or do I go wrong?

No, it will enable several #if ENABLE_GLES blocks in code: https://github.com/minetest/minetest/search?q=ENABLE_GLES.

@l2dy - Excellent advice. You are a very good teacher and very kind.

comment:7 Changed 16 months ago by Zweihorn (@Zweihorn)

Owner: set to Zweihorn
Status: newassigned

self assigned

comment:8 Changed 16 months ago by Zweihorn (@Zweihorn)

Last edited 16 months ago by Zweihorn (@Zweihorn) (previous) (diff)
Note: See TracTickets for help on using tickets.