Cross-compiling from MacOS

187 views
Skip to first unread message

Héctor Marqués

unread,
Jan 19, 2021, 6:47:57 PM1/19/21
to minix3
Hi,
I am trying to follow https://wiki.minix3.org/doku.php?id=releases:3.2.1:developersguide:crosscompiling

But I am already stuck in: sh build.sh -U -mi386 -O ../build tools

It complains about "implicit declaration of function 'mi_vector_hash' is invalid in C99 [-Werror,-Wimplicit-function-declaration]".

Could anyone provide me some guidance on how to fix that error?

Thank you in advance!


- HOST HARDWARE: MacBook Air (Retina, 13-inch, 2018)
- HOST OS: macOS Catalina Version 10.15.7 (19H2)
- HOST UNAME: Darwin-19.6.0-x86_64
- BRANCH: master
- COMMIT: 4db99f4012570a577414fe2a43697b2f239b699e
- LOGS EXCERPT:

#   compile  compat/cdbr.lo
cc -O   -no-cpp-precomp -I. -I./include -I/Users/user/minixsrc/tools/compat -I/Users/user/minixsrc/tools/compat/sys  -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D__DBINTERFACE_PRIVATE -c -o cdbr.lo.o    /Users/user/minixsrc/tools/compat/../../common/lib/libc/cdb/cdbr.c

/Users/user/minixsrc/tools/compat/../../common/lib/libc/cdb/cdbr.c:286:2: error: implicit declaration of function 'mi_vector_hash' is

      invalid in C99 [-Werror,-Wimplicit-function-declaration]

        mi_vector_hash(key, key_len, cdbr->seed, hashes);

        ^

1 error generated.



*** Failed target:  cdbr.lo

*** Failed command: cc -O -no-cpp-precomp -I. -I./include -I/Users/user/minixsrc/tools/compat -I/Users/user/minixsrc/tools/compat/sys -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64 -D__DBINTERFACE_PRIVATE -c -o cdbr.lo.o /Users/user/minixsrc/tools/compat/../../common/lib/libc/cdb/cdbr.c

*** Error code 1



Stop.

nbmake[3]: stopped in /Users/user/minixsrc/tools/compat



*** Failed target:  dependall

*** Failed command: cd "/Users/user/minixsrc/tools/compat"; /Users/user/minixsrc/../build/tooldir.Darwin-19.6.0-x86_64/bin/nbmake realall

*** Error code 1



Stop.

nbmake[2]: stopped in /Users/user/minixsrc/tools/compat



*** Failed target:  dependall-compat

*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/Users/user/minixsrc/tools" ;; *) this="${dir}/"; real="/Users/user/minixsrc/tools/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /Users/user/minixsrc/../build/tooldir.Darwin-19.6.0-x86_64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget compat dependall

*** Error code 1



Stop.

nbmake[1]: stopped in /Users/user/minixsrc/tools



*** Failed target:  build_install

*** Failed command: _makedirtarget() { dir="$1"; shift; target="$1"; shift; case "${dir}" in /*) this="${dir}/"; real="${dir}" ;; .) this=""; real="/Users/user/minixsrc/tools" ;; *) this="${dir}/"; real="/Users/user/minixsrc/tools/${dir}" ;; esac; show=${this:-.}; echo "${target} ===> ${show%/}${1:+ (with: $@)}"; cd "${real}" && /Users/user/minixsrc/../build/tooldir.Darwin-19.6.0-x86_64/bin/nbmake _THISDIR_="${this}" "$@" ${target}; }; _makedirtarget . dependall-host-mkdep dependall-compat dependall-binstall

*** Error code 1



Stop.

nbmake: stopped in /Users/user/minixsrc/tools



ERROR: Failed to make build_install in "tools"

*** BUILD ABORTED ***

stux...@gmail.com

unread,
Jan 24, 2021, 10:17:28 PM1/24/21
to minix3
Hello,
I didn't think anybody had reported a successful Mac OS build until I saw the table on that page.  Mind you I just realized why: that's an older version of the page geared towards Minix version 3.2.1.  Is that the version you're trying to compile or are you trying to compile the current master branch?  The latest version of the guide can be found here:
Please be aware that compilation tools have changed a bit in the last 5-10 years and issues have started to crop up.  It seems that compiling with older OSes (usually in a VM) may yield better results.  You can also compile within Minix, although that can be a slower process.  Sorry I can't be of more help at this time, but feel free to keep asking questions!

Thanks,
-stux

Héctor Marqués

unread,
Jan 25, 2021, 7:21:05 PM1/25/21
to minix3
Hello stux,
thank you for your response :)

I was trying to compile master. I will attempt to follow the the guide of the url you passed with a VM.

Thanks!
Reply all
Reply to author
Forward
0 new messages