Skip to content

Commit 96f29dc

Browse files
committed
macos-intel-10.13 and ios-12.0 compat
1 parent 6506173 commit 96f29dc

File tree

5 files changed

+24
-4
lines changed

5 files changed

+24
-4
lines changed

.github/workflows/rebuildDependencies.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ jobs:
143143
git sparse-checkout set \
144144
recipes/minizip \
145145
recipes/flac \
146+
recipes/onnx \
146147
recipes/onnxruntime \
147148
$recipePathQt \
148149
@@ -154,15 +155,15 @@ jobs:
154155
155156
# versions must be synced with: conan_patches/<package>/conandata.yml
156157
# if no custom patches are required for a package, it should be removed from here
157-
for p in minizip/1.3.1 flac/1.4.2 onnxruntime/1.18.1 ; do
158+
for p in minizip/1.3.1 flac/1.4.2 onnx/1.16.2 onnxruntime/1.18.1 ; do
158159
IFS_OLD="$IFS"
159160
IFS=/
160161
read package version <<<"$p"
161162
IFS="$IFS_OLD"
162163
163164
if [[ $package == qt ]] ; then
164165
packagePath="$recipePathQt/5.x.x"
165-
elif [[ $package == onnxruntime ]] && ${{ contains(matrix.conan_options, 'with_onnxruntime=False') }} ; then
166+
elif [[ $package =~ ^onnx ]] && ${{ contains(matrix.conan_options, 'with_onnxruntime=False') }} ; then
166167
continue
167168
else
168169
packagePath="recipes/$package/all"

conan_patches/onnx/conandata.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
patches:
2+
"1.16.2":
3+
- patch_file: "patches/apple-pre-2019.diff"
4+
patch_description: |
5+
Fixes errors for older apple targets:
6+
error: 'basic_fstream' is unavailable: introduced in macOS 10.15
7+
error: 'basic_fstream' is unavailable: introduced in iOS 13.0
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
--- a/onnx/common/file_utils.h
2+
+++ b/onnx/common/file_utils.h
3+
@@ -17,8 +17,7 @@ namespace ONNX_NAMESPACE {
4+
5+
template <typename T>
6+
void LoadProtoFromPath(const std::string proto_path, T& proto) {
7+
- std::filesystem::path proto_u8_path = std::filesystem::u8path(proto_path);
8+
- std::fstream proto_stream(proto_u8_path, std::ios::in | std::ios::binary);
9+
+ std::fstream proto_stream(proto_path, std::ios::in | std::ios::binary);
10+
if (!proto_stream.good()) {
11+
fail_check("Unable to open proto file: ", proto_path, ". Please check if it is a valid proto. ");
12+
}

conan_profiles/ios-arm64

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
include(base/ios)
22

33
[settings]
4-
os.version=13.0
4+
os.version=12.0
55
arch=armv8

conan_profiles/macos-intel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
include(base/macos)
22

33
[settings]
4-
os.version=10.15
4+
os.version=10.13
55
arch=x86_64

0 commit comments

Comments
 (0)