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

Linker errors while trying to build #325

Open
KSPAtlas opened this issue Sep 26, 2021 · 2 comments
Open

Linker errors while trying to build #325

KSPAtlas opened this issue Sep 26, 2021 · 2 comments

Comments

@KSPAtlas
Copy link

KSPAtlas commented Sep 26, 2021

I'm following the instructions at https://wiki.minix3.org/doku.php?id=developersguide:crosscompiling , yet it still fails at step "Cross-building for x86". Here is what bash ./releasetools/x86_hdimage.sh returned:

Going to build Minix source code...
===> build.sh command:    build.sh -j 1 -m i386 -O ../obj.i386 -D ../obj.i386/destdir.i386 -U -u release
===> build.sh started:    Sun Sep 26 15:32:01 BST 2021
===> MINIX version:       3.4.0
===> MACHINE:             i386
===> MACHINE_ARCH:        i386
===> Build platform:      Linux 5.14.6-artix1-1 x86_64
===> HOST_SH:             /usr/bin/sh
===> No $TOOLDIR/bin/nbmake, needs building.
===> Bootstrapping nbmake
checking for sh... /usr/bin/sh
checking for gcc... cc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for executable suffix... 
checking for object suffix... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking how to run the C preprocessor... cc -E
checking for regex.h... yes
checking for poll.h... yes
checking for regfree in -lregex... no
checking for library containing regfree... none required
checking for setenv... yes
checking for strdup... yes
checking for strerror... yes
checking for strftime... yes
checking for vsnprintf... yes
configure: creating ./config.status
config.status: creating buildmake.sh
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/arch.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/buf.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/compat.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/cond.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/dir.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/for.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/hash.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/job.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/main.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/make.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/make_malloc.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/meta.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/metachar.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/parse.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/str.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/strlist.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/suff.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/targ.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/trace.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/util.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/var.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstAppend.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstAtEnd.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstAtFront.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstClose.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstConcat.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstDatum.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstDeQueue.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstDestroy.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstDupl.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstEnQueue.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstFind.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstFindFrom.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstFirst.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstForEach.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstForEachFrom.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstInit.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstInsert.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstIsAtEnd.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstIsEmpty.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstLast.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstMember.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstNext.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstOpen.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstPrev.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstRemove.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstReplace.c
cc  -O -DDEFSHELL_CUSTOM="/usr/bin/sh" -DHAVE_SETENV=1 -DHAVE_STRDUP=1 -DHAVE_STRERROR=1 -DHAVE_STRFTIME=1 -DHAVE_VSNPRINTF=1  -c /home/ksp/kspminix/minix/tools/make/../../usr.bin/make/lst.lib/lstSucc.c
cc  -O -o nbmake *.o  
/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 ***
@petershh
Copy link

Hello,

This is known problem. You can apply this patch to fix build process: #322 .

@stux2000
Copy link

Note to future self: this is a duplicate of issue 316.

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