rumpkernel / rumprun

The Rumprun unikernel and toolchain for various platforms
Other
1.14k stars 128 forks source link

.build-rr.sh hw nbmake error: multiple definition of `debug_file' #138

Closed trholding closed 3 months ago

trholding commented 1 year ago

I tried a build with ./build-rr.sh hw but it errored out. Any hints to fix this would be appreciated.

Last lines of log:

cc -o nbmake *.o -L/home/linux/experiments/rumprun/obj-amd64-hw/buildrump.sh 
/usr/bin/ld: buf.o:(.bss+0x0): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
/usr/bin/ld: compat.o:(.bss+0x0): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
/usr/bin/ld: cond.o:(.bss+0x0): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
/usr/bin/ld: dir.o:(.bss+0x8): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
/usr/bin/ld: for.o:(.bss+0x0): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
/usr/bin/ld: hash.o:(.bss+0x0): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
/usr/bin/ld: job.o:(.bss+0x20): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
/usr/bin/ld: main.o:(.bss+0x1090): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
/usr/bin/ld: make.o:(.bss+0x0): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
/usr/bin/ld: make_malloc.o:(.bss+0x0): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
/usr/bin/ld: parse.o:(.bss+0x18): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
/usr/bin/ld: str.o:(.bss+0x0): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
/usr/bin/ld: suff.o:(.bss+0x0): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
/usr/bin/ld: targ.o:(.bss+0x0): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
/usr/bin/ld: trace.o:(.bss+0x8): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
/usr/bin/ld: util.o:(.bss+0x0): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
/usr/bin/ld: var.o:(.bss+0x28): multiple definition of `debug_file'; arch.o:(.bss+0x0): first defined here
collect2: error: ld returned 1 exit status

ERROR: Build of nbmake failed
*** BUILD ABORTED ***
>> ERROR:
>> build.sh makewrapper failed

Gcc Version:

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/13.1.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --enable-languages=ada,c,c++,d,fortran,go,lto,objc,obj-c++ --enable-bootstrap --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --with-build-config=bootstrap-lto --with-linker-hash-style=gnu --with-system-zlib --enable-__cxa_atexit --enable-cet=auto --enable-checking=release --enable-clocale=gnu --enable-default-pie --enable-default-ssp --enable-gnu-indirect-function --enable-gnu-unique-object --enable-libstdcxx-backtrace --enable-link-serialization=1 --enable-linker-build-id --enable-lto --enable-multilib --enable-plugin --enable-shared --enable-threads=posix --disable-libssp --disable-libstdcxx-pch --disable-werror
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 13.1.1 20230429 (GCC) 

Bash Version

bash --version
GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

GNU / Linux version:

linux 6.3.2-arch1-1 #1 SMP PREEMPT_DYNAMIC Thu, 11 May 2023 16:40:42 +0000 x86_64 GNU/Linux

(Archlinux)
pandaWall commented 9 months ago

You need to add static to the variable defined in the header file

trholding commented 9 months ago

You need to add static to the variable defined in the header file

Hi thanks, will try. Do you know any fork by chance that works with / has a more updated netbsd-src?

pandaWall commented 9 months ago

git clone https://github.com/rumpkernel/rumprun.git cd rumprun git submodule update --init --recursive cd src-netbsd

trholding commented 3 months ago

Thank you