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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悶 Bug starting google-chrome: /usr/local/lib64/libc.so.6: version `GLIBC_2.34' not found (required by /usr/local/lib64/libgbm.so.1) #9136

Open
AltoRetrato opened this issue Dec 31, 2023 · 7 comments

Comments

@AltoRetrato
Copy link

AltoRetrato commented Dec 31, 2023

First of all, I want to thank all the crew that worked on and contributed to Chromebrew! You are awesome! 馃槃

Describe the bug

I installed chromebrew and the Google Chrome browser (crew install chrome), but when I start it (google-chrome), it can't find GLIBC_2.34:
/usr/local/bin/google-chrome: /usr/local/lib64/libc.so.6: version `GLIBC_2.34' not found (required by /usr/local/lib64/libgbm.so.1)

Environment


Expand
  • Architecture: x86_64 (x86_64)

  • Processor vendor: GenuineIntel

  • User space: 64-bit

  • Chromebrew Kernel version: 4.19

  • Chromebrew Running in Container: false

  • Chromebrew version: 1.40.5

  • Chromebrew prefix: /usr/local

  • Chromebrew libdir: /usr/local/lib64

  • Last update in local repository: 04aae3d Telegram 4.13.0 => 4.13.1 (#9132) (2 days ago)

  • OS variant: Chrome OS

  • OS version: cyan-release/R103-14816.131.0

  • OS channel: stable-channel

***

Additional context
I could not find glibc 2.34 via crew. Output of crew search glibc:

glibc: The GNU C Library project provides the core libraries for GNU/Linux systems.
glibc_build223: The GNU C Library project provides the core libraries for GNU/Linux systems.
glibc_build227: The GNU C Library project provides the core libraries for GNU/Linux systems.
glibc_build232: The GNU C Library project provides the core libraries for GNU/Linux systems.
glibc_build233: The GNU C Library project provides the core libraries for GNU/Linux systems.
glibc_build235: The GNU C Library project provides the core libraries for GNU/Linux systems.
glibc_dev: glibc: everything except what is in glibc_lib
glibc_dev235: glibc: everything except what is in glibc_lib
glibc_lib: glibc libraries
glibc_lib235: glibc libraries

Do you know if it is possible to install and run the Google Chrome browser using crew?

Thank you in advance!

@AltoRetrato AltoRetrato changed the title 馃悶 Bug starting google-chrome: /usr/local/bin/google-chrome: /usr/local/lib64/libc.so.6: version `GLIBC_2.34' not found (required by /usr/local/lib64/libgbm.so.1) 馃悶 Bug starting google-chrome: /usr/local/lib64/libc.so.6: version `GLIBC_2.34' not found (required by /usr/local/lib64/libgbm.so.1) Dec 31, 2023
@supechicken
Copy link
Member

libgbm.so.1 is a part of mesa, maybe try building mesa from source:

crew reinstall -s mesa

@AltoRetrato
Copy link
Author

AltoRetrato commented Dec 31, 2023

crew reinstall -s mesa

Thanks for the reply!

There were issues compiling mesa (and it took quite a while to get there), so I tried to find something similar and potentially smaller. Using crew whatprovides libgbm, I found libminigbm, and its compilations fails right at the start:

libminigbm: Generic Buffer Management GBM implementation used in Chromium OS
Performing pre-flight checks...
Downloading source...
Initialized empty Git repository in /usr/local/tmp/crew/libminigbm.20231231191651.dir/.git/
From https://chromium.googlesource.com/chromiumos/platform/minigbm
 * branch            407eb0ebf3ce52fd4b3d79712d1b86d7b021c29b -> FETCH_HEAD
HEAD is now at 407eb0e Revert "minigbm/msm: Disable UBWC for video gtest"
Repository downloaded.
Building from source, this may take a while...
make: --cflags: No such file or directory
make: --libs: No such file or directory
cd "/usr/local/tmp/crew/libminigbm.20231231191651.dir/" && make -r -I "/usr/local/tmp/crew/libminigbm.20231231191651.dir" -f "/usr/local/tmp/crew/libminigbm.20231231191651.dir/Makefile" SRC="/usr/local/tmp/crew/libminigbm.20231231191651.dir" OUT="/usr/local/tmp/crew/libminigbm.20231231191651.dir/" "all"
make[1]: Entering directory '/usr/local/tmp/crew/libminigbm.20231231191651.dir'
build configuration:
- OUT=/usr/local/tmp/crew/libminigbm.20231231191651.dir/
- SRC=/usr/local/tmp/crew/libminigbm.20231231191651.dir
- MODE=opt
- SPLITDEBUG=0
- NOSTRIP=1
- VALGRIND=0
- COLOR=1
- CXXEXCEPTIONS=0
- ARCH=x86_64
- QEMU_ARCH=x86_64
- USE_QEMU=0
- NEEDS_ROOT=0
- NEEDS_MOUNTS=0
- SYSROOT=/

CC		amdgpu.c ->  amdgpu.pic.o
clang: error: argument unused during compilation: '-fuse-ld=mold' [-Werror,-Wunused-command-line-argument]
make[1]: *** [common.mk:593: amdgpu.pic.o] Error 1
make[1]: Leaving directory '/usr/local/tmp/crew/libminigbm.20231231191651.dir'
make: *** [common.mk:164: _all] Error 2
Command "bash -c CFLAGS="-O2 -pipe  -fPIC  -fuse-ld=mold  -flto=auto" CXXFLAGS="-O2 -pipe  -fPIC  -fuse-ld=mold  -flto=auto" FCFLAGS="-O2 -pipe  -fPIC  -fuse-ld=mold  -flto=auto" FFLAGS="-O2 -pipe  -fPIC  -fuse-ld=mold  -flto=auto" LD_LIBRARY_PATH="/usr/local/lib64" LDFLAGS="-flto=auto " LIBDIR=/usr/local/lib64 make CC=clang" failed, retrying with "-j1"...

But if I just cd /usr/local/tmp/crew/libminigbm.20231231191651.dir and make, it builds without any issues! Is that expected?

And yet, after building it, there was still no sign of libgbm... I'll try building mesa again.

In the meantime, any other ideas or tips?

Thanks again!

@AltoRetrato
Copy link
Author

AltoRetrato commented Jan 1, 2024

Happy new year! 馃コ 馃巿

I built and installed mesa, then I started google-chrome, and got Missing X server or $DISPLAY:

Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
Fontconfig error: No writable cache directories
[16508:16508:0101/111003.904368:ERROR:ozone_platform_x11.cc(239)] Missing X server or $DISPLAY
[16508:16508:0101/111003.904484:ERROR:env.cc(257)] The platform failed to initialize.  Exiting.
$ echo $DISPLAY
:0

FWIW, I installed baobab, and when I run it it also complains about GLIBC_2.34:

/usr/local/lib64/libc.so.6: version `GLIBC_2.34' not found (required by /usr/local/lib64/libgstreamer-1.0.so.0)
Failed to load module: /usr/local/lib64/gtk-4.0/4.0.0/media/libmedia-gstreamer.so

(baobab:18241): Gtk-WARNING **: 11:23:30.907: Failed to open display

At first glance, it seems I have two issues at the moment:

  1. Lack of GLIBC_2.34
  2. X server issues

Do you think fixing 1 is feasible? I could try to create a glibc_build234.rb and patch https://github.com/chromebrew/chromebrew/blob/master/packages/glibc.rb - or is there a reason for GLIBC_2.34 to not be currently available?

About issue 2, it seems to be derived from issue 1. When I run restartsommelier (or startsommelier), I get some sommelier processes failed to start. Sommelier log also complaints about GLIBC_2.34:

/usr/local/var/log/sommelier.log
xset:  unable to open display ":0"
xset:  unable to open display ":0"
sommelier -X     --x-display=:0     --scale=1.0          --glamor     --force-drm-device=/dev/dri/renderD128     --display=wayland-0     --xwayland-path=/usr/local/bin/Xwayland     --xwayland-gl-driver-path=/usr/local/lib64/dri     --peer-cmd-prefix=/usr/local/lib64/ld-linux-x86-64.so.2     --noop-driver      --no-exit-with-child     /bin/sh -c xauth generate :0 . trusted
/usr/local/bin/sommelier.elf: /usr/local/bin/../lib64/libc.so.6: version `GLIBC_2.34' not found (required by /usr/local/bin/../lib64/libgbm.so.1)
xset:  unable to open display ":0"
xset:  unable to open display ":0"
xset:  unable to open display ":0"
xset:  unable to open display ":0"
xset:  unable to open display ":0"
/usr/local/bin/startsommelier: line 77: warning: /home/chronos/user/.sommelier.env: warning: script from noexec mount; see https://chromium.googlesource.com/chromiumos/docs/+/master/security/noexec_shell_scripts.md
xset:  unable to open display ":0"

I removed Chromebrew and started over, just to be sure, but got the same results. 馃槥

@AltoRetrato
Copy link
Author

AltoRetrato commented Jan 3, 2024

I had GLIBC_2.33 installed.

$ crew const LIBC_VERSION
LIBC_VERSION=2.33

I tried to install GLIBC_2.35 (or so I thought), but the issue persisted.

$ ldd --version
ldd (GNU libc) 2.33

$ crew install glibc_build235

$ ldd --version
ldd (GNU libc) 2.35

$ baobab
/usr/local/lib64/libc.so.6: version `GLIBC_2.34' not found (required by /usr/local/lib64/libgstreamer-1.0.so.0)

I (thought I) managed to build GLIBC_2.34 (crew -s -k install glibc_build234, which I hacked from glibc_build233.rb and glibc_build235.rb), and it still could not be found.

$ ldd --version
ldd (GNU libc) 2.34

$ baobab
/usr/local/lib64/libc.so.6: version `GLIBC_2.34' not found (required by /usr/local/lib64/libgstreamer-1.0.so.0)

Investigating more...

$ ldd /usr/local/bin/baobab
     [...]
     libc.so.6 => /usr/local/lib64/libc.so.6 (0x00007b2b4e3b7000)
     [...]

 $ ldd /usr/local/lib64/libgstreamer-1.0.so.0
  /usr/local/lib64/libgstreamer-1.0.so.0: /usr/local/lib64/libc.so.6: version `GLIBC_2.34' not found (required by /usr/local/lib64/libgstreamer-1.0.s  o.0)
     [...]
      libc.so.6 => /usr/local/lib64/libc.so.6 (0x00007ef4e0748000)
     [...]

$ ls -l /usr/local/lib64/libc.*
-rw-r--r--. 1 chronos chronos 5915006 Jan  2 23:21 /usr/local/lib64/libc.a
-rw-r--r--. 1 chronos chronos     279 Jan  2 22:11 /usr/local/lib64/libc.so
lrwxrwxrwx. 1 chronos chronos      16 Jan  2 23:21 /usr/local/lib64/libc.so.6 -> /lib64/libc.so.6

chronos@localhost /lib64 $ ls -l /lib64/libc.* /lib64/libc-*
-rwxr-xr-x. 1 root root 2060112 May 11  2022 /lib64/libc-2.33.so
lrwxrwxrwx. 1 root root      12 May 11  2022 /lib64/libc.so.6 -> libc-2.33.so

So I have /usr/local/lib64/libc.so.6 -> /lib64/libc.so.6 -> /lib64/libc-2.33.so. 馃檮

I tried to find the libc 2.34 I built. I thought I could find it in the CREW_BREW_DIR, but I might have misunderstood the meaning of the parameter -k ("Keep the 'CREW_BREW_DIR' (/usr/local/tmp/crew) directory."), since no files from the build could be found. Last lines of the build mentioning libc.so:

/usr/bin/install -c /usr/local/tmp/crew/glibc_build234.20240102201905.dir/glibc-2.34/glibc_build/libc.so /usr/local/tmp/crew/dest/usr/local/lib64/libc.so.6.new
mv -f /usr/local/tmp/crew/dest/usr/local/lib64/libc.so.6.new /usr/local/tmp/crew/dest/usr/local/lib64/libc.so.6

As you can see, I'm not really sure what I'm doing, nor what I should be doing. 馃う

So...

  • Is it possible, or even recommended, to update the libc.so.6 to 2.34 or 2.35? And would that solve my issues?
  • If not, what would be my options? Build from source all packages requiring libc 2.34 to use the system libc 2.33?

@satmandu
Copy link
Member

You cannot upgrade glibc with crew. glibc comes with the ChromeOS milestone that is installed on your system. If your system is End Of Life, then you are stuck with the glibc that your system came with. You can try to use Crostini, but your options are quite limited at that point short of figuring out a way to replace your entire system with some other distribution.

@AltoRetrato
Copy link
Author

Thanks, @satmandu ! In other words, Chromebrew does not fully support EOL Chromebooks (at least for pre-built GUI apps), is that correct? It would be nice to have that information somewhere so users could know about this beforehand...

@satmandu
Copy link
Member

satmandu commented Feb 14, 2024

Updates to EOL Chromebooks are always best effort (even more so than for current devices). pre-built GUI apps, especially recent ones such as from Gnome, may be dependent on newer versions of GLIBC.

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

No branches or pull requests

3 participants