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

Add centos7 binaries #135

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -341,3 +341,9 @@ ASALocalRun/
.mfractor/
cmake/
cmake-*

# OS X
.DS_Store

# Centos Build
centos7release/
6 changes: 6 additions & 0 deletions dockerfiles/centos-build/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM centos/devtoolset-7-toolchain-centos7

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was a way to build easily locally on any machine w/ docker installed.
This should also work on azure-pipelines build agents but I did not hook that up here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Ben,

Thank you for the PR. Did you test how will consumer of the package in .net know which DLL to load or where to load it from?

Thanks!
-Sergei

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also could you please sign the required CLA above?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi Sergei
I'm waiting to receive approval to sign the CLA hopefully I can to that soon.
The dll from the centos.7 folder gets published when this command is run:
dotnet publish -r centos.7-x64
If you publish for linux-x64 you get the generic version.

USER 0
RUN yum install epel-release -y
# Blingfire needs Cmake3
RUN yum install cmake3 -y
USER 1001
Empty file.
10 changes: 10 additions & 0 deletions dockerfiles/centos-build/build-centos7.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
rm -rf ../../centos7release

docker build . -t blingfire-centos7-build

docker run -it \
--mount type=bind,source="$(pwd)/../..",target=/BlingFire \
docker.io/library/blingfire-centos7-build /bin/bash -c \
"cd /BlingFire && mkdir centos7release && cd centos7release && cmake3 -DCMAKE_BUILD_TYPE=Release .. && make"

cp ../../centos7release/libblingfiretokdll.so ../../nuget/lib/centos.7-x64
9 changes: 7 additions & 2 deletions nuget/lib/BlingFireNuget.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
<PackageReleaseNotes>BlingFire wrapper for .Net Core, see https://github.com/microsoft/BlingFire for details.</PackageReleaseNotes>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Version>0.1.8</Version>
<FileVersion>0.1.8</FileVersion>
<Version>0.1.9</Version>
<FileVersion>0.1.9</FileVersion>
<IsPackable>true</IsPackable>
<IncludeBuildOutput>false</IncludeBuildOutput>
<ContentTargetFolders>contentFiles</ContentTargetFolders>
Expand All @@ -42,6 +42,11 @@
<ItemGroup>
<None Include="libblingfiretokdll.dylib" Pack="true" PackagePath="$(ContentTargetFolders)\cs\any" PackageCopyToOutput="true" />
</ItemGroup>
<ItemGroup>
<!-- CentOS 7 has an older version of glibc so we have a specially compiled version of libblingfiretokdll.so for centos.7-x64 -->
<!-- To use this version pass -r centos.7-x64 to dotnet publish when packaging your application which consumes this package -->
<None Include="centos.7-x64\libblingfiretokdll.so" Pack="true" PackagePath="runtimes\centos.7-x64\native" PackageCopyToOutput="true" />
</ItemGroup>
<ItemGroup>
<None Include="libblingfiretokdll.so" Pack="true" PackagePath="$(ContentTargetFolders)\cs\any" PackageCopyToOutput="true" />
</ItemGroup>
Expand Down
Binary file added nuget/lib/centos.7-x64/libblingfiretokdll.so
Binary file not shown.