Giter Club home page Giter Club logo

sel4webserver-manifest's Introduction

sel4webserver-manifest's People

Contributors

jashank avatar kent-mcleod avatar lsf37 avatar sel4-ci avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

tupelo-shen

sel4webserver-manifest's Issues

Fresh build hangs in ruby bundle install sudo on systems with a fresh ruby installation.

On my sort-of clean Ubuntu 20.04.3 LTS system, compiling the webserver example hangs without showing an error message or explaining why it hangs.

Steps to reproduce:

  1. Clean your ruby installation, assume we are using ruby for the first time for this example:
    user@box:~$ sudo apt purge ruby
    [sudo] password for user: 
    [...]
    The following packages were automatically installed and are no longer required:
      fonts-lato ruby-minitest ruby-net-telnet ruby-power-assert ruby-test-unit ruby-xmlrpc ruby2.7-doc rubygems-integration
    Use 'sudo apt autoremove' to remove them.
    The following packages will be REMOVED:
      bundler* libruby2.7* rake* ruby* ruby-bundler* ruby-dev* ruby-molinillo* ruby-net-http-persistent* ruby-thor* ruby2.7* ruby2.7-dev*
    0 upgraded, 0 newly installed, 11 to remove and 0 not upgraded.
    After this operation, 21,1 MB disk space will be freed.
    Do you want to continue? [Y/n] 
    [...]
    dpkg: warning: while removing ruby2.7, directory '/var/lib/gems/2.7.0' not empty so not removed
    [...]
    user@box:~$ sudo rm -rf /var/lib/gems/2.7.0
    user@box:~$ sudo apt install bundler
    [...]
    The following additional packages will be installed:
      libruby2.7 rake ruby ruby-bundler ruby-dev ruby-molinillo ruby-net-http-persistent ruby-thor ruby2.7 ruby2.7-dev
    Suggested packages:
      ri
    The following NEW packages will be installed:
      bundler libruby2.7 rake ruby ruby-bundler ruby-dev ruby-molinillo ruby-net-http-persistent ruby-thor ruby2.7 ruby2.7-dev
    0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
    Need to get 4.240 kB of archives.
    After this operation, 21,1 MB of additional disk space will be used.
    Do you want to continue? [Y/n]
    
  2. Follow the webserver example
    user@box:~/sel4-webserver-arm$ repo init -u https://github.com/SEL4PROJ/sel4webserver-manifest.git
    user@box:~/sel4-webserver-arm$ repo sync
    user@box:~/sel4-webserver-arm$ mkdir build
    user@box:~/sel4-webserver-arm$ cd build
    user@box:~/sel4-webserver-arm/build$ ../init-build.sh -DPLATFORM=qemu-arm-virt
    user@box:~/sel4-webserver-arm/build$ ninja
    
  3. The installation is hanging somewhere around the steps lighttpd or linux_out.
  4. Checking the processes, the installer is blocking on expecting me to provide my sudo password:
    user@box:~$ ps auxf
    [...]
    user        3283  0.0  0.0  11352  5684 pts/1    Ss   10:03   0:00  |   \_ bash
    user       32547  0.0  0.0   9932  7324 pts/1    S+   10:15   0:00  |   |   \_ ninja
    user       36606  0.0  0.0   2616   540 pts/1    T    10:15   0:00  |   |       \_ /bin/sh -c cd /home/user/sel4-webserver-arm/build/docsite-prefix/src/docsite && make build
    user       36608  0.0  0.0   8940  2780 pts/1    T    10:15   0:00  |   |           \_ make build
    user       41264  0.2  0.3 2299292 174908 pts/1  Tl   10:16   0:02  |   |               \_ /usr/bin/ruby /usr/bin/bundle install
    user       41314  0.0  0.0   2620   604 pts/1    T    10:16   0:00  |   |                   \_ sh -c sudo -k -p "  Your user account isn't allowed to install to the system RubyGems.   You can cancel this ins
    root       41315  0.0  0.0  11760  4492 pts/1    T    10:16   0:00  |   |                       \_ sudo -k -p   Your user account isn't allowed to install to the system RubyGems.   You can cancel this instal
    
    
    user@box:~$ cat /proc/41314/cmdline
    sh-csudo -k -p "
    
    Your user account isn't allowed to install to the system RubyGems.
      You can cancel this installation and run:
    
          bundle install --path vendor/bundle
    
      to install the gems into ./vendor/bundle/, or you can enter your password
      and install the bundled gems to RubyGems using sudo.
    
      Password: " true
    
  5. Unfortunately, it even looks like the non-interactive install pipeline is setup in a nice way where stdin is wired to /dev/null and I cannot simply pipe my password to stdin via the proc file descriptor:
    user@box:~$ ls -lah /proc/41314/fd
    total 0
    dr-x------ 2 user user  0 Okt 17 10:35 .
    dr-xr-xr-x 9 user user  0 Okt 17 10:16 ..
    lr-x------ 1 user user 64 Okt 17 10:35 0 -> /dev/null
    l-wx------ 1 user user 64 Okt 17 10:35 1 -> 'pipe:[69249]'
    l-wx------ 1 user user 64 Okt 17 10:35 2 -> 'pipe:[69249]'
    
  6. The installation hangs and it is not obvious how to continue.

As a workaround to continue, I did a alias yolo='sudo /usr/sbin/visudo' && yolo and added user ALL=(ALL) NOPASSWD: ALL (where user is my username) at the bottom of the file.

Building for qemu-arm-virt fails in init-build.sh

Building for qemu-arm-virt fails:

~/sel4-webserver-arm$ mkdir build/
~/sel4-webserver-arm$ cd build/
~/sel4-webserver-arm/build$ ../init-build.sh -DPLATFORM=qemu-arm-virt
loading initial cache file /home/user/sel4-webserver-arm/projects/webserver/settings.cmake
-- Found seL4: /home/user/sel4-webserver-arm/kernel  
-- Default cpu specified for virt board: cortex-a53
-- QEMU MEMORY is: 2048
CMake Error at /home/user/sel4-webserver-arm/kernel/src/plat/qemu-arm-virt/config.cmake:73 (string):
  string sub-command STRIP requires two arguments.
Call Stack (most recent call first):
  /home/user/sel4-webserver-arm/kernel/configs/seL4Config.cmake:195 (include)
  /home/user/sel4-webserver-arm/kernel/FindseL4.cmake:21 (include)
  settings.cmake:84 (sel4_configure_platform_settings)


-- 
-- Default cpu specified for virt board: cortex-a53
-- QEMU MEMORY is: 2048
CMake Error at /home/user/sel4-webserver-arm/kernel/src/plat/qemu-arm-virt/config.cmake:73 (string):
  string sub-command STRIP requires two arguments.
Call Stack (most recent call first):
  /home/user/sel4-webserver-arm/kernel/configs/seL4Config.cmake:195 (include)
  /home/user/sel4-webserver-arm/kernel/FindseL4.cmake:21 (include)
  settings.cmake:84 (sel4_configure_platform_settings)
  CMakeLists.txt:14 (include)


-- 
-- The C compiler identification is GNU 9.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/aarch64-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc
-- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found camkes-arm-vm: /home/user/sel4-webserver-arm/projects/camkes-arm-vm  
-- Found camkes-tool: /home/user/sel4-webserver-arm/projects/camkes-tool  
-- Found global-components: /home/user/sel4-webserver-arm/projects/global-components  
-- Found camkes-vm: /home/user/sel4-webserver-arm/projects/camkes-vm  
-- Found camkes-vm-images: /home/user/sel4-webserver-arm/projects/camkes-vm-images  
-- Found sel4_projects_libs: /home/user/sel4-webserver-arm/projects/seL4_projects_libs  
-- Found elfloader-tool: /home/user/sel4-webserver-arm/tools/seL4/elfloader-tool  
-- Found musllibc: /home/user/sel4-webserver-arm/projects/musllibc  
-- Found util_libs: /home/user/sel4-webserver-arm/projects/util_libs  
-- Found seL4_libs: /home/user/sel4-webserver-arm/projects/seL4_libs  
-- Found projects_libs: /home/user/sel4-webserver-arm/projects/projects_libs  
-- Found capdl: /home/user/sel4-webserver-arm/projects/capdl  
-- /home/user/sel4-webserver-arm/build/kernel/gen_headers/plat/machine/devices_gen.h is out of date. Regenerating from DTB...
WARNING:root:Only mapping 4096/65536 bytes from node /intc@8000000, region 0. Set kernel_size in YAML to silence.
WARNING:root:Only mapping 4096/65536 bytes from node /intc@8000000, region 1. Set kernel_size in YAML to silence.
WARNING:root:Only mapping 4096/65536 bytes from node /intc@8000000, region 2. Set kernel_size in YAML to silence.
interrupts for device /pl011@9000000
interrupts for device /intc@8000000
interrupts for device /timer
-- CPIO test cpio_reproducible_flag PASSED
-- Detecting cached version of: capDL-tool
-- Found Git: /usr/bin/git (found version "2.25.1") 
--   Found valid cache entry for capDL-tool
-- Found sel4runtime: /home/user/sel4-webserver-arm/projects/sel4runtime  
-- Performing Test compiler_arch_test
-- Performing Test compiler_arch_test - Success
-- libmuslc architecture: 'aarch64' (from KernelSel4Arch 'aarch64')
-- Detecting cached version of: musllibc
--   Not found cache entry for musllibc - will build from source
BenchUtiliz not available, as KernelArmExportPMUUser is OFF
-- Found camkes-vm-linux: /home/user/sel4-webserver-arm/projects/camkes-vm-linux  
-- Found lighttpd: /home/user/sel4-webserver-arm/projects/webserver/lighttpd  
-- Found docsite: /home/user/sel4-webserver-arm/projects/webserver/docsite  
-- /home/user/sel4-webserver-arm/build/ast.pickle is out of date. Regenerating...
-- /home/user/sel4-webserver-arm/build/camkes-gen.cmake is out of date. Regenerating...
-- Configuring incomplete, errors occurred!
See also "/home/user/sel4-webserver-arm/build/CMakeFiles/CMakeOutput.log".

Going to the specified file sel4-webserver-arm/kernel/src/plat/qemu-arm-virt/config.cmake:73, I see:

string(STRIP ${QEMU_OUTPUT_MESSAGE} QEMU_OUTPUT_MESSAGE)

Replacing this line with

string(STRIP "${QEMU_OUTPUT_MESSAGE}" QEMU_OUTPUT_MESSAGE)

makes the build succeed for me.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.