Skip to content

Commit

Permalink
up - try4: ubt's build-cmds
Browse files Browse the repository at this point in the history
  • Loading branch information
huapox committed Oct 20, 2023
1 parent 9091092 commit 3534be9
Showing 1 changed file with 49 additions and 7 deletions.
56 changes: 49 additions & 7 deletions ubt/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,29 @@ ii libgnutlsxx28:amd64 3.6.13-2ubuntu1.8 amd64

```bash
# tiger/build.sh
cd /tmp/tigervnc && cmake -G "Unix Makefiles" \
$(xx-clang --print-cmake-defines) \
-DCMAKE_FIND_ROOT_PATH=$(xx-info sysroot) \
-DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY \
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY \
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY \
-DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release \
-DINSTALL_SYSTEMD_UNITS=OFF \
-DENABLE_NLS=OFF \
-DENABLE_GNUTLS=ON \
-DENABLE_NETTLE=ON \
-DBUILD_VIEWER=OFF \

cd /tmp/tigervnc
log "Compiling TigerVNC common libraries and tools..."
make -C /tmp/tigervnc/common -j$(nproc)
make -C /tmp/tigervnc/unix/common -j$(nproc)
make -C /tmp/tigervnc/unix/vncpasswd -j$(nproc)


# xserver
log "Configuring TigerVNC server..."
autoreconf -fiv /tmp/tigervnc/unix/xserver
(
Expand Down Expand Up @@ -119,7 +136,7 @@ autoreconf -fiv /tmp/tigervnc/unix/xserver
--disable-xephyr \
)

###Remove all automatic dependencies on libraries and manually define them to have the correct order.
###Remove all automatic dependencies.
# find /tmp/tigervnc -name "*.la" -exec sed 's/^dependency_libs/#dependency_libs/' -i {} ';'
# sed 's/^XSERVER_SYS_LIBS = .*/XSERVER_SYS_LIBS = -lXau -lXdmcp -lpixman-1 -ljpeg -lXfont2 -lfreetype -lfontenc -lpng16 -lbrotlidec -lbrotlicommon -lz -lbz2 -lgnutls -lhogweed -lgmp -lnettle -lunistring -ltasn1 -lbsd -lmd/' -i /tmp/tigervnc/unix/xserver/hw/vnc/Makefile

Expand All @@ -128,14 +145,11 @@ make -C /tmp/tigervnc/unix/xserver -j$(nproc)

# log "Installing TigerVNC server..."
# make DESTDIR=/tmp/tigervnc-install -C /tmp/tigervnc/unix/xserver install
# log "Installing TigerVNC vncpasswd tool..."
# make DESTDIR=/tmp/tigervnc-install -C /tmp/tigervnc/unix/vncpasswd install






# libz错误
# root@e0dd2368ee99:/tmp/tigervnc/unix/xserver# dpkg -l |grep libz
ii libz3-4:amd64 4.8.7-4build1 amd64 theorem prover from Microsoft Research - runtime libraries
Expand All @@ -157,7 +171,35 @@ cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Release -DINSTALL_SYSTEMD_UNITS=OFF -Wno-dev .

# make
make -C /tmp/tigervnc-1.12.0/common -j$(nproc)
make -C /tmp/tigervnc-1.12.0/unix/common -j$(nproc)
make -C /tmp/tigervnc-1.12.0/unix/vncpasswd -j$(nproc)
make -C /build/tigervnc-1.12.0/common -j$(nproc)
make -C /build/tigervnc-1.12.0/unix/common -j$(nproc)
make -C /build/tigervnc-1.12.0/unix/vncpasswd -j$(nproc)



cd /build/tigervnc-1.12.0/unix/xserver; \
autoreconf -fiv; \
CPPFLAGS="-I/usr/include/drm" \
./configure $XORG_CONFIG \
--prefix=/usr/local/tigervnc \
\
--sysconfdir=/etc/X11 \
--localstatedir=/var \
--with-xkb-path=/usr/share/X11/xkb \
--with-xkb-output=/var/lib/xkb \
--with-xkb-bin-directory=/usr/bin \
\
--disable-xwayland --disable-dmx \
--disable-xorg --disable-xnest --disable-xvfb \
--disable-xwin --disable-xephyr --disable-kdrive \
--disable-devel-docs --disable-config-hal --disable-config-udev \
--disable-unit-tests --disable-selective-werror \
--disable-dri --disable-dri3 --enable-dri2 \
--with-pic \
--without-dtrace

# make
# log "Compiling TigerVNC server..."
make -C /build/tigervnc-1.12.0/unix/xserver -j$(nproc)

```

0 comments on commit 3534be9

Please sign in to comment.