Linux from Source | Who's up For a Discussion?

Where I think this may be useful is in a new distro , like Chimera, where its own apk repository is lacking in some packages.
I think I could be quite happy using Chimera with the Gentoo repo attached.

Using Chimera would involve compiling Gentoo packages with LLVM and musl… that may be a challenge in itself.

3 Likes

I installed alacritty and after reboot I needed to run ./startprefix to get into the Gentoo’s “environment” so I could start the program but get error “failed to find suitable GL configuration.”

If I don’t run the ./startprefix Void doesn’t find the command.

So there’s some tinkering needed if you build packages this way.

2 Likes

I think you can do better as far as memory especially if there’s no GUI involved. Some systems will try to expand to use up as much memory as your computer has available though. You mentioned trying Puppy. Have you compared it to TinyCore as far as memory usage? Not sure which would be more efficient. Always thought both were a bit heavyweight for lightweight distros. I also think one can do better by using a C library designed for embedded systems like uclibc or musl.

1 Like

Bedrock Linux is useful if you’re going to do something like this. They have techniques worked out to make it easier to run software from a variety distributions on the same system.

2 Likes

I was just curious to test building with portage in another distro. Haven’t tried Bedrock Linux.

1 Like

Sound like it needs either gtk or qt. They would not be present in the Gentoo environment. I dont know how you could make aclarity look outside the Gentoo environment for resources?

1 Like

Yes Laura, My previous experience with TinyCore and Void Linux didn’t give me a robust system. Maybe I should try NetBSD:

1 Like

Me neither. I tried to pull Nvidia but it needs to be built as a module and of course I don’t have kernel for it. So this seems to only work with some packages like neofetch.

2 Likes

You could use strace to try and see what aclaritty is looking for.
Warning strace outout can be difficult to read.

It surprises me that Gentoo would install aclaritty without telling you about its dependencies? It is only a terminal emulator. It uses OpenGL… do you have OpenGL?

3 Likes

Yes, it includes in media-libs/mesa. I changed the video card driver to nouveau in the package.use and re-emerged mesa. Still same errors with alacritty and kitty.

I think this is not the way you should build from source on binary distros.

2 Likes

GL is the OpenGL environment presumably from Mesa. Makes sense since it says it’s an OpenGL terminal emulator. Dependencies are listed https://packages.debian.org/bookworm/alacritty and alacritty/INSTALL.md at master · alacritty/alacritty · GitHub Strange that I see no mention of Mesa in the dependencies. Doesn’t look like there’s any reason it shouldn’t build and run from source. However, it is a Rust program that requires a Rust compiler to build it.

3 Likes

Did you build mesa yourself? If not, when you build using portage, does it find the system version of mesa on your computer or does it not see the paths for your system software? You can add new packages to your system by using the system libraries and same compiler that was used to build them. The other option is to build everything all over again (similar to how Linux from Scratch does it) and use only the libraries and compilers you built. In the latter case, LD_LIBRARY_PATH needs to be set properly or the programs won’t find library dependencies. Building static can avoid library issues in most cases.

2 Likes

Depends on what you want to use your project for. From my past experience, BSD uses less resources than Linux. Same is true for older versions of the Linux kernel. Newer versions of most software keep requiring more and more resources. However, BSD does not have as much support for drivers. You can run BSD in Linux emulator mode but then you’ll need two sets of libraries, one set for BSD and one set that gives the dependencies for anything you want to run in Linux. You won’t need the Linux kernel though. There are also some programs that you can find in Linux that have not been successfully ported to BSD. I was trying to get a program for communication with a modem working at one point. There was no working version of it for BSD.

1 Like

My normal get out of jail free small linux is puppy but dropped by the following this morning and it may well be an alternative with small basic foot print dont need to create a project myself

1 Like

Sparky looks fine.
Porteus is another good choice

The go to for this area used to be Knoppix

I had problems with this one when I was trying to use as a info terminal web site only so abandoned the project but this is 2 years back

Yes, It’s build in Void’s “gentoo environment”:

[pete@void gentoo]$ emerge --pretend mesa

These are the packages that would be merged, in order:

Calculating dependencies … done!
Dependency resolution took 1.54 s (backtrack: 0/20).

[ebuild R ] media-libs/mesa-25.1.6::gentoo USE=“X llvm (opengl) proprietary-codecs wayland zstd -d3d9 -debug -lm-sensors -opencl -test -unwind -vaapi -valgrind -vdpau -vulkan -xa” CPU_FLAGS_X86=“sse2” LLVM_SLOT=“20 -18 -19” VIDEO_CARDS=“nouveau -asahi -d3d12 (-freedreno) -intel -lavapipe (-lima) -nvk (-panfrost) -r300 -r600 -radeon -radeonsi (-v3d) (-vc4) -virgl (-vivante) -vmware -zink” 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

and on Void:

[pete@void ~]$ xbps-install --dry-run mesa
ERROR: Package `mesa’ already installed.

I don’t know how to proceed from here. Heres env PAN_MESA_DEBUG=gles3 glxinfo | grep OpenGL : left terminal “Gentoo” and right Void

edit: Here’s the errors for kitty:


[pete@void gentoo]$ kitty
[0.110] [glfw error 65542]: GLX: No GLXFBConfigs returned
[0.110] [glfw error 65545]: GLX: Failed to find a suitable GLXFBConfig
[0.117] Traceback (most recent call last):
  File "/home/pete/gentoo/usr/bin/../lib64/kitty/kitty/main.py", line 585, in main
    kitty_main(called_from_panel)
    ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^
  File "/home/pete/gentoo/usr/bin/../lib64/kitty/kitty/main.py", line 567, in kitty_main
    run_app(opts, cli_opts, bad_lines, talk_fd)
    ~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pete/gentoo/usr/bin/../lib64/kitty/kitty/main.py", line 322, in __call__
    _run_app(opts, args, bad_lines, talk_fd)
    ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/pete/gentoo/usr/bin/../lib64/kitty/kitty/main.py", line 290, in _run_app
    window_id = create_os_window(
            run_app.initial_window_size_func(get_os_window_sizing_data(opts, startup_sessions[0] if startup_sessions else None), cached_values),
            pre_show_callback,
            args.title or appname, winname,
            wincls, wstate, load_all_shaders, disallow_override_title=bool(args.title), layer_shell_config=run_app.layer_shell_config, x=pos_x, y=pos_y)
OSError: Failed to create GLFWwindow. This usually happens because of old/broken OpenGL drivers. kitty requires working OpenGL 3.1 drivers.

[pete@void gentoo]$
2 Likes

According to this, it’s using Wayland. When I did my experiments of using GUI programs built with a different compiler and dependencies, I used X. X is client server, so you can run programs and view them in X Windows even if they’re not using the same libraries or even when they’re not on the same operating system. I don’t believe Wayland has that capability (at least without using XWayland). I think you’d need to run the version of Wayland that you build with the gentoo environment. LFS does a chroot and runs the applications from the directory where its builds are. If you used the operating system’s native packages including the Wayland and Mesa libraries with your build of alacritty that should work too (assuming the compilers used to build the native system and the new system are compatible). It matters how you mix and match packages from the two systems.

3 Likes

Sorry for my late reply! There’s both use flags, X and wayland. Void is using X but when I’m inside the Gentoo prefix I get no output from

echo $XDG_SESSION_TYPE

Maybe that’s the issue? How to add session type to the environment? I tried this:

Environment"XDG_SESSION_TYPE=X" and same with Wayland but no change

2 Likes

Did you export DISPLAY before running the application and is it using the same DISPLAY setting as your X server?

2 Likes