mirage / xen-arm-builder

Archived - the Xen and ARM support in MirageOS has been superseeded by our PVH support - Build an SDcard image for Xen/ARM, for a Cubieboard
ISC License
57 stars 36 forks source link

ERROR while installing mirage-xen.1.1.1 on ARM #45

Closed heidihoward closed 9 years ago

heidihoward commented 9 years ago

[sorry if this is the wrong issue tracker, it's ARM related so I've put it here]

after using xen-arm-builder and following the instructions at http://openmirage.org/wiki/hello-world, opam fails to install mirage-xen.1.1.1 with the following error on cubieboard2:

gcc version

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.8/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-19ubuntu1)

the error from opam after make depend

#=== ERROR while installing mirage-xen.1.1.1 ==================================#
# opam-version 1.2.0
# os           linux
# command      make xen-build
# path         /home/mirage/.opam/system/build/mirage-xen.1.1.1
# compiler     system (4.01.0)
# exit-code    2
# env-file     /home/mirage/.opam/system/build/mirage-xen.1.1.1/mirage-xen-9698-d2d111.env
# stdout-file  /home/mirage/.opam/system/build/mirage-xen.1.1.1/mirage-xen-9698-d2d111.out
# stderr-file  /home/mirage/.opam/system/build/mirage-xen.1.1.1/mirage-xen-9698-d2d111.err
### stdout ###
# ...[truncated]
# Warning: tag "package" does not expect a parameter, but is used with parameter "cstruct"
# cc -I/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/dietlibc/lib -c -fno-tree-loop-distribute-patterns -O3 -U __linux__ -U __FreeBSD__ -U __sun__ -D__MiniOS__ -D__MiniOS__ -D__x86_64__ -D__XEN_INTERFACE_VERSION__=0x00030205 -D__INSIDE_MINIOS__ -nostdinc -std=gnu99 -fno-stack-protector -m64 -mno-red-zone -fno-reorder-blocks -fstrict-aliasing -momit-leaf-frame-pointer -mfancy-math-387 -I/usr/lib/gcc/arm-linux-gnueabihf/4.8//include -isystem /home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/include/ -isystem /home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/include/mini-os -isystem /home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/include/mini-os/x86 -DCAML_NAME_SPACE -DTARGET_amd64 -DSYS_xen -I/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/ocaml -I/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/libm -Wextra -Wchar-subscripts -Wno-switch -Wno-unused -Wredundant-decls -D__dietlibc__ -I/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/dietlibc -DNATIVE_CODE -I/usr/lib/ocaml -o runtime/dietlibc/lib/abs.o runtime/dietlibc/lib/abs.c
# + cc -I/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/dietlibc/lib -c -fno-tree-loop-distribute-patterns -O3 -U __linux__ -U __FreeBSD__ -U __sun__ -D__MiniOS__ -D__MiniOS__ -D__x86_64__ -D__XEN_INTERFACE_VERSION__=0x00030205 -D__INSIDE_MINIOS__ -nostdinc -std=gnu99 -fno-stack-protector -m64 -mno-red-zone -fno-reorder-blocks -fstrict-aliasing -momit-leaf-frame-pointer -mfancy-math-387 -I/usr/lib/gcc/arm-linux-gnueabihf/4.8//include -isystem /home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/include/ -isystem /home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/include/mini-os -isystem /home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/include/mini-os/x86 -DCAML_NAME_SPACE -DTARGET_amd64 -DSYS_xen -I/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/ocaml -I/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/libm -Wextra -Wchar-subscripts -Wno-switch -Wno-unused -Wredundant-decls -D__dietlibc__ -I/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/dietlibc -DNATIVE_CODE -I/usr/lib/ocaml -o runtime/dietlibc/lib/abs.o runtime/dietlibc/lib/abs.c
# cc: error: unrecognized command line option ‘-m64’
# cc: error: unrecognized command line option ‘-mno-red-zone’
# cc: error: unrecognized command line option ‘-momit-leaf-frame-pointer’
# cc: error: unrecognized command line option ‘-mfancy-math-387’
# Command exited with code 1.
# make[2]: Leaving directory `/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen'
# make[1]: Leaving directory `/home/mirage/.opam/system/build/mirage-xen.1.1.1'
### stderr ###
# make[2]: *** [build] Error 10
# make[1]: *** [build] Error 2
# make: *** [xen-build] Error 2

=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
The following failed
 - install   mirage-xen.1.1.1
Due to the errors, the following have been cancelled
 - install   mirage-console-xen.1.0.2
'opam install mirage-console-xen mirage-xen --verbose' failed.
make: *** [depend] Error 4

This compiling on the cubieboard2 (also the target) and not cross-compiling. The unknown options are relating to x86

avsm commented 9 years ago

this is fixed in the next rebuild (which is happening right now)

you are using an out of date opam repository so:

cd opam-repository git pull opam update -u -y

On 22 Jan 2015, at 09:23, Heidi-ann notifications@github.com wrote:

[sorry if this is the wrong issue tracker, it's ARM related so I've put it here]

after using xen-arm-builder and following the instructions at http://openmirage.org/wiki/hello-world http://openmirage.org/wiki/hello-world, opam fails to install mirage-xen.1.1.1 with the following error on cubieboard2:

gcc version

Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.8/lto-wrapper Target: arm-linux-gnueabihf Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf Thread model: posix gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-19ubuntu1) the error from opam after make depend

=== ERROR while installing mirage-xen.1.1.1 ==================================

opam-version 1.2.0

os linux

command make xen-build

path /home/mirage/.opam/system/build/mirage-xen.1.1.1

compiler system (4.01.0)

exit-code 2

env-file /home/mirage/.opam/system/build/mirage-xen.1.1.1/mirage-xen-9698-d2d111.env

stdout-file /home/mirage/.opam/system/build/mirage-xen.1.1.1/mirage-xen-9698-d2d111.out

stderr-file /home/mirage/.opam/system/build/mirage-xen.1.1.1/mirage-xen-9698-d2d111.err

stdout

...[truncated]

Warning: tag "package" does not expect a parameter, but is used with parameter "cstruct"

cc -I/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/dietlibc/lib -c -fno-tree-loop-distribute-patterns -O3 -U linux -U FreeBSD -U sun -DMiniOS -DMiniOS -Dx86_64 -DXEN_INTERFACE_VERSION=0x00030205 -DINSIDE_MINIOS -nostdinc -std=gnu99 -fno-stack-protector -m64 -mno-red-zone -fno-reorder-blocks -fstrict-aliasing -momit-leaf-frame-pointer -mfancy-math-387 -I/usr/lib/gcc/arm-linux-gnueabihf/4.8//include -isystem /home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/include/ -isystem /home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/include/mini-os -isystem /home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/include/mini-os/x86 -DCAML_NAME_SPACE -DTARGET_amd64 -DSYS_xen -I/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/ocaml -I/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/libm -Wextra -Wchar-subscripts -Wno-switch -Wno-unused -Wredundant-decls -Ddietlibc -I/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/dietlibc -DNATIVE_CODE -I/usr/lib/ocaml -o runtime/dietlibc/lib/abs.o runtime/dietlibc/lib/abs.c

+ cc -I/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/dietlibc/lib -c -fno-tree-loop-distribute-patterns -O3 -U linux -U FreeBSD -U sun -DMiniOS -DMiniOS -Dx86_64 -DXEN_INTERFACE_VERSION=0x00030205 -DINSIDE_MINIOS -nostdinc -std=gnu99 -fno-stack-protector -m64 -mno-red-zone -fno-reorder-blocks -fstrict-aliasing -momit-leaf-frame-pointer -mfancy-math-387 -I/usr/lib/gcc/arm-linux-gnueabihf/4.8//include -isystem /home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/include/ -isystem /home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/include/mini-os -isystem /home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/include/mini-os/x86 -DCAML_NAME_SPACE -DTARGET_amd64 -DSYS_xen -I/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/ocaml -I/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/libm -Wextra -Wchar-subscripts -Wno-switch -Wno-unused -Wredundant-decls -Ddietlibc -I/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen/runtime/dietlibc -DNATIVE_CODE -I/usr/lib/ocaml -o runtime/dietlibc/lib/abs.o runtime/dietlibc/lib/abs.c

cc: error: unrecognized command line option ‘-m64’

cc: error: unrecognized command line option ‘-mno-red-zone’

cc: error: unrecognized command line option ‘-momit-leaf-frame-pointer’

cc: error: unrecognized command line option ‘-mfancy-math-387’

Command exited with code 1.

make[2]: Leaving directory `/home/mirage/.opam/system/build/mirage-xen.1.1.1/xen'

make[1]: Leaving directory `/home/mirage/.opam/system/build/mirage-xen.1.1.1'

stderr

make[2]: *\ [build] Error 10

make[1]: *\ [build] Error 2

make: *\ [xen-build] Error 2

=-=- Error report -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= The following failed

  • install mirage-xen.1.1.1 Due to the errors, the following have been cancelled
  • install mirage-console-xen.1.0.2 'opam install mirage-console-xen mirage-xen --verbose' failed. make: *\ [depend] Error 4 This compiling on the cubieboard2 (also the target) and not cross-compiling. The unknown options are relating to x86

— Reply to this email directly or view it on GitHub https://github.com/mirage/xen-arm-builder/issues/45.

heidihoward commented 9 years ago

sorry, what do you meet by opam-repository, clone https://github.com/mirage/xen or ~/.opam/packages/mirage or something else?

heidihoward commented 9 years ago

for ref, i tried:

git clone https://github.com/mirage/mirage-platform
opam pin add mirage-xen mirage-platform
opam update -u -y
make depend

This still fails as "Requested 'libminios-xen >= 0.5' but version of mini-os is 0.2". OPAM still doesn't see mirage-xen-minios packages after version 0.4.1 so I tried redoing the process for mirage-xen-minios and mirage-profile.0.1

its now failing at the make with

ocamlfind ocamlopt -g -linkpkg -dontlink unix -output-obj -package mirage-types.lwt -package mirage-console-xen -package lwt.syntax -syntax camlp4o unikernel.cmx main.cmx -o main.native.o
ld -d -nostdlib -m elf_x86_64 -T /home/mirage/.opam/system/lib/mirage-xen/mirage-x86_64.lds /home/mirage/.opam/system/lib/mirage-xen/x86_64.o \
      _build/main.native.o /home/mirage/.opam/system/lib/mirage-xen/libocaml.a /home/mirage/.opam/system/lib/mirage-xen/libxen.a \
      /home/mirage/.opam/system/lib/mirage-xen/libxencaml.a /home/mirage/.opam/system/lib/mirage-xen/libdiet.a /home/mirage/.opam/system/lib/mirage-xen/libm.a /home/mirage/.opam/system/lib/mirage-xen/longjmp.o -o mir-console.xen
ld: unrecognised emulation mode: elf_x86_64
Supported emulations: armelf_linux_eabi armelfb_linux_eabi
make: *** [build] Error 1

Is there a way to make use of the xen-arm-builder fix without starting all over again ?

talex5 commented 9 years ago

mirage-xen-minios.0.6.0 is in the public OPAM repository, so it should be found:

http://opam.ocaml.org/packages/mirage-xen-minios/mirage-xen-minios.0.6.0/

What does opam install 'mirage-xen-minios=0.6.0' say?

heidihoward commented 9 years ago

sorry i've dd'ed over the sd card now so i can't test it further but it said version number doesn't exist. I tried opam update many time but I just would not acknowledge that there was versions after 4.0.1

MagnusS commented 9 years ago

"opam update" doesn't work with the manually cloned opam repository in ~/opam-repository so you probably have an old version from when the image was generated. You should be able to update by running "git pull" in ~/opam-repository.

If it doesn't work you could try to delete .opam and then run "opam init" again, but you have to reinstall/recompile all packages.

avsm commented 9 years ago

It's in the git/opam-repository subdir

heidihoward commented 9 years ago

fixed, needed to start fresh again and do

cd ~/git/opam-repository
git pull
opam update -u -y