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

Webserver project not compiling anymore from a clean/fresh installation #22

Open
hugusmaximus opened this issue Mar 25, 2024 · 3 comments

Comments

@hugusmaximus
Copy link
Contributor

Hi,

it was some time I didn't tried to build the seL4 webserver demo, and today I got a nasty error...
It is a fresh install (from an empty dir), I mean, following "https://docs.sel4.systems/projects/sel4webserver/" I did:

repo init -u https://github.com/seL4/sel4webserver-manifest.git
repo sync
mkdir build
cd build
../init-build.sh -DPLATFORM=qemu-arm-virt
ninja

and the full error:

from /home/hugo/sel4_linux_guest_qemu_virt/build/docsite-prefix/src/docsite/vendor/bundle/ruby/3.0.0/bin/jekyll:25:in `<main>'
make: *** [Makefile:95: build] Error 1
[374/455] Generating linux_out/.config.old
FAILED: linux_out/.config.old /home/hugo/sel4_linux_guest_qemu_virt/build/linux_out/.config.old 
cd /home/hugo/sel4_linux_guest_qemu_virt/build/linux_out && bash -c "make oldconfig ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- " && bash -c "make prepare ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- " && bash -c "make modules_prepare ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- "
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  SHIPPED scripts/kconfig/zconf.hash.c
  HOSTCC  scripts/kconfig/zconf.tab.o
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --oldconfig Kconfig
#
# configuration written to .config
#
scripts/kconfig/conf  --silentoldconfig Kconfig
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
  WRAP    arch/arm64/include/generated/asm/bugs.h
  (...)
  HOSTCC  scripts/dtc/dtc-parser.tab.o
  HOSTLD  scripts/dtc/dtc
/usr/bin/ld: scripts/dtc/dtc-parser.tab.o:(.bss+0x10): multiple definition of `yylloc'; scripts/dtc/dtc-lexer.lex.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status
make[2]: *** [scripts/Makefile.host:110: scripts/dtc/dtc] Error 1
make[1]: *** [scripts/Makefile.build:555: scripts/dtc] Error 2
make: *** [Makefile:571: scripts] Error 2
FAILED: docsite-prefix/src/docsite-stamp/docsite-build /home/hugo/sel4_linux_guest_qemu_virt/build/docsite-prefix/src/docsite-stamp/docsite-build 
cd /home/hugo/sel4_linux_guest_qemu_virt/build/docsite-prefix/src/docsite && make build
ninja: build stopped: subcommand failed.

any hint what can be going on... ? As this looks like a very specific Linux kernel compilation error...

Thank you in advance.

@hugusmaximus
Copy link
Contributor Author

BTW, my gcc version:

hugo@anakin:~/sel4_linux_guest_qemu_virt/build$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/11/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 11.4.0-1ubuntu1~22.04' --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-XeT9lY/gcc-11-11.4.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04) 

@hugusmaximus
Copy link
Contributor Author

Here:
BPI-SINOVOIP/BPI-M4-bsp#4

there are some nasty workarounds. My question is, may be possible to update the Linux kernel version of this Linux guest seL4 demo so whenever someone blindly follows the instructions of "https://docs.sel4.systems/projects/sel4webserver/" it compiles on a modern box (i.e. Ubuntu 22)?

@hugusmaximus
Copy link
Contributor Author

Or... patching at runtime to modify the offending line in the Linux kernel provided, so modern gcc can compile it without errors... just ideas... :-)

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

1 participant