-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathInstall.osx
More file actions
144 lines (98 loc) · 5.48 KB
/
Install.osx
File metadata and controls
144 lines (98 loc) · 5.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
Installation procedure for SIP SIMPLE SDK on MacOSX
---------------------------------------------------
This document is very old, see ../mac folder instead.
This document describes the installation procedure on MacOSX < 10.14
The installation procedure consists of the steps described below:
Step 1. Prerequisites
Step 2. Install dependencies
Step 3. Install SIP SIMPLE SDK
Step 1. Prerequisites
---------------------
* MacOSX 13
* Apple Developer tools (XCode 14)
* MacPorts from https://guide.macports.org
* Python 3.9, 3.10 or 3.11
Step 2. Install dependencies
----------------------------
See Dependencies.txt for detailed description of the required libraries and
their minimum version number.
A. Install the C dependencies
Install some building tools:
sudo port install darcs yasm
Install the dynamic libraries required by sipsimple:
sudo port install x264 gnutls openssl sqlite3 gnutls ffmpeg mpfr libmpc libvpx
If building for the Mac Store or a notarized version a lot more attention is
required to build all dependencies. All dynamic libraries must:
1. be signed with an Apple developer account
2. contain LC_VERSION_MIN_MACOSX option
3. not load non-system libraries from outside the sandbox
For solving 2) all port packages and their depedencies must be re-compiled from
sources. First locate all the dependencies of each package:
otool -L /opt/local/lib/XYZ.dylib
For each found dependency, remove the binary package and reinstall the port
from source:
sudo port uninstall package
sudo port -s install package
Check if the library contains LC_VERSION_MIN_MACOSX flag, for example:
otool -l /opt/local/lib/libgnutls.dylib |grep -B1 -A3 LC_VERSION_MIN_MACOSX
Load command 8
cmd LC_VERSION_MIN_MACOSX
cmdsize 16
version 10.11
sdk 10.14
For solving 3) use install_name_tool as follows:
old_path="/opt/local/lib/\|/usr/local/opt/libmpc/lib/" # <-- add all native lib paths
new_path="@executable_path/../Frameworks/" # <- replace with relative path inside sandbox
for library in $@; do
new_basename=$(basename $library)
echo $new_basename
install_name_tool -id $new_path$new_basename $library
dependencies=$(otool -L $library | grep $old_path | awk '{print $1}')
for dependency in $dependencies; do
new_basename=$(basename $dependency)
new_name="$new_path$new_basename"
install_name_tool -change $dependency $new_name $library
done
done
For example:
otool -L /opt/local/lib/libgnutls.dylib
/opt/local/lib/libgnutls.30.dylib (compatibility version 59.0.0, current version 59.1.0)
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 58286.255.3)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1575.17.0)
/opt/local/lib/libp11-kit.0.dylib (compatibility version 4.0.0, current version 4.0.0)
/opt/local/lib/libidn2.0.dylib (compatibility version 4.0.0, current version 4.7.0)
/opt/local/lib/libunistring.2.dylib (compatibility version 4.0.0, current version 4.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)
/opt/local/lib/libtasn1.6.dylib (compatibility version 13.0.0, current version 13.0.0)
/opt/local/lib/libnettle.8.dylib (compatibility version 8.0.0, current version 8.1.0)
/opt/local/lib/libhogweed.6.dylib (compatibility version 6.0.0, current version 6.1.0)
/opt/local/lib/libgmp.10.dylib (compatibility version 15.0.0, current version 15.1.0)
/opt/local/lib/libintl.8.dylib (compatibility version 10.0.0, current version 10.5.0)
after running install_name_tool becomes:
otool -L Frameworks/libgnutls.30.dylib
@executable_path/../Frameworks/libgnutls.30.dylib (compatibility version 59.0.0, current version 59.1.0)
/System/Library/Frameworks/Security.framework/Versions/A/Security (compatibility version 1.0.0, current version 58286.255.3)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 1575.17.0)
@executable_path/../Frameworks/libp11-kit.0.dylib (compatibility version 4.0.0, current version 4.0.0)
@executable_path/../Frameworks/libidn2.0.dylib (compatibility version 4.0.0, current version 4.7.0)
@executable_path/../Frameworks/libunistring.2.dylib (compatibility version 4.0.0, current version 4.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)
@executable_path/../Frameworks/libtasn1.6.dylib (compatibility version 13.0.0, current version 13.0.0)
@executable_path/../Frameworks/libnettle.8.dylib (compatibility version 8.0.0, current version 8.1.0)
@executable_path/../Frameworks/libhogweed.6.dylib (compatibility version 6.0.0, current version 6.1.0)
@executable_path/../Frameworks/libgmp.10.dylib (compatibility version 15.0.0, current version 15.1.0)
@executable_path/../Frameworks/libintl.8.dylib (compatibility version 10.0.0, current version 10.5.0)
Building libvpx library
-----------------------
To obtain LC_VERSION_MIN_MACOSX for libvpx.dylib:
Download the sources of libvpx from github. Run configure, then edit libs.mk and change the
line:
$(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm
to:
$(BUILD_PFX)$(LIBVPX_SO): extralibs += -lm -mmacosx-version-min=10.11
Step 3. Install SIP SIMPLE SDK
------------------------------
See Install.linux document
Same steps related to C dependencies must be taken for .so dynamic libraries
that are part of Python packages on which the SDK depends.
See install_osx_user.sh script in the top directory.