Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu 20.04 fails to build Hello #2207

Open
lonnietc opened this issue Jul 29, 2020 · 6 comments
Open

Ubuntu 20.04 fails to build Hello #2207

lonnietc opened this issue Jul 29, 2020 · 6 comments

Comments

@lonnietc
Copy link

Hi,

Not sure where best to post this, but the Hello example fails to build on my Ubintu 20.04 (64-bit AMD) system after installing the dependencies and following the steps.


lonnie@lonnie-p7-1451:~/IncludeOS/test/build$ conan install ../hello_world -pr gcc-7.3.0-linux-x86_64-toolchain
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=7
cppstd=17
os=Linux
os_build=Linux
[options]
[build_requires]
[env]
CC=/usr/bin/gcc-7
CFLAGS=-msse3 -mfpmath=sse -O2 -g
CXX=/usr/bin/g++-7
CXXFLAGS=-msse3 -mfpmath=sse -O2 -g
WARN: botan/2.8.0@includeos/stable: requirement libcxx/[>=5.0]@includeos/stable overridden by includeos/0.15.1-5@includeos/latest to libcxx/7.0.1@includeos/stable
WARN: openssl/1.1.1@includeos/stable: requirement libcxx/[>=5.0]@includeos/stable overridden by s2n/0.8@includeos/stable to libcxx/7.0.1@includeos/stable
Version ranges solved
Version range '>=0.14.0,include_prerelease=True' required by 'conanfile.txt' resolved to 'includeos/0.15.1-5@includeos/latest' in local cache
Version range '>=1.0.0' required by 'python_require' resolved to 'conan-tools/1.0.0@includeos/stable' in local cache
Version range '>=5.0' required by 'includeos/0.15.1-5@includeos/latest' resolved to 'libcxx/7.0.1@includeos/stable' in local cache
Version range '>=1.1.18' required by 'libcxx/7.0.1@includeos/stable' resolved to 'musl/1.1.18@includeos/stable' in local cache
Version range '>=5.0' required by 'botan/2.8.0@includeos/stable' valid for downstream requirement 'libcxx/7.0.1@includeos/stable'
Version range '>=1.1.18' required by 'botan/2.8.0@includeos/stable' resolved to 'musl/1.1.18@includeos/stable' in local cache
Version range '>=5.0' required by 'openssl/1.1.1@includeos/stable' valid for downstream requirement 'libcxx/7.0.1@includeos/stable'
Version range '>=0.14.0,include_prerelease=True' required by 'conanfile.txt' resolved to 'chainloader/0.15.1-5@includeos/latest' in local cache
Version range '>=0.16.0' required by 'conanfile.txt' resolved to 'vmrunner/0.16.0@includeos/stable' in local cache
Version range '>=0.15.0' required by 'conanfile.txt' resolved to 'vmbuild/0.15.0@includeos/stable' in local cache
Version range '>=1.0.0' required by 'python_require' resolved to 'conan-tools/1.0.0@includeos/stable' in local cache
Version range '>=1.0.0' required by 'python_require' resolved to 'conan-tools/1.0.0@includeos/stable' in local cache
Version range '>=1.0.0' required by 'python_require' resolved to 'conan-tools/1.0.0@includeos/stable' in local cache

conanfile.txt: Installing package
Requirements
GSL/2.0.0@includeos/stable from 'includeos' - Cache
botan/2.8.0@includeos/stable from 'includeos' - Cache
http-parser/2.8.1@includeos/stable from 'includeos' - Cache
includeos/0.15.1-5@includeos/latest from 'includeos' - Cache
libcxx/7.0.1@includeos/stable from 'includeos' - Cache
libcxxabi/7.0.1@includeos/stable from 'includeos' - Cache
libgcc/1.0@includeos/stable from 'includeos' - Cache
libunwind/7.0.1@includeos/stable from 'includeos' - Cache
musl/1.1.18@includeos/stable from 'includeos' - Cache
openssl/1.1.1@includeos/stable from 'includeos' - Cache
rapidjson/1.1.0@includeos/stable from 'includeos' - Cache
s2n/0.8@includeos/stable from 'includeos' - Cache
uzlib/v2.1.1@includeos/stable from 'includeos' - Cache
Python requires
conan-tools/1.0.0@includeos/stable
Packages
GSL/2.0.0@includeos/stable:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Download
botan/2.8.0@includeos/stable:da59a9abb477f02674b83d6c28ffb976d2329c3c - Missing
http-parser/2.8.1@includeos/stable:6ae331b72e7e265ca2a3d1d8246faf73aa030238 - Download
includeos/0.15.1-5@includeos/latest:8ccaba897f311aea6e6153412a42c103f3a61d52 - Missing
libcxx/7.0.1@includeos/stable:2fd99d114414bf3d24c4f729e8c45d0f4391837f - Missing
libcxxabi/7.0.1@includeos/stable:9bfdcfa2bb925892ecf42e2a018a3f3529826676 - Missing
libgcc/1.0@includeos/stable:9bfdcfa2bb925892ecf42e2a018a3f3529826676 - Download
libunwind/7.0.1@includeos/stable:6ae331b72e7e265ca2a3d1d8246faf73aa030238 - Download
musl/1.1.18@includeos/stable:814c55266c97e8ac35915be388bafaa950f8088a - Missing
openssl/1.1.1@includeos/stable:d1f2fd118ae70b4bfc4a5a09408aee2101e3fa04 - Missing
rapidjson/1.1.0@includeos/stable:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Download
s2n/0.8@includeos/stable:a3392d1c57072d6a3aef8ee94f0f529a52fd5db3 - Missing
uzlib/v2.1.1@includeos/stable:6ae331b72e7e265ca2a3d1d8246faf73aa030238 - Download
Build requirements
chainloader/0.15.1-5@includeos/latest from 'includeos' - Cache
vmbuild/0.15.0@includeos/stable from 'includeos' - Cache
vmrunner/0.16.0@includeos/stable from 'includeos' - Cache
Build requirements packages
chainloader/0.15.1-5@includeos/latest:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Download
vmbuild/0.15.0@includeos/stable:44fcf6b9a7fb86b2586303e3db40189d3b511830 - Download
vmrunner/0.16.0@includeos/stable:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Download

Installing (downloading, building) binaries...
ERROR: Missing binary: botan/2.8.0@includeos/stable:da59a9abb477f02674b83d6c28ffb976d2329c3c
ERROR: Missing binary: includeos/0.15.1-5@includeos/latest:8ccaba897f311aea6e6153412a42c103f3a61d52
ERROR: Missing binary: libcxx/7.0.1@includeos/stable:2fd99d114414bf3d24c4f729e8c45d0f4391837f
ERROR: Missing binary: libcxxabi/7.0.1@includeos/stable:9bfdcfa2bb925892ecf42e2a018a3f3529826676
ERROR: Missing binary: musl/1.1.18@includeos/stable:814c55266c97e8ac35915be388bafaa950f8088a
ERROR: Missing binary: openssl/1.1.1@includeos/stable:d1f2fd118ae70b4bfc4a5a09408aee2101e3fa04
ERROR: Missing binary: s2n/0.8@includeos/stable:a3392d1c57072d6a3aef8ee94f0f529a52fd5db3

libcxxabi/7.0.1@includeos/stable: WARN: Can't find a 'libcxxabi/7.0.1@includeos/stable' package for the specified settings, options and dependencies:

  • Settings: arch=x86_64, build_type=Release, compiler=gcc, compiler.libcxx=libstdc++11, compiler.version=7, os=Linux
  • Options: shared=False
  • Dependencies:
  • Requirements:
  • Package ID: 9bfdcfa2bb925892ecf42e2a018a3f3529826676

ERROR: Missing prebuilt package for 'botan/2.8.0@includeos/stable', 'includeos/0.15.1-5@includeos/latest', 'libcxx/7.0.1@includeos/stable', 'libcxxabi/7.0.1@includeos/stable', 'musl/1.1.18@includeos/stable', 'openssl/1.1.1@includeos/stable', 's2n/0.8@includeos/stable'
Try to build from sources with "--build=missing"
Or read "http://docs.conan.io/en/latest/faq/troubleshooting.html#error-missing-prebuilt-package"


Any ideas on how I can fix this?

Also, I am new to the conan build system as well.

Thanks

@fwsGonzo
Copy link
Member

What happens if you try the profile clang-6.0-linux-x86_64 ?

@lonnietc
Copy link
Author

With that profile, it seems to be able to go through the complete build steps but I get an error once I try to "boot hello"


Setup Ubuntu
$ apt-get install python3-pip python3-dev git cmake clang-6.0 gcc nasm make qemu
$ pip3 install setuptools wheel conan psutil jsonschema
$ conan config install https://github.com/includeos/conan_config.git


Recipe Steps for Hello
$ git clone https://github.com/includeos/hello_world.git
$ mkdir your_build_dir && cd "$_"
$ conan install ../hello_world -pr <your_conan_profile>
$ source activate.sh
$ cmake ../hello_world
$ cmake --build .
$ boot hello


.
.
.
(conanenv) lonnie@lonnie-p7-1451:~/IncludeOS/test/build$ boot hello

Looking for chainloader:
Found /home/lonnie/.conan/data/chainloader/0.15.1-5/includeos/latest/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/chainloader Type: /home/lonnie/.conan/data/chainloader/0.15.1-5/includeos/latest/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/chainloader: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), statically linked, stripped

[ WARNING ] Running with sudo
[sudo] password for lonnie:

[ PROGRAM_FAILURE ] process exited


Everything seems to work through all of the steps this time, but fails to run the "Hello" program

Did I miss something here?
Thanks again

@faerbersteve
Copy link

I am using also Ubuntu 20.04
please try conan install ../hello_world -pr gcc-7.3.0-linux-x86_64 --build=missing
this works for me.

And please check if you can run qemu-system-x86_64
In my case I had to install additional packages for qemu

I think the packages for the profile are missing that's why you need --build=missing

@fwsGonzo
Copy link
Member

You might be hitting a bug in our boot program where it just exits if the bridge isn't created. Try boot --create-bridge hello.

@lonnietc
Copy link
Author

Hi @faerbersteve,

I tried the --build=missing as you suggested, but it could be, for at least that one that I have g++ 9 installed and not gcc-7


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:48 (message):
Could not find compiler set in environment variable CXX:

/usr/bin/g++-7.

Call Stack (most recent call first):
CMakeLists.txt:21 (project)

CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
See also "/home/lonnie/.conan/data/libcxxabi/7.0.1/includeos/stable/build/9bfdcfa2bb925892ecf42e2a018a3f3529826676/CMakeFiles/CMakeOutput.log".
libcxxabi/7.0.1@includeos/stable:
libcxxabi/7.0.1@includeos/stable: ERROR: Package '9bfdcfa2bb925892ecf42e2a018a3f3529826676' build failed
libcxxabi/7.0.1@includeos/stable: WARN: Build folder /home/lonnie/.conan/data/libcxxabi/7.0.1/includeos/stable/build/9bfdcfa2bb925892ecf42e2a018a3f3529826676
ERROR: libcxxabi/7.0.1@includeos/stable: Error in build() method, line 69
cmake = self._configure_cmake()
while calling '_configure_cmake', line 65
cmake.configure(source_folder=source)
ConanException: Error 1 while executing cd '/home/lonnie/.conan/data/libcxxabi/7.0.1/includeos/stable/build/9bfdcfa2bb925892ecf42e2a018a3f3529826676' && cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE="Release" -DCONAN_IN_LOCAL_CACHE="ON" -DCONAN_COMPILER="gcc" -DCONAN_COMPILER_VERSION="7" -DCONAN_CXX_FLAGS="-m64" -DCONAN_SHARED_LINKER_FLAGS="-m64" -DCONAN_C_FLAGS="-m64" -DCONAN_LIBCXX="libstdc++11" -DBUILD_SHARED_LIBS="OFF" -DCMAKE_INSTALL_PREFIX="/home/lonnie/.conan/data/libcxxabi/7.0.1/includeos/stable/package/9bfdcfa2bb925892ecf42e2a018a3f3529826676" -DCMAKE_INSTALL_BINDIR="bin" -DCMAKE_INSTALL_SBINDIR="bin" -DCMAKE_INSTALL_LIBEXECDIR="bin" -DCMAKE_INSTALL_LIBDIR="lib" -DCMAKE_INSTALL_INCLUDEDIR="include" -DCMAKE_INSTALL_OLDINCLUDEDIR="include" -DCMAKE_INSTALL_DATAROOTDIR="share" -DCMAKE_EXPORT_NO_PACKAGE_REGISTRY="ON" -DCONAN_EXPORTED="1" -DLIBCXXABI_LIBCXX_INCLUDES="/home/lonnie/.conan/data/libcxxabi/7.0.1/includeos/stable/source/libcxx/include" -DLIBCXXABI_USE_LLVM_UNWINDER="True" -DLIBCXXABI_ENABLE_SHARED="False" -DLIBCXXABI_ENABLE_STATIC="True" -DLIBCXXABI_ENABLE_STATIC_UNWINDER="True" -DLLVM_PATH="/home/lonnie/.conan/data/libcxxabi/7.0.1/includeos/stable/source/llvm" -Wno-dev '/home/lonnie/.conan/data/libcxxabi/7.0.1/includeos/stable/source/libcxxabi'
l
onnie@lonnie-p7-1451:~/IncludeOS/build$ g++ --version
g++ (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


Hi, @fwsGonzo -- The "boot --create-bridge hello" also crashed

Maybe a a fresh install will do the trick.
Appreciate the help eveyone.

@lonnietc
Copy link
Author

Hi All,

I was able to resolve it, I think.

Had to go through and re-install Qemu.

I removed Qemu and did an overkill for the re-install like this:

sudo apt install qemu qemu-utils qemu-kvm virt-manager libvirt-daemon-system libvirt-clients bridge-utils

and tried it again.


SeaBIOS (version 1.13.0-1ubuntu1)

iPXE (http://ipxe.org) 00:03.0 CA00 PCI2.10 PnP PMM+07F8C8A0+07ECC8A0 CA00
Press Ctrl-B to configure iPXE (PCI 00:03.0)...

Booting from ROM..* Multiboot begin: 0x9500

  • Multiboot cmdline @ 0x22e019: /home/lonnie/.conan/data/chainloader/0.15.1-5/includeos/latest/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bin/chainloader"
  • Multiboot end: 0x22e09c
  • Module list @ 0x22e000
    • Module @ 0x22f000
    • Args: hello ""
    • End: 0x3939a8
  • Multiboot end: 0x3939a8
    Booted with multiboot
    • Boot flags: 0x24f

    • Valid memory (130559 Kib):
      0x00000000 - 0x0009fbff (639 Kib)
      0x00100000 - 0x07fdffff (129920 Kib)

    • Booted with parameters @ 0x22e019: /home/lonnie/.conan/data/chainloader/0.15.1-5/includeos/latest/package/5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9/bi"

    • Multiboot provided memory map (7 entries @ 0x9000)
      0x0000000000 - 0x000009fbff FREE (639 Kb.)
      0x000009fc00 - 0x000009ffff RESERVED (1 Kb.)
      0x00000f0000 - 0x00000fffff RESERVED (64 Kb.)
      0x0000100000 - 0x0007fdffff FREE (129920 Kb.)
      0x0007fe0000 - 0x0007ffffff RESERVED (128 Kb.)
      0x00feffc000 - 0x00feffffff RESERVED (16 Kb.)
      0x00fffc0000 - 0x00ffffffff RESERVED (256 Kb.)

OS loaded with 1 modules
* hello "" @ 0x22f000 - 0x3939a8, size: 1460648b

  • Multiboot begin: 0x9500
  • Multiboot end: 0x326840
    [x86_64 PC] constructor
    [ Machine ] Initializing heap
    [ Machine ] Main memory detected as 130441024 b
    [ Machine ] Reserving 1048576 b for machine use
    Booted with multiboot
    • Boot flags: 0x24f

    • Valid memory (130559 Kib):
      0x00000000 - 0x0009fbff (639 Kib)
      0x00100000 - 0x07fdffff (129920 Kib)

    • Booted with parameters @ 0x8000: hello ""

    • Multiboot provided memory map (7 entries @ 0x9000)
      0x0000000000 - 0x000009fbff FREE (639 Kb.)
      0x000009fc00 - 0x000009ffff RESERVED (1 Kb.)
      0x00000f0000 - 0x00000fffff RESERVED (64 Kb.)
      0x0000100000 - 0x0007fdffff FREE (129920 Kb.)
      0x0007fe0000 - 0x0007ffffff RESERVED (128 Kb.)
      0x00feffc000 - 0x00feffffff RESERVED (16 Kb.)
      0x00fffc0000 - 0x00ffffffff RESERVED (256 Kb.)
      ================================================================================
      IncludeOS 0.15.1-5 (x86_64 / 64-bit)
      +--> Running [ Hello world - OS included ]

 +--> WARNING: No good random source found: RDRAND/RDSEED instructions not available.
 +--> FATAL: Random source check failed. Terminating.
 +-->        To disable this check, re-run cmake with "-DFOR_PRODUCTION=OFF".
     [ Kernel ] Stopping service
     [ Kernel ] Powering off

[ SUCCESS ] process exited

 - - - - - - 
 
Can this approach also produce an ISO?  Just wondering.

Thanks again so very much and I want to try some other examples.

Are there any graphic examples with libraries that are not tied to X11?
Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants