Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Qemu and dependencies build and installation into ~/.local

Programming languages, Coding, Executables, Package Creation, and Scripting.
Post Reply
Message
Author
eugrus
Posts: 34
Joined: 2022-12-01 11:13
Has thanked: 7 times

Qemu and dependencies build and installation into ~/.local

#1 Post by eugrus »

So I am trying to install qemu and all the dependencies into ~/.local as a non-privileged user.

Already managed to do it with krb5 and glib2

My .bashrc has the following hacks at this point:

Code: Select all

export PATH=$PATH:$HOME/bin:$HOME/.local/bin:$HOME/.local/krb5/bin
export LD_LIBRARY_PATH=$HOME/local/krb5/lib:"$HOME/.local/glib-2.22/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="$HOME/.local/glib-2.22/lib/pkgconfig:$PKG_CONFIG_PATH"
Now to the current issue:

Code: Select all

:~/src/qemu$ ./configure --prefix=$HOME/.local/qemu

ERROR: DTC (libfdt) version >= 1.4.2 not present. Your options:
         (1) Preferred: Install the DTC (libfdt) devel package
         (2) Fetch the DTC submodule, using:
             git submodule update --init dtc
git submodule update --init dtc
failed to do the job

Code: Select all

git.qemu-project.org[0: 20.218.248.100]: errno=Connection timed out
every single time

So I've cloned the repo from https://git.kernel.org/pub/scm/utils/dtc/dtc.git

However there's neither a configure script nor a config.ac file, so I don't know how to install the header files into ~/.local after I run make

eugrus
Posts: 34
Joined: 2022-12-01 11:13
Has thanked: 7 times

Re: Qemu and dependencies build and installation into ~/.local

#2 Post by eugrus »

Last edited by eugrus on 2023-05-27 20:28, edited 3 times in total.

Aki
Global Moderator
Global Moderator
Posts: 2816
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 68 times
Been thanked: 382 times

Re: Qemu and dependencies build and installation into ~/.local

#3 Post by Aki »

Hello,
eugrus wrote: 2023-05-27 20:17 [..]
So I've cloned the repo from https://git.kernel.org/pub/scm/utils/dtc/dtc.git
However there's neither a configure script nor a config.ac file, so I don't know how to install the header files into ~/.local after I run make
I was able to compile the libraries:

Code: Select all

$ git clone https://git.kernel.org/pub/scm/utils/dtc/dtc.git
$ cd dtc/
$ make
Destination directory are in the Makefile:

Code: Select all

[..]
DESTDIR =
PREFIX = $(HOME)
BINDIR = $(PREFIX)/bin
LIBDIR = $(PREFIX)/lib
INCLUDEDIR = $(PREFIX)/include
[..]
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

eugrus
Posts: 34
Joined: 2022-12-01 11:13
Has thanked: 7 times

Re: Qemu and dependencies build and installation into ~/.local

#4 Post by eugrus »

Thank you! I've modified dtc's Makefile as following:

Code: Select all

PREFIX = $(HOME)/.local
Than ran make and make install on it.

However, this still doesn't make qemu's configure script happy:

Code: Select all

:~/src/qemu$ ./configure --prefix=$HOME/.local/qemu

ERROR: DTC (libfdt) version >= 1.4.2 not present. Your options:
         (1) Preferred: Install the DTC (libfdt) devel package
         (2) Fetch the DTC submodule, using:
             git submodule update --init dtc

eugrus
Posts: 34
Joined: 2022-12-01 11:13
Has thanked: 7 times

Re: Qemu and dependencies build and installation into ~/.local

#5 Post by eugrus »

I am exploring a more Debian native approach to doing ~/.local now.

Started with apt download qemu-system-x86 and did dpkg -I on qemu-system-x86*.deb to see its dependencies.

Did apt download on those.

Then

Code: Select all

for file in *.deb; do dpkg -I "$file"; done | awk '/^ Depends:/ {gsub(/^ Depends: /, ""); gsub(/ \(.*\)$/, ""); printf $0" "}'
to see the dependecies of the dependecies and did apt download on those ones.

And then finally

Code: Select all

for package in *.deb; do dpkg -x "$package" ~/.local; done
Now I am as far as being able to start qemu-system-x86_64 from ~/.local without it complaining about missing libraries.

Does complain about ROM files though:

Code: Select all

$ qemu-system-x86_64
qemu: could not load PC BIOS 'bios-256k.bin'
$ qemu-system-x86_64 -L ~/.local/usr/share/seabios
qemu-system-x86_64: Initialization of device e1000 failed: failed to find romfile "efi-e1000.rom"
---
Moderator edit(Aki) - Sun May 28 08:37:46 CEST 2023: replaced "pre" tags with "code" tags.

Aki
Global Moderator
Global Moderator
Posts: 2816
Joined: 2014-07-20 18:12
Location: Europe
Has thanked: 68 times
Been thanked: 382 times

Re: Qemu and dependencies build and installation into ~/.local

#6 Post by Aki »

Hello,
eugrus wrote: 2023-05-28 01:38 [..]
Now I am as far as being able to start qemu-system-x86_64 from ~/.local without it complaining about missing libraries. Does complain about ROM files though:

Code: Select all

$ qemu-system-x86_64
qemu: could not load PC BIOS 'bios-256k.bin'
$ qemu-system-x86_64 -L ~/.local/usr/share/seabios
qemu-system-x86_64: Initialization of device e1000 failed: failed to find romfile "efi-e1000.rom"
The efi-e1000.rom file is in the package ipxe-qemu. You can use the Debian Site https://packages.debian.org to search for packages names and their contents. It's very useful. ;-)
⢀⣴⠾⠻⢶⣦⠀
⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system
⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org
⠈⠳⣄⠀

Post Reply