Hi,
I am trying to cross-compile QEMU for aarch64 target using the below toolchain http://releases.linaro.org/components/toolchain/binaries/4.9-2016.02/aarch64...
../configure --target-list=aarch64-softmmu --enable-kvm --enable-vhost-net --cross-prefix=~/Downloads/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
ERROR: pkg-config binary '/home/rokhanna/Downloads/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-pkg-config' not found
QEMU - https://github.com/qemu/qemu
Any pointers on where I can find pkg-config? Thanks in advance.
Thanks
Rohit
----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------
On 3/21/19 4:45 PM, Rohit Khanna wrote:
Hi,
I am trying to cross-compile QEMU for aarch64 target using the below toolchain http://releases.linaro.org/components/toolchain/binaries/4.9-2016.02/aarch64...
../configure --target-list=aarch64-softmmu --enable-kvm --enable-vhost-net --cross-prefix=~/Downloads/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
ERROR: pkg-config binary '/home/rokhanna/Downloads/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-pkg-config' not found
First, "--cross-prefix=aarch64-linux-gnu-".
It is a prefix, not a path. You should have "$HOME/Downloads/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin" in your path in order to use that compiler.
Second, pkg-config is not part of a toolchain, but part of an entire OS distribution. If your host is debian or ubuntu, they ship a version configured for aarch64 cross-compilation. Which is helpful because...
Third, you're going to need a *lot* of aarch64 libraries in order to build QEMU. This is where OS support for cross-toolchains is key.
r~
Thanks Wookey and Richard.
I was able to resolve the pkg-config issue after installing it with - apt install pkg-config-aarch64-linux-gnu
I modified my configure command to below - ./configure --target-list=aarch64-softmmu --enable-kvm --enable-vhost-net --cross-prefix=aarch64-linux-gnu-
Now I am running into dependency issue on glib-2.4 and gthread-2.0.
rokhanna@rokhanna-dev ~/dev/qemu.git $ ./configure --target-list=aarch64-softmmu --enable-kvm --enable-vhost-net --cross-prefix=aarch64-linux-gnu-
ERROR: glib-2.40 gthread-2.0 is required to compile QEMU
I have installed libglib2.0-0 using apt-get but I cant find libglib2.4. Any ideas how I can install that. Thanks in advance.
Thanks
Rohit
________________________________ From: Richard Henderson richard.henderson@linaro.org Sent: Thursday, March 21, 2019 9:31 PM To: Rohit Khanna; linaro-toolchain@lists.linaro.org Cc: Santosh Shukla Subject: Re: Cross compiling QEMU for aarch64
On 3/21/19 4:45 PM, Rohit Khanna wrote:
Hi,
I am trying to cross-compile QEMU for aarch64 target using the below toolchain http://releases.linaro.org/components/toolchain/binaries/4.9-2016.02/aarch64...
../configure --target-list=aarch64-softmmu --enable-kvm --enable-vhost-net --cross-prefix=~/Downloads/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
ERROR: pkg-config binary '/home/rokhanna/Downloads/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-pkg-config' not found
First, "--cross-prefix=aarch64-linux-gnu-".
It is a prefix, not a path. You should have "$HOME/Downloads/gcc-linaro-4.9-2016.02-x86_64_aarch64-linux-gnu/bin" in your path in order to use that compiler.
Second, pkg-config is not part of a toolchain, but part of an entire OS distribution. If your host is debian or ubuntu, they ship a version configured for aarch64 cross-compilation. Which is helpful because...
Third, you're going to need a *lot* of aarch64 libraries in order to build QEMU. This is where OS support for cross-toolchains is key.
r~
----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------
On 3/28/19 11:40 AM, Rohit Khanna wrote:
rokhanna@rokhanna-dev ~/dev/qemu.git $ ./configure --target-list=aarch64-softmmu --enable-kvm --enable-vhost-net --cross-prefix=aarch64-linux-gnu-
ERROR: glib-2.40 gthread-2.0 is required to compile QEMU
I have installed libglib2.0-0 using apt-get but I cant find libglib2.4. Any ideas how I can install that. Thanks in advance.
I'm fairly certain that you have installed libglib for the host, x86_64, but not the cross-compiled libraries for aarch64. This is what I meant when I said:
Third, you're going to need a *lot* of aarch64 libraries in order to build QEMU. This is where OS support for cross-toolchains is key.
Try the following as root:
dpkg --add-architecture arm64 apt-get update apt-get install build-essential apt-get install libcairo2-dev:arm64
See
https://wiki.debian.org/Multiarch/HOWTO
for more details.
r~
Thanks Richard, that was very helpful. I was able to resolve the issue with this. Thanks again!
Thanks
Rohit
________________________________ From: Richard Henderson richard.henderson@linaro.org Sent: Thursday, March 28, 2019 11:50 AM To: Rohit Khanna; linaro-toolchain@lists.linaro.org Subject: Re: Cross compiling QEMU for aarch64
On 3/28/19 11:40 AM, Rohit Khanna wrote:
rokhanna@rokhanna-dev ~/dev/qemu.git $ ./configure --target-list=aarch64-softmmu --enable-kvm --enable-vhost-net --cross-prefix=aarch64-linux-gnu-
ERROR: glib-2.40 gthread-2.0 is required to compile QEMU
I have installed libglib2.0-0 using apt-get but I cant find libglib2.4. Any ideas how I can install that. Thanks in advance.
I'm fairly certain that you have installed libglib for the host, x86_64, but not the cross-compiled libraries for aarch64. This is what I meant when I said:
Third, you're going to need a *lot* of aarch64 libraries in order to build QEMU. This is where OS support for cross-toolchains is key.
Try the following as root:
dpkg --add-architecture arm64 apt-get update apt-get install build-essential apt-get install libcairo2-dev:arm64
See
https://wiki.debian.org/Multiarch/HOWTO
for more details.
r~
----------------------------------------------------------------------------------- This email message is for the sole use of the intended recipient(s) and may contain confidential information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. -----------------------------------------------------------------------------------
linaro-toolchain@lists.linaro.org