Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Krom is linked against Glibc 2.36. Ubuntu 22.04 LTS comes with Glibc 2.35 #2980

Open
vmitro opened this issue Dec 11, 2023 · 3 comments
Open
Labels
bug This issue describes a bug

Comments

@vmitro
Copy link

vmitro commented Dec 11, 2023

Not a bug per se, but nevertheless annoying.

Description
The newest Armory SDK (2023.12) comes with the Krom player linked against Glibc 2.36. This makes it impossible to run on a Ubuntu 22.04 LTS which comes with Glibc 2.35. The error:

Read prefs: "/home/sheemeh/.config/blender/3.6/config/userpref.blend"
Running Armory SDK from /home/sheemeh/armsdk/
Read blend: "/home/sheemeh/armory_examples-22.06/logic_event_fromhaxe/logic_event_fromhaxe.blend"
Project updated to SDK v2023.12($Id: a37ffcb4d907facd1fac49da73140d27381e689a $)
Project cleaned
Using CPU for environment render (might be slow). If possible, configure GPU rendering in Blender preferences (System > Cycles Render Devices).
Saved: '/home/sheemeh/armory_examples-22.06/logic_event_fromhaxe/build_logic_event_fromhaxe/compiled/Assets/envmaps/env_World.jpg'
 Time: 00:00.15 (Saving: 00:00.02)

CMFT info: Converting latlong image to cubemap.
CMFT info: Saving spherical harmonics coefficients to /home/sheemeh/armory_examples-22.06/logic_event_fromhaxe/build_logic_event_fromhaxe/compiled/Assets/envmaps/env_World_irradiance.c
CMFT info: Done.
"/home/sheemeh/armsdk/lib/armory_tools/cmft/cmft-linux64" --input "/home/sheemeh/armory_examples-22.06/logic_event_fromhaxe/build_logic_event_fromhaxe/compiled/Assets/envmaps/env_World_radiance.jpg" --filter radiance --dstFaceSize 128.0 --srcFaceSize 128.0 --excludeBase false --glossScale 8 --glossBias 3 --lightingModel blinnbrdf --edgeFixup none --numCpuProcessingThreads 2 --useOpenCL true --clVendor anyGpuVendor --deviceType gpu --deviceIndex 0 --generateMipChain true --inputGammaNumerator 1.0 --inputGammaDenominator 1.0 --outputGammaNumerator 1.0 --outputGammaDenominator 1.0 --outputNum 1 --output0 "/home/sheemeh/armory_examples-22.06/logic_event_fromhaxe/build_logic_event_fromhaxe/compiled/Assets/envmaps/env_World_radiance" --output0params hdr,rgbe,latlong --silent
#512x256
#256x128
#128x64
#64x32
#32x16
#16x8
#8x4
#4x2
#2x1
#1x1
/home/sheemeh/armsdk/nodejs/node-linux64 /home/sheemeh/armsdk/Kha/make krom -g opengl --shaderversion 330 --parallelAssetConversion -1 --to build_logic_event_fromhaxe/debug --quiet
Finished in 11.502s
/home/sheemeh/armsdk/Krom/Krom /home/sheemeh/armory_examples-22.06/logic_event_fromhaxe/build_logic_event_fromhaxe/debug/krom /home/sheemeh/armory_examples-22.06/logic_event_fromhaxe/build_logic_event_fromhaxe/debug/krom-resources
/home/sheemeh/armsdk/Krom/Krom: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.36' not found (required by /home/sheemeh/armsdk/Krom/Krom)
WARNING: Player exited code 1

Running /lib/x86_64-linux-gnu/libc.so.6 outputs:

GNU C Library (Ubuntu GLIBC 2.35-0ubuntu3.5) stable release version 2.35.
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 11.4.0.
libc ABIs: UNIQUE IFUNC ABSOLUTE
For bug reporting instructions, please see:
<https://bugs.launchpad.net/ubuntu/+source/glibc/+bugs>.

To Reproduce

  1. Run Blender with the Armory Addon installed on an Ubuntu LTS system, 22.04
  2. Open an example .blend file
  3. Hit Play button

Expected behavior
The example plays successfully.

System
Blender: ./blender --version output:

Blender 3.6.5
	build date: 2023-10-18
	build time: 23:31:25
	build commit date: 2023-10-16
	build commit time: 14:30
	build hash: cf1e1ed46b7e
	build platform: Linux
	build type: release
	build c flags:  -Wall -Werror=implicit-function-declaration -Werror=return-type -Werror=vla -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wlogical-op -Wundef -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Wformat-signedness -Wrestrict -Wno-stringop-overread -Wno-stringop-overflow -Wnonnull -Wabsolute-value -Wuninitialized -Wredundant-decls -Wshadow -Wno-error=unused-but-set-variable -Wimplicit-fallthrough=5  -std=gnu11 -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -msse2  
	build c++ flags:  -Wuninitialized -Wredundant-decls -Wall -Wno-invalid-offsetof -Wno-sign-compare -Wlogical-op -Winit-self -Wmissing-include-dirs -Wno-div-by-zero -Wtype-limits -Werror=return-type -Wno-char-subscripts -Wno-unknown-pragmas -Wpointer-arith -Wunused-parameter -Wwrite-strings -Wundef -Wformat-signedness -Wrestrict -Wno-suggest-override -Wuninitialized -Wno-stringop-overread -Wno-stringop-overflow -Wundef -Wmissing-declarations -Wimplicit-fallthrough=5  -msse -pipe -fPIC -funsigned-char -fno-strict-aliasing -ffp-contract=off -msse2  
	build link flags:  -Wl,--version-script='/home/blender/git/blender-v360/blender.git/source/creator/symbols_unix.map'
	build system: CMake

Armory: v2023.12($Id: a37ffcb4d907facd1fac49da73140d27381e689a $)
OS: $ uname -a output:

Linux emptyspace 6.2.0-37-generic #38~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Thu Nov  2 18:01:13 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

Graphics card: lspci | grep VGA output:

00:02.0 VGA compatible controller: Intel Corporation HD Graphics 5500 (rev 09)

Test File
armory_examples-22.06.zip/logic_event_fromhaxe/logic_event_fromhaxe.blend

P.S. I successfully built the Krom player from the armocore repo, although it needed a few -dev packages I was missing on my system. I have renamed the output binary in ./Deployment directory, Armory, to Krom and replaced the one in Armory SDK. The latest commit built fails with the following error:

Using OpenGL version 4.6 (forward-compatible).
Trace: TypeError: Krom.createFragmentShader is not a function
    at new kha_graphics4_FragmentShader (<anonymous>:45931:23)
    at kha_Shaders.init (<anonymous>:27419:36)
    at kha_SystemImpl.init (<anonymous>:28006:15)
    at kha_System.start (<anonymous>:27686:18)
    at start (<anonymous>:2866:15)
    at armory_system_Starter.main (<anonymous>:2876:3)
    at Main.main (<anonymous>:79:25)
    at <anonymous>:51545:6
    at <anonymous>:51546:3

#
# Fatal error in v8::Function::Call
# Function to be called is a null pointer
#

and the one suggested by @MoritzBrueckner in armocore issue #71 (91203c36994a770de878aa234aec7f52f46aff1a):

Using OpenGL version 4.6 (forward-compatible).
Trace: TypeError: Krom.setAudioCallback is not a function
    at kha_SystemImpl.init (<anonymous>:28038:8)
    at kha_System.start (<anonymous>:27686:18)
    at start (<anonymous>:2866:15)
    at armory_system_Starter.main (<anonymous>:2876:3)
    at Main.main (<anonymous>:79:25)
    at <anonymous>:51545:6
    at <anonymous>:51546:3

Using LD_PRELOAD trick on a compiled glibc somewhere in /opt/ could work, but the amount of libs needed to manually list is ridiculously large. Chrooting Armory with a custom glibc could also work, but also too much hassle. I don't feel comfortable at just installing this compiled version over the system one. Distro upgrade is also not really an option.

tl;dr: which armorcore commit should one build in order to have a Krom that links against one's system glibc?

@vmitro vmitro added the bug This issue describes a bug label Dec 11, 2023
@MoritzBrueckner
Copy link
Collaborator

tl;dr: which armorcore commit should one build in order to have a Krom that links against one's system glibc?

Hi, I sadly can't help you with glibc, but I believe the last working version for Armory is armory3d/armorcore@93b696f (at least it still works for me). In the linked issue, I didn't used "apply" to say "check out the repository at this commit", but rather to say "apply the changes from this commit (only) on top of your current repository state". Sorry about the misunderstanding :)

@luboslenco
Copy link
Member

Hey, at the https://github.com/armory3d/armorcore/tree/armsdk branch:

  • Krom.createFragmentShader is not a function is resolved
  • Not enough memory on image.c Buffer is resolved
  • Still need to look into Krom.setAudioCallback is not a function

It is also stripped out of stuff that is not needed for Armory so it should be a little cleaner.

@e2002e
Copy link
Contributor

e2002e commented Jan 4, 2024

@vmitro
On debian 12 you can add this to your sources.list
deb https://deb.debian.org/debian experimental main
Then do apt -t experimental install libc6
It will work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue describes a bug
Projects
None yet
Development

No branches or pull requests

4 participants