Stichting-MINIX-Research-Foundation / minix

Official MINIX sources - Automatically replicated from gerrit.minix3.org
Other
3.06k stars 993 forks source link

Cross-compiling MINIX 3 on Debian Stretch doesn't work #229

Open boricj opened 7 years ago

boricj commented 7 years ago

As reported to the MINIX 3 gurus:

#      link  llvm-clang-tblgen/nbclang-tblgen
c++ -O -O2 -fno-rtti -fno-exceptions -I/home/boricj/Documents/test/minix/../obj.i386/tooldir.Linux-4.9.0-3-amd64-x86_64/include/compat -I/home/boricj/Documents/test/minix/tools/compat -DHAVE_NBTOOL_CONFIG_H=1 -D_FILE_OFFSET_BITS=64  -I. -I/home/boricj/Documents/test/minix/tools/llvm-clang-tblgen/../../external/bsd/llvm/bin/clang-tblgen/../../dist/clang/include -I/home/boricj/Documents/test/minix/tools/llvm-clang-tblgen/../../external/bsd/llvm/bin/clang-tblgen/../../dist/lld/include -I/home/boricj/Documents/test/minix/tools/llvm-clang-tblgen/../../external/bsd/llvm/bin/clang-tblgen/../../dist/llvm/include -I/home/boricj/Documents/test/minix/tools/llvm-clang-tblgen/../../external/bsd/llvm/bin/clang-tblgen/../../dist/mclinker/include -I/home/boricj/Documents/test/minix/tools/llvm-clang-tblgen/../../external/bsd/llvm/bin/clang-tblgen/../../dist/lldb/include -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCLANG_ENABLE_STATIC_ANALYZER -I/home/boricj/Documents/test/minix/../obj.i386/tools/llvm-include -I/home/boricj/Documents/test/minix/../obj.i386/tools/llvm/config/include -I/home/boricj/Documents/test/minix/../obj.i386/tools/llvm/config/tools/clang/include -I/home/boricj/Documents/test/minix/tools/llvm-clang-tblgen/../../external/bsd/llvm/bin/clang-tblgen/../../config/mclinker -std=c++11  -I. -I/home/boricj/Documents/test/minix/tools/llvm-clang-tblgen/../../external/bsd/llvm/bin/clang-tblgen/../../dist/clang/include -I/home/boricj/Documents/test/minix/tools/llvm-clang-tblgen/../../external/bsd/llvm/bin/clang-tblgen/../../dist/lld/include -I/home/boricj/Documents/test/minix/tools/llvm-clang-tblgen/../../external/bsd/llvm/bin/clang-tblgen/../../dist/llvm/include -I/home/boricj/Documents/test/minix/tools/llvm-clang-tblgen/../../external/bsd/llvm/bin/clang-tblgen/../../dist/mclinker/include -I/home/boricj/Documents/test/minix/tools/llvm-clang-tblgen/../../external/bsd/llvm/bin/clang-tblgen/../../dist/lldb/include -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCLANG_ENABLE_STATIC_ANALYZER -I/home/boricj/Documents/test/minix/../obj.i386/tools/llvm-include -I/home/boricj/Documents/test/minix/../obj.i386/tools/llvm/config/include -I/home/boricj/Documents/test/minix/../obj.i386/tools/llvm/config/tools/clang/include -I/home/boricj/Documents/test/minix/tools/llvm-clang-tblgen/../../external/bsd/llvm/bin/clang-tblgen/../../config/mclinker   -o nbclang-tblgen ClangASTNodesEmitter.lo ClangAttrEmitter.lo ClangCommentCommandInfoEmitter.lo ClangCommentHTMLNamedCharacterReferenceEmitter.lo ClangCommentHTMLTagsEmitter.lo ClangDiagnosticsEmitter.lo ClangSACheckersEmitter.lo NeonEmitter.lo TableGen.lo -L/home/boricj/Documents/test/minix/../obj.i386/tooldir.Linux-4.9.0-3-amd64-x86_64/lib -lnbcompat -lrt -lz -L/home/boricj/Documents/test/minix/../obj.i386/tools/llvm-lib/libLLVMTableGen -lLLVMTableGen -L/home/boricj/Documents/test/minix/../obj.i386/tools/llvm-lib/libLLVMSupport -lLLVMSupport -ldl  -lpthread
/home/boricj/Documents/test/minix/../obj.i386/tools/llvm-lib/libLLVMSupport/libLLVMSupport.a(Process.lo): In function `llvm::sys::Process::FileDescriptorHasColors(int)':
Process.cpp:(.text+0xd06): undefined reference to `setupterm'
Process.cpp:(.text+0xd30): undefined reference to `tigetnum'
Process.cpp:(.text+0xd39): undefined reference to `set_curterm'
Process.cpp:(.text+0xd41): undefined reference to `del_curterm'
collect2: error: ld returned 1 exit status

Adding -ltermcap to the command results in a successful link.

Host system is a Debian Stretch (9.0). It works on Debian Jessie (8.7).

adinriv commented 6 years ago

The same error is happening within Ubuntu 17.10.

@boricj how did you pass the flag to the build.sh or ./releasetools/x86_hdimage.sh?

boricj commented 6 years ago

I copy-pasted the failed command in the terminal and added the flag by hand.

takakawa commented 6 years ago

I used HOST_LDFLAGS=-ltermcap ./releasetools/x86_cdimage.sh to build successfully

SmartPolarBear commented 5 years ago

Have someone found a solution ? I have been trapped by this issue for days.

stux2000 commented 4 years ago

It seems pull request 301 solves this issue? Can anyone confirm?