compile minix3 failed on centos8.5

42 views
Skip to first unread message

Leo Chen

unread,
Jun 14, 2024, 12:30:34 PMJun 14
to minix3
I have cross compiled minix3 source code for x86 on CentOS 8.5(on virtual machine),but it failed. I checked and build dependencies were all installed.
Looking at the logs I see that it might have something to do with a failed directory creation in llvm, but I don't know anything about llvm.
If anyone has any leads, please let me know, I would greatly appreciate it.  

minix version : 3.4.0
git commit: 4db99f401
changes: after git clone to the local, nothing changes.
kernel: 4.18.0-348.7.1.el8_5.x86_64
gcc version: 8.5.0 20210514 (Red Hat 8.5.0-4) (GCC)
clang version: 12.0.1 (Red Hat 12.0.1-4.module_el8.5.0+1025+93159d6c)

full log was attached.

log

Justin Handville

unread,
Jun 18, 2024, 12:39:13 PMJun 18
to minix3
The error is further up. It appears to be a problem with evaluating whether a unique pointer is populated in LLVM. The compiler you are using is more strict about implicit conversions to boolean.

dist/llvm/include/llvm/IR/ValueMap.h: In member function 'bool llvm::ValueMap<KeyT, ValueT, Config>::hasMD() const': dist/llvm/include/llvm/IR/ValueMap.h:104:31: error: cannot convert 'const std::unique_ptr<llvm::DenseMap<const llvm::Metadata*, llvm::TrackingMDRef> >' to 'bool' in return bool hasMD() const { return MDMap; } ^~~~~
Try patching this line as follows:

bool hasMD() const { return bool(MDMap); }
That is in line with a later patch. This has been fixed in the upstream version of LLVM.

Justin Handville

unread,
Jun 18, 2024, 12:42:34 PMJun 18
to minix3
Sorry... my last line response was garbled by Google Groups formatting. I'll try again.


The error is further up. It appears to be a problem with evaluating whether a unique pointer is populated in LLVM. The compiler you are using is more strict about implicit conversions to boolean.

dist/llvm/include/llvm/IR/ValueMap.h: In member function 'bool llvm::ValueMap<KeyT, ValueT, Config>::hasMD() const': 

dist/llvm/include/llvm/IR/ValueMap.h:104:31: error: cannot convert 'const std::unique_ptr<llvm::DenseMap<const llvm::Metadata*, llvm::TrackingMDRef> >' to 'bool' in 

return bool hasMD() const { return MDMap; }

Try patching this line as follows:

bool hasMD() const { return bool(MDMap); }

That is in line with a later patch. This has been fixed in the upstream version of LLVM.

Reply all
Reply to author
Forward
0 new messages