-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
README-Ubuntu-22.txt
287 lines (224 loc) · 7.5 KB
/
README-Ubuntu-22.txt
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
ulib under Ubuntu-22
-----------------------------
To user ulib with Linux you need to build your own gnustep installation
The ones shipped with the distributions is not supporting automatic
reference counting because its using the old objc runtime which does not support
ARC.
Here is how to get such a installation up and running under Debian 10 (codename Buster)
First we need some basic tools and repository's set up
apt-get install --assume-yes \
apt-transport-https \
openssh-client \
vim \
dirmngr \
libsctp1 \
lksctp-tools \
acpid \
wget \
telnet \
sudo \
locales-all \
net-tools
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xCBCB082A1BB943DB
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C23AC7F49887F95A
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com C208ADDE26C2B797
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 15CF4D18AF4F7421
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0D9A1950E2EF0603
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com EF0F382A1A7B6500
apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 15CF4D18AF4F7421
wget -4 -O - http://repo.universalss7.ch/debian/key.asc | apt-key add -
DEBIAN_NICKNAME="jammy"
1. Install depenencies
--------------------------
(run as root or use sudo in front)
apt-get install build-essential git subversion \
clang \
libxml2 libxml2-dev \
libffi7 libffi-dev\
libuuid1 uuid-dev uuid-runtime \
libsctp1 libsctp-dev lksctp-tools \
libavahi-core7 libavahi-core-dev\
libavahi-client3 libavahi-client-dev\
libavahi-common3 libavahi-common-dev libavahi-common-data \
libgcrypt20 libgcrypt20-dev \
libtiff5 libtiff5-dev \
libbsd0 libbsd-dev \
util-linux-locales \
locales-all \
libjpeg-dev \
libtiff-dev \
libcups2-dev \
libfreetype6-dev \
libcairo2-dev \
libxt-dev \
libgl1-mesa-dev \
libpcap-dev \
swig \
libedit-dev readline-common \
binfmt-support libtinfo-dev \
bison flex m4 wget \
libicns1 libicns-dev \
libxslt1.1 libxslt1-dev \
libxft2 libxft-dev \
libflite1 flite1-dev \
libxmu6 libxpm4 wmaker-common\
libgnutls30 libgnutls28-dev gnutls-bin\
libpng-dev libpng16-16\
libreadline8 libreadline-dev \
libgif7 libgif-dev libwings3 libwings-dev libwutil5 \
libcups2-dev \
xorg \
libfreetype6 libfreetype6-dev \
libpango1.0-dev \
libcairo2-dev \
libxt-dev libssl-dev \
libasound2-dev libjack-dev libjack0 libportaudio2 libportaudiocpp0 portaudio19-dev \
wmaker cmake cmake-curses-gui \
libwraster6 libwraster-dev \
libicu70 libicu-dev \
ninja-build \
gobjc gobjc-10 \
gobjc++ gobjc++-10 \
libpq-dev libpq5 curl libcurl4-openssl-dev libc++-15-dev gcc-12 g++-12 libstdc++6 \
libmariadb-dev-compat libzmq5 libzmq3-dev mold
Download the sourcecode of gnustep and dependencies
---------------------------------------------------
mkdir gnustep
cd gnustep
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz
git clone https://github.com/apple/swift-corelibs-libdispatch
git clone https://github.com/gnustep/scripts
git clone https://github.com/gnustep/make
git clone https://github.com/gnustep/libobjc2
git clone https://github.com/gnustep/base
git clone https://github.com/gnustep/corebase
git clone https://github.com/gnustep/gui
git clone https://github.com/gnustep/back
./scripts/install-dependencies-linux
Build libiconv
-----------------
# Note libiconv does not build if the compiler is set to clang or the linker to lld.
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz
tar -xvzf libiconv-1.17.tar.gz
cd libiconv-1.17
CC=gcc LDFLAGS="-fuse-ld=gold" CXX="gcc++" CFLAGS="-fPIC" CPPFLAGS="-fPIC" ./configure --enable-static --enable-dynamic
make
make install
./libtool --finish /usr/local/lib
cd ..
# optional:
make check
3. Setting some defaults
------------------------------------------------
export CC="/usr/bin/clang"
export CXX="/usr/bin/clang++"
export PREFIX="/usr"
export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${PREFIX}/bin"
export PKG_CONFIG_PATH="/usr/lib/pkgconfig/:/usr/local/lib/pkgconfig/"
export RUNTIME_VERSION="gnustep-2.0"
export OBJCFLAGS="-fblocks"
export CFLAGS="-I ${PREFIX}/include"
export LDFLAGS="-fuse-ld=gold"
export GNUSTEP_INSTALLATION_DOMAIN="SYSTEM"
mkdir -p ${PREFIX}/lib
mkdir -p ${PREFIX}/etc
mkdir -p ${PREFIX}/bin
cd swift-corelibs-libdispatch
mkdir build
cd build
cmake -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=${PREFIX} ..
make
make install
#make test
5. install libobjc2 runtime
cd libobjc2
git submodule init
git submodule update
mkdir Build
cd Build
/usr/bin/cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo -DOLDABI_COMPAT=OFF -DBUILD_STATIC_LIBOBJC=1 -DCMAKE_C_COMPILER=${CC} -DCMAKE_CXX_COMPILER=${CXX} -DCMAKE_INSTALL_PREFIX=/usr -DGNUSTEP_CONFIG:FILEPATH=GNUSTEP_CONFIG-NOTFOUND
OLDABI_COMPAT=OFF
make
make install
#make test
#usually fails on these:
# 19 - AssociatedObject_legacy (Subprocess aborted)
# 20 - AssociatedObject_legacy_optimised (Subprocess aborted)
# we dont care about backwards compatibility to libobjc1 anymore so its ok
cd ..
ldconfig
6. install gnustep-make
cd make
./configure \
--with-layout=gnustep \
--disable-importing-config-file \
--enable-native-objc-exceptions \
--enable-objc-arc \
--enable-install-ld-so-conf \
--with-library-combo=ng-gnu-gnu \
--with-config-file=/etc/GNUstep/GNUstep.conf \
--with-user-config-file='.GNUstep.conf' \
--with-user-defaults-dir='GNUstep/Library/Defaults' \
--with-objc-lib-flag="-l:libobjc.so.4.6"
make install
source /etc/GNUstep/GNUstep.conf
#source /usr/local/etc/GNUstep/GNUstep.conf
cd ..
7. install gnustep-base
cd base
./configure --with-config-file=/etc/GNUstep/GNUstep.conf \
--with-libiconv-include=/usr/local/include \
--with-libiconv-library=/usr/local/lib \
--enable-pass-arguments \
--enable-zeroconf \
--enable-icu \
--enable-libdispatch \
--enable-nsurlsession
make -j20
make install
ldconfig
#make check
cd ..
(for debug version use "make debug=yes" instead of "make")
8. install gnustep-corebase
cd corebase
./configure
make -j8
make install
ldconfig
cd ..
9. If you want X11 GUI support in GnuStep install gnustep-gui
cd gui
./configure
make -j8
make install
ldconfig
cd ..
10. install gnustep-back
cd back
source /usr/GNUstep/System/Library/Makefiles/GNUstep.sh
./configure
make -j8
make install
cd ..
11. install zeromq
git clone https://github.com/zeromq/libzmq.git
cd libzmq
./autogen.sh
./configure CFLAGS=-fPIC CXXFLAGS=-fPIC --enable-static --disable-shared
make -j20
make install
11. ulib
git clone http://github.com/andreasfink/ulib
cd ulib
./configure
make
make install
ldconfig
cd ..
12. webserver sample application
git clone http://github.com/andreasfink/webserver
cd webserver
./configure
make
make install