Error in mk install in
Hello guys I'm trying to install Inferno on Linux, but I have a problem in the step "mk install" he claims error /usr/bin/ld: ${dotOfile}:/home/myuser/inferno-os/emu/Linux/../port/fns.h:23: multiple definitions of "coherence"; (os.o|main.o|win-x11a.o):/home/myuser/inferno-os/emu/Linux/../port/fns.h:23: defined first here
in these dotOfiles files: kproc-pthreads.o lock.o ipif6-posix.o cmd.o devmnt.o win-x11a.o devdraw.o devfs.o devdup.o devsnarf.o devcmd.o devprog.o devindir.o devmem.o should. devpointer.o devcap.o devssl.o devenv.o devroot.o srv.o devcons.o devcons.o devip.o ipaux.o devsrv.o devprof.o devpipe.o uqid.o dev.o proc.o exportfs.o exportfs.o qio.o parse.o main.o dial.o discall.o cache.o alloc.o hell. env.o dis.o dis.o devtab.o pgrp.o errstr.o chan.o print.o exception.o sysfile.o random.o emu.o
You also hear a multiple definition in libtk/utils.c on line 57 "char * tkfont;"
Comments (6)
-
-
Hello, thank you very much I tested it and it worked for me !!
-
Hi, I have tried that. Unfortunately, it didn’t work for me, it’s successfully built, However, emu gives segmentation fault.
➜ bin git:(fix-gcc10-linker-error) ✗ emu [Emuinit] Broken: "sys: segmentation violation addr=0x9799970"
my system info:
➜ bin git:(fix-gcc10-linker-error) ✗ cat /etc/fedora-release Fedora release 33 (Thirty Three) ➜ bin git:(fix-gcc10-linker-error) ✗ gcc --version gcc (GCC) 10.2.1 20201125 (Red Hat 10.2.1-9) Copyright (C) 2020 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.
-
I can confirm this issue. Gentoo, gcc-10.3.0.
-
I can add same
sys: segmentation violation
error happens on inferno installed 3 years ago (and AFAIR which worked at that time), so looks like this error happens because of some host OS updates and not because of some Inferno change. -
I can confirm that adding the -fcommon option to root/mkfiles/mkfile-[OStype]-[cpu type] file fixes the issue. In my case it was the mkfiles/mkfile-Linux-386 that needed to be modified.
- Log in to comment
This is due to gcc >= 10 defaulting to -fno-common. See https://gcc.gnu.org/gcc-10/porting_to.html#common
Adding the
-fcommon
flag fixed it for me but PR #7 is a better fix.