-
Notifications
You must be signed in to change notification settings - Fork 509
corert for RHEL/Centos #2778
Comments
We have not gotton to building CoreRT for RHEL or Centos yet; however it should be pretty straightforward to fix things up to make it work. @cocotr Would you like to give it a try? The one obstacle where you would need our help is nuget package publishing. @ellismg Do we have "build from source" for .NET Core documented already? I am wondering whether we can have corert branch of it that would allow folks to build corert for platform that we do not have yet, without relying on nuget packages. |
Definitely I would like to give it a try. |
@cocotr I just quickly tried to build CoreRT on CentOS 7. I've found that besides the need to fix the managed building, there is one problem in the native code build. The fix is to replace |
I would do it on RHEL/Centos natively first. Cross-compilation from Windows to Unix is harder orthogonal problem. |
what are prerequisites for building CoreRT on Centos 7 ? Similar as for Ubuntu ? Do you have any documentation? |
In my CentOS 7 box, I tried the following: # add some deps
yum install git libunwind libunwind-devel cmake
yum groupinstall "Development Tools"
# then fetch the clang3.9.1
# source: https://copr.fedorainfracloud.org/coprs/alonid/llvm-3.9.1/
yum install yum-utils
yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/alonid/llvm-3.9.1/repo/epel-7/alonid-llvm-3.9.1-epel-7.repo
yum install llvm-3.9.1 clang-3.9.1 --enablerepo=alonid-llvm-3.9.1
# clone repo and build
git clone https://github.com/dotnet/corert corert && cd $_
PATH=$PATH:/opt/llvm-3.9.1/bin ./build.sh After 100% of progress, I got these errors:
Then I applied this patch: --- a/src/Native/libunwind/src/DwarfParser.hpp
+++ b/src/Native/libunwind/src/DwarfParser.hpp
@@ -12,6 +12,7 @@
#ifndef __DWARF_PARSER_HPP__
#define __DWARF_PARSER_HPP__
+#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h> to get it fixed. Now onto the managed / CLI story.. |
This fixes the native build error on CentOS 7 dotnet#2778 (comment). Though the managed build subsequently fails with: ```sh CoreRT native components successfully built. ~/corert Installing dotnet cli... Restoring BuildTools version 1.0.26-prerelease-00821-01... Failed to initialize CoreCLR, HRESULT: 0x80131500 ERROR: Could not restore build tools correctly. See '/root/corert/init-tools.log' for more details.1 Initializing BuildTools... /root/corert/buildscripts/../init-tools.sh: line 121: /root/corert/packages/Microsoft.DotNet.BuildTools/1.0.26-prerelease-00821-01/lib/init-tools.sh: No such file or directory ERROR: An error occured when trying to initialize the tools. Please check '/root/corert/init-tools.log' for more details.1 Using CLI tools version: 1.0.0-preview3-003223 ```
Hi, |
Similar to #2856 (comment), current master (bad4b3e) builds on CentOS with the following Dockerfile (without tests): FROM centos:7
# it should pick the latest in 7 (atm 7.3.1611)
RUN cat /etc/*-release
RUN yum -y -q install epel-release
RUN yum-config-manager --add-repo https://copr.fedorainfracloud.org/coprs/alonid/llvm-3.9.1/repo/epel-7/alonid-llvm-3.9.1-epel-7.repo
RUN yum -y -q update
RUN yum -y -q install \
git cmake icu libicu-devel binutils make \
lttng-ust liblttng-ust-devel libuuid-devel libunwind libunwind-devel \
llvm-3.9.1 clang-3.9.1 lldb-3.9.1 --enablerepo=alonid-llvm-3.9.1
ENV PATH /opt/llvm-3.9.1/bin:$PATH
RUN git clone https://github.com/dotnet/corert -b master --single-branch corert \
&& cd $_ \
&& ./build.sh skiptests With tests, |
Hello,
Is it possible to build native executables for RHEL/Centos? or only Ubuntu is supported?
The text was updated successfully, but these errors were encountered: