Mailing List Archive

Xen Cross compilation Issues on Ubuntu
Hello All,
Greetings of the day and a very happy new year.

I am trying to cross compile the xen for arm64 target architecture and facing weird errors on ubuntu 18.04 machine.

While configuration, if arm64 compiler is found, then the configure halts at finding uuid.h
```
root@linux:/home/user/Projects/xen# ./configure --build=x86_64-unknown-linux-gnu --host=aarch64-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
Will build the following subsystems:
xen
tools
docs
configure: creating ./config.status
config.status: creating config/Toplevel.mk
config.status: creating config/Paths.mk
=== configuring in tools (/home/sandeshashok/Projects/motius/source_code/xen/tools)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local' '--build=x86_64-unknown-linux-gnu' '--host=aarch64-linux-gnu' 'build_alias=x86_64-unknown-linux-gnu' 'host_alias=aarch64-linux-gnu' --cache-file=/dev/null --srcdir=.
checking build system type... x86_64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking for aarch64-linux-gnu-gcc... aarch64-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
.
.
.
.
.
.
checking for iasl... /usr/bin/iasl
checking uuid/uuid.h usability... no
checking uuid/uuid.h presence... no
checking for uuid/uuid.h... no
checking uuid.h usability... no
checking uuid.h presence... no
checking for uuid.h... no
configure: error: cannot find a valid uuid library
configure: error: ./configure failed for tools

```

However, if i don't path to the cross compiler, then the configuration works successfully.
```
root@linux:/home/user/Projects/xen# ./configure --build=x86_64-unknown-linux-gnu --host=aarch64-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
Will build the following subsystems:
xen
tools
docs
configure: creating ./config.status
config.status: creating config/Toplevel.mk
config.status: creating config/Paths.mk
=== configuring in tools (/home/sandeshashok/Projects/motius/source_code/xen/tools)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local' '--build=x86_64-unknown-linux-gnu' '--host=aarch64-linux-gnu' 'build_alias=x86_64-unknown-linux-gnu' 'host_alias=aarch64-linux-gnu' --cache-file=/dev/null --srcdir=.
checking build system type... x86_64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking for aarch64-linux-gnu-gcc... no
checking for gcc... gcc
configure: WARNING: using cross tools not prefixed with host triplet
checking whether the C compiler works... yes

```

Did anyone else observe this ?

If this has been fixed please direct me to the link.

I have been working on this for sometime and issue still exists. Tried the wiki page for cross compiling as mentioned in the link https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions/CrossCompiling, however it isn't successfull as well.

Best Regards,
Re: Xen Cross compilation Issues on Ubuntu [ In reply to ]
## arm64 cross_compile
deb [arch=arm64] http://ports.ubuntu.com/ disco main multiverse universe restricted
deb [arch=arm64] http://ports.ubuntu.com/ disco-updates main multiverse universe restricted
deb [arch=arm64] http://ports.ubuntu.com/ disco-security main restricted

add above to your sources.list

dpkg --add-architecture arm64
apt-get update
apt-get install crossbuild-essential-arm64





On Wednesday, January 8, 2020, 3:25:24 AM MST, kasandesh <kasandesh@protonmail.com> wrote:

Hello All,
Greetings of the day and a very happy new year.

I am trying to cross compile the xen for arm64 target architecture and facing weird errors on ubuntu 18.04 machine.

While configuration, if arm64 compiler is found, then the configure halts at finding uuid.h
```
root@linux:/home/user/Projects/xen# ./configure --build=x86_64-unknown-linux-gnu --host=aarch64-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
Will build the following subsystems:
   xen
   tools
   docs
configure: creating ./config.status
config.status: creating config/Toplevel.mk
config.status: creating config/Paths.mk
=== configuring in tools (/home/sandeshashok/Projects/motius/source_code/xen/tools)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local'  '--build=x86_64-unknown-linux-gnu' '--host=aarch64-linux-gnu' 'build_alias=x86_64-unknown-linux-gnu'                     'host_alias=aarch64-linux-gnu' --cache-file=/dev/null --srcdir=.
checking build system type... x86_64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking for aarch64-linux-gnu-gcc... aarch64-linux-gnu-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
.
.
.
.
.
.
checking for iasl... /usr/bin/iasl
checking uuid/uuid.h usability... no
checking uuid/uuid.h presence... no
checking for uuid/uuid.h... no
checking uuid.h usability... no
checking uuid.h presence... no
checking for uuid.h... no
configure: error: cannot find a valid uuid library
configure: error: ./configure failed for tools

```

However, if i don't path to the cross compiler, then the configuration works successfully.
```
root@linux:/home/user/Projects/xen# ./configure --build=x86_64-unknown-linux-gnu --host=aarch64-linux-gnu
checking build system type... x86_64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
Will build the following subsystems:
   xen
   tools
   docs
configure: creating ./config.status
config.status: creating config/Toplevel.mk
config.status: creating config/Paths.mk
=== configuring in tools (/home/sandeshashok/Projects/motius/source_code/xen/tools)
configure: running /bin/bash ./configure --disable-option-checking '--prefix=/usr/local'  '--build=x86_64-unknown-linux-gnu' '--host=aarch64-linux-gnu' 'build_alias=x86_64-unknown-linux-gnu'                     'host_alias=aarch64-linux-gnu' --cache-file=/dev/null --srcdir=.
checking build system type... x86_64-unknown-linux-gnu
checking host system type... aarch64-unknown-linux-gnu
checking for aarch64-linux-gnu-gcc... no
checking for gcc... gcc
configure: WARNING: using cross tools not prefixed with host triplet
checking whether the C compiler works... yes

```

Did anyone else observe this ?

If this has been fixed please direct me to the link.

I have been working on this for sometime and issue still exists. Tried the wiki page for cross compiling as mentioned in the link https://wiki.xenproject.org/wiki/Xen_ARM_with_Virtualization_Extensions/CrossCompiling, however it isn't successfull as well.

Best Regards,


_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users
Re: Xen Cross compilation Issues on Ubuntu [ In reply to ]
On 08/01/2020 10:21, kasandesh wrote:
> Hello All,

Hi,

Sorry for the late reply.

> Greetings of the day and a very happy new year.
>
> I am trying to cross compile the xen for arm64 target architecture and
> facing weird errors on ubuntu 18.04 machine.
>
> While configuration, if arm64 compiler is found, then the configure
> halts at finding uuid.h
> ```
> root@linux:/home/user/Projects/xen# ./configure
> --build=x86_64-unknown-linux-gnu --host=aarch64-linux-gnu
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... aarch64-unknown-linux-gnu
> Will build the following subsystems:
>    xen
>    tools
>    docs
> configure: creating ./config.status
> config.status: creating config/Toplevel.mk
> config.status: creating config/Paths.mk
> === configuring in tools
> (/home/sandeshashok/Projects/motius/source_code/xen/tools)
> configure: running /bin/bash ./configure --disable-option-checking
> '--prefix=/usr/local'  '--build=x86_64-unknown-linux-gnu'
> '--host=aarch64-linux-gnu'
> 'build_alias=x86_64-unknown-linux-gnu'
> 'host_alias=aarch64-linux-gnu' --cache-file=/dev/null --srcdir=.
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... aarch64-unknown-linux-gnu
> checking for aarch64-linux-gnu-gcc... aarch64-linux-gnu-gcc
> checking whether the C compiler works... yes
> checking for C compiler default output file name... a.out
> checking for suffix of executables...
> .
> .
> .
> .
> .
> .
> checking for iasl... /usr/bin/iasl
> checking uuid/uuid.h usability... no
> checking uuid/uuid.h presence... no
> checking for uuid/uuid.h... no
> checking uuid.h usability... no
> checking uuid.h presence... no
> checking for uuid.h... no
> configure: error: cannot find a valid uuid library
> configure: error: ./configure failed for tools
>
> ```
>
> However, if i don't path to the cross compiler, then the configuration
> works successfully.
> ```
> root@linux:/home/user/Projects/xen# ./configure
> --build=x86_64-unknown-linux-gnu --host=aarch64-linux-gnu
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... aarch64-unknown-linux-gnu
> Will build the following subsystems:
>    xen
>    tools
>    docs
> configure: creating ./config.status
> config.status: creating config/Toplevel.mk
> config.status: creating config/Paths.mk
> === configuring in tools
> (/home/sandeshashok/Projects/motius/source_code/xen/tools)
> configure: running /bin/bash ./configure --disable-option-checking
> '--prefix=/usr/local'  '--build=x86_64-unknown-linux-gnu'
> '--host=aarch64-linux-gnu'
> 'build_alias=x86_64-unknown-linux-gnu'
> 'host_alias=aarch64-linux-gnu' --cache-file=/dev/null --srcdir=.
> checking build system type... x86_64-unknown-linux-gnu
> checking host system type... aarch64-unknown-linux-gnu
> checking for aarch64-linux-gnu-gcc... no
> checking for gcc... gcc
> configure: WARNING: using cross tools not prefixed with host triplet
> checking whether the C compiler works... yes
>
> ```
>
> Did anyone else observe this ?

Are you looking to cross-compile both hypervisor and the tools? If only
the former, then you don't need to use ./configure. You can call make on
the directory xen directly.

For the latter, I don't usually cross-compile the tools as I feel this
is quite fragile. Instead, I compile native either in a chroot using
qemu-user or directly on the target.

Would that be suitable for you?

Cheers,

--
Julien Grall

_______________________________________________
Xen-users mailing list
Xen-users@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-users