diff --git a/cmake/modules/FindV8.cmake b/cmake/modules/FindV8.cmake index 53fa880c87..519c72edfc 100644 --- a/cmake/modules/FindV8.cmake +++ b/cmake/modules/FindV8.cmake @@ -109,20 +109,20 @@ find_path(V8_INCLUDE_DIR ${V8_HEADERS} MESSAGE("V8 include dir: ${V8_INCLUDE_DIR}") # Define library names -set(V8_NAMES_DEBUG libnode libnode.so libnode.lib libnode.so.108 v8D v8_baseD v8_base.ia32D v8_base.x64D libv8_baseD v8_baseD.lib v8_libbaseD v8_libbase.ia32D v8_libbase.x64D libv8_libbaseD v8_libbaseD.lib) -set(V8_NAMES_RELEASE libnode libnode.so libnode.lib libnode.so.108 v8 v8_base v8_base.ia32 v8_base.x64 libv8_base v8_base.lib v8_libbase v8_libbase.ia32 v8_libbase.x64 libv8_libbase v8_libbase.lib) -set(V8_PLATFORM_NAMES_DEBUG v8_libplatform.lib libnode libnode.so libnode.lib libnode.so.108 v8_libplatformD v8_libplatformD.a v8_libplatformD.lib) -set(V8_PLATFORM_NAMES_RELEASE v8_libplatform.lib libnode libnode.so libnode.lib libnode.so.108 v8_libplatform v8_libplatform.a) -set(V8_SAMPLER_NAMES_DEBUG libnode libnode.so libnode.lib libnode.so.108 v8_libsamplerD v8_libsamplerD.a v8_libsamplerD.lib) -set(V8_SAMPLER_NAMES_RELEASE libnode libnode.so libnode.lib libnode.so.108 v8_libsampler v8_libsampler.a v8_libsampler.lib) -set(V8_SNAPSHOT_NAMES_DEBUG libnode libnode.so libnode.lib libnode.so.108 v8_snapshotD libv8_snapshotD v8_snapshotD.lib) -set(V8_SNAPSHOT_NAMES_RELEASE libnode libnode.so libnode.lib libnode.so.108 v8_snapshot libv8_snapshot v8_snapshot.lib) -set(V8_ICU_NAMES_DEBUG libnode libnode.so libnode.lib libnode.so.108 icudataD icudataD.a icudataD.lib) -set(V8_ICU_NAMES_RELEASE libnode libnode.so libnode.lib libnode.so.108 icudata icudata.a icudata.lib) -set(V8_ICUUC_NAMES_DEBUG libnode libnode.so libnode.lib libnode.so.108 icuucD libicuucD) -set(V8_ICUUC_NAMES_RELEASE libnode libnode.so libnode.lib libnode.so.108 icuuc libicuuc) -set(V8_ICUI18N_NAMES_DEBUG libnode libnode.so libnode.lib libnode.so.108 icui18nD libicui18nD) -set(V8_ICUI18N_NAMES_RELEASE libnode libnode.so libnode.lib libnode.so.108 icui18n libicui18n) +set(V8_NAMES_DEBUG libnode.so.108 libnode libnode.so libnode.lib v8D v8_baseD v8_base.ia32D v8_base.x64D libv8_baseD v8_baseD.lib v8_libbaseD v8_libbase.ia32D v8_libbase.x64D libv8_libbaseD v8_libbaseD.lib) +set(V8_NAMES_RELEASE libnode.so.108 libnode libnode.so libnode.lib v8 v8_base v8_base.ia32 v8_base.x64 libv8_base v8_base.lib v8_libbase v8_libbase.ia32 v8_libbase.x64 libv8_libbase v8_libbase.lib) +set(V8_PLATFORM_NAMES_DEBUG libnode.so.108 v8_libplatform.lib libnode libnode.so libnode.lib v8_libplatformD v8_libplatformD.a v8_libplatformD.lib) +set(V8_PLATFORM_NAMES_RELEASE libnode.so.108 v8_libplatform.lib libnode libnode.so libnode.lib v8_libplatform v8_libplatform.a) +set(V8_SAMPLER_NAMES_DEBUG libnode.so.108 libnode libnode.so libnode.lib v8_libsamplerD v8_libsamplerD.a v8_libsamplerD.lib) +set(V8_SAMPLER_NAMES_RELEASE libnode.so.108 libnode libnode.so libnode.lib v8_libsampler v8_libsampler.a v8_libsampler.lib) +set(V8_SNAPSHOT_NAMES_DEBUG libnode.so.108 libnode libnode.so libnode.lib v8_snapshotD libv8_snapshotD v8_snapshotD.lib) +set(V8_SNAPSHOT_NAMES_RELEASE libnode.so.108 libnode libnode.so libnode.lib v8_snapshot libv8_snapshot v8_snapshot.lib) +set(V8_ICU_NAMES_DEBUG libnode.so.108 libnode libnode.so libnode.lib icudataD icudataD.a icudataD.lib) +set(V8_ICU_NAMES_RELEASE libnode.so.108 libnode libnode.so libnode.lib icudata icudata.a icudata.lib) +set(V8_ICUUC_NAMES_DEBUG libnode.so.108 libnode libnode.so libnode.lib icuucD libicuucD) +set(V8_ICUUC_NAMES_RELEASE libnode.so.108 libnode libnode.so libnode.lib icuuc libicuuc) +set(V8_ICUI18N_NAMES_DEBUG libnode.so.108 libnode libnode.so libnode.lib icui18nD libicui18nD) +set(V8_ICUI18N_NAMES_RELEASE libnode.so.108 libnode libnode.so libnode.lib icui18n libicui18n) # Find V8 base library debug find_library(V8_LIBRARY_DEBUG diff --git a/cmake/ports/node/portfile.cmake b/cmake/ports/node/portfile.cmake index d93ded9d1c..5a203e06a9 100644 --- a/cmake/ports/node/portfile.cmake +++ b/cmake/ports/node/portfile.cmake @@ -1,5 +1,5 @@ # Copyright 2023 Overte e.V. -# SPDX-License-Identifier: MIT +# SPDX-License-Identifier: Apache-2.0 set(NODE_VERSION 18.14.2) set(MASTER_COPY_SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src) @@ -11,12 +11,12 @@ if (ANDROID) elseif (WIN32) vcpkg_download_distfile( NODE_SOURCE_ARCHIVE - #URLS "${EXTERNAL_BUILD_ASSETS}/dependencies/node/node-install-18.14.2-windows-amd64-release.tar.xz" - URLS "http://oaktown.pl/tmp/node-install-18.15.1-win-x64-release.tar.xz" + URLS "${EXTERNAL_BUILD_ASSETS}/dependencies/node/node-install-18.15.1-win-x64-release.tar.xz" SHA512 892608a43ae32b0a82a0e3c7994934d0ce85639ea372c8e7feb7de44220211fa91878bd0744e1488054777807dd5b0c0677b59b44ab5e9fd35ecf222b38d8046 FILENAME node-install-18.15.1-win-x64-release.tar.xz ) elseif (APPLE) + # TODO vcpkg_download_distfile( NODE_SOURCE_ARCHIVE URLS "${EXTERNAL_BUILD_ASSETS}/dependencies/node/node-install-18.14.2-macOSXSDK10.14-macos-amd64-release.tar.xz" @@ -25,12 +25,21 @@ elseif (APPLE) ) else () # else Linux desktop - vcpkg_download_distfile( - NODE_SOURCE_ARCHIVE - URLS "${EXTERNAL_BUILD_ASSETS}/dependencies/node/node-install-18.14.2-ubuntu-18.04-amd64-release.tar.xz" - SHA512 ff5ca5c27b811d20ac524346ee122bcd72e9e85c6de6f4799f620bb95dac959ce910cc5bb2162ed741a7f65043aa78173ecd2ce5b92f5a4d91ecb07ce71fa560 - FILENAME node-install-18.14.2-ubuntu-18.04-amd64-release.tar.xz - ) + if (VCPKG_TARGET_ARCHITECTURE STREQUAL "x64") + vcpkg_download_distfile( + NODE_SOURCE_ARCHIVE + URLS "${EXTERNAL_BUILD_ASSETS}/dependencies/node/node-install-18.14.2-ubuntu-18.04-amd64-release.tar.xz" + SHA512 ff5ca5c27b811d20ac524346ee122bcd72e9e85c6de6f4799f620bb95dac959ce910cc5bb2162ed741a7f65043aa78173ecd2ce5b92f5a4d91ecb07ce71fa560 + FILENAME node-install-18.14.2-ubuntu-18.04-amd64-release.tar.xz + ) + elseif (VCPKG_TARGET_ARCHITECTURE STREQUAL "arm64") + vcpkg_download_distfile( + NODE_SOURCE_ARCHIVE + URLS "${EXTERNAL_BUILD_ASSETS}/dependencies/node/node-install-18.16.0-ubuntu-20.04-aarch64-release.tar.xz" + SHA512 aa4814c4ab1a922ec5afd4d7ef08479a32bfd23cb9a745102891bed5a2be13cc912e57e9bf80d856a15a5a9439b67c9a83963c605fdce349236795513090a426 + FILENAME node-install-18.16.0-ubuntu-22.04-aarch64-release.tar.xz + ) + endif () endif () vcpkg_extract_source_archive(MASTER_COPY_SOURCE_PATH ARCHIVE ${NODE_SOURCE_ARCHIVE} NO_REMOVE_ONE_LEVEL) diff --git a/hifi_qt.py b/hifi_qt.py index d3d9d0b320..f163bf6d46 100644 --- a/hifi_qt.py +++ b/hifi_qt.py @@ -169,7 +169,9 @@ endif() if u_major == 18: self.qtUrl = 'http://motofckr9k.ddns.net/vircadia_packages/qt5-install-5.15.2-ubuntu-18.04-aarch64_test.tar.xz' - elif u_major > 19: + elif u_major == 20: + self.qtUrl = self.assets_url + '/dependencies/qt5/qt5-install-5.15.9-2023.05.21-kde_fb3ec282151b1ee281a24f0545a40ac6438537c2-ubuntu-20.04-aarch64.tar.xz' + elif u_major > 20: self.__no_qt_package_error() else: self.__unsupported_error() diff --git a/libraries/script-engine/src/v8/ScriptEngineV8.h b/libraries/script-engine/src/v8/ScriptEngineV8.h index f775abc775..147b76f549 100644 --- a/libraries/script-engine/src/v8/ScriptEngineV8.h +++ b/libraries/script-engine/src/v8/ScriptEngineV8.h @@ -29,6 +29,7 @@ #include #include #include +#include #include "libplatform/libplatform.h" #include "v8.h" diff --git a/tools/ci-scripts/linux-ci/Dockerfile_build_ubuntu-22.04 b/tools/ci-scripts/linux-ci/Dockerfile_build_ubuntu-22.04 index 65b268311d..a80207471e 100644 --- a/tools/ci-scripts/linux-ci/Dockerfile_build_ubuntu-22.04 +++ b/tools/ci-scripts/linux-ci/Dockerfile_build_ubuntu-22.04 @@ -15,7 +15,7 @@ RUN echo UTC >/etc/timezone RUN apt-get update && apt-get -y install tzdata # Install Overte domain-server and assignment-client build dependencies -RUN apt-get -y install curl ninja-build git cmake g++ libssl-dev libqt5websockets5-dev qtscript5-dev qtdeclarative5-dev qtmultimedia5-dev python3-distutils python3-distro mesa-common-dev libgl1-mesa-dev libsystem-dev +RUN apt-get -y install curl ninja-build git cmake g++ libssl-dev libqt5websockets5-dev qtscript5-dev qtdeclarative5-dev qtmultimedia5-dev python3-distutils python3-distro mesa-common-dev libgl1-mesa-dev libsystemd-dev # Install Overte tools build dependencies RUN apt-get -y install libqt5webchannel5-dev qtwebengine5-dev libqt5xmlpatterns5-dev # Install Overte Interface build dependencies diff --git a/tools/node-builder/Dockerfile_Ubuntu_18.04_node b/tools/node-builder/Dockerfile_Ubuntu_18.04_node index 262dc72dae..e3ab1cd78b 100644 --- a/tools/node-builder/Dockerfile_Ubuntu_18.04_node +++ b/tools/node-builder/Dockerfile_Ubuntu_18.04_node @@ -1,12 +1,11 @@ # Copyright 2023 Overte e.V. -# SPDX-License-Identifier: MIT +# SPDX-License-Identifier: Apache-2.0 # Docker file for building Overte Node packages for Ubuntu 18.04 # Some steps for actually using this: -# - Check which commit you are building https://invent.kde.org/qt/qt/qt5/-/tree/kde/5.15 # - Adjust this file to include the number of threads you want to use (-j10), and the Node version. -# Keep in mind that building Qt requires a lot of memory. You should have over 1.2GiB of system memory available per thread. +# Keep in mind that building Node requires a lot of memory. You should have over 1.2GiB of system memory available per thread. # - Run the build process with something like `PROGRESS_NO_TRUNC=1 DOCKER_BUILDKIT=1 BUILDKIT_STEP_LOG_MAX_SIZE=-1 docker build --progress plain -t overte-node:node-18.14.2 -f Dockerfile_Ubuntu_18.04_node .` # Buildkit is used to cache intermittent steps in case you need to modify something afterwards. # - Once the build has completed, create a container from the image and export the created Node package. @@ -41,12 +40,11 @@ RUN git clone --recursive https://github.com/nodejs/node.git -b v18.14.2 --singl # Install node system build dependencies RUN apt-get -y build-dep nodejs -# Install build dependencies -#RUN apt-get -y install python gperf flex bison pkg-config mesa-utils libgl1-mesa-dev make g++ libdbus-glib-1-dev libnss3-dev nodejs libxkbfile-dev libx11-dev - RUN mkdir node-install WORKDIR node +# --gdb currently doesn't build on aarch64 +# Ubuntu 18.04 has a too old compiler to build on aarch64 #RUN ./configure --gdb --shared --prefix=../node-install/ RUN ./configure --gdb --shared --debug --debug-lib --v8-with-dchecks --v8-enable-object-print --prefix=../node-install/ diff --git a/tools/node-builder/Dockerfile_Ubuntu_20.04_aarch64_node b/tools/node-builder/Dockerfile_Ubuntu_20.04_aarch64_node new file mode 100644 index 0000000000..111851fbfe --- /dev/null +++ b/tools/node-builder/Dockerfile_Ubuntu_20.04_aarch64_node @@ -0,0 +1,57 @@ +# Copyright 2023 Overte e.V. +# SPDX-License-Identifier: Apache-2.0 + +# Docker file for building Overte Node packages for Ubuntu 20.04 + +# Some steps for actually using this: +# - Adjust this file to include the number of threads you want to use (-j10), and the Node version. +# Keep in mind that building Node requires a lot of memory. You should have over 1.2GiB of system memory available per thread. +# - Run the build process with something like `PROGRESS_NO_TRUNC=1 DOCKER_BUILDKIT=1 BUILDKIT_STEP_LOG_MAX_SIZE=-1 docker build --progress plain -t overte-node:node-18.16.0 -f Dockerfile_Ubuntu_20.04_aarch64_node .` +# Buildkit is used to cache intermittent steps in case you need to modify something afterwards. +# - Once the build has completed, create a container from the image and export the created Node package. +# `docker create --name extract overte-node:node-18.16.0` +# `docker cp extract:node-install-18.16.0-ubuntu-20.04-aarch64-release.tar.xz /path/on/host` +# `docker rm extract` + +FROM ubuntu:20.04 +LABEL maintainer="Julian Groß (julian.gro@overte.org)" +LABEL description="Development image for Overte Node packages for Ubuntu 20.04." + +# Don't use any frontend when installalling packages during the creation of this container +ARG DEBIAN_FRONTEND=noninteractive + +RUN echo UTC >/etc/timezone + +# Enable source repositories for apt +RUN sed -Ei 's/^# deb-src /deb-src /' /etc/apt/sources.list + +# Update package list +RUN apt-get update + +# Upgrade packages +RUN apt-get -y upgrade + +RUN apt-get -y install git + +# Clone and enter single branch of Node +RUN git clone --recursive https://github.com/nodejs/node.git -b v18.16.0 --single-branch + + +# Install node system build dependencies +RUN apt-get -y build-dep nodejs + + +RUN mkdir node-install +WORKDIR node +# --gdb currently doesn't build on aarch64 +# Ubuntu 18.04 has a too old compiler to build on aarch64 +#RUN ./configure --gdb --shared --prefix=../node-install/ +RUN ./configure --shared --debug --debug-lib --v8-with-dchecks --v8-enable-object-print --prefix=../node-install/ + +RUN make -j16 +RUN make -j16 install + +RUN cp config.status ../node-install/ + +WORKDIR .. +RUN XZ_OPT='-T0' tar -Jcvf node-install-18.16.0-ubuntu-20.04-aarch64-release.tar.xz node-install diff --git a/tools/node-builder/README.md b/tools/node-builder/README.md index b34624c190..a8cb97e285 100644 --- a/tools/node-builder/README.md +++ b/tools/node-builder/README.md @@ -1,5 +1,5 @@ # Copyright 2023 Overte e.V. -# SPDX-License-Identifier: MIT +# SPDX-License-Identifier: Apache-2.0 # General This document describes the process to build Node 18.14.2 for usage as scripting engine.. @@ -94,7 +94,7 @@ make -j4 install ``` #### Uploading -1. Tar and xz qt5-install to create the package. Replace `ubuntu-18.04` with the relevant system and `amd64` with the relevant architecture. +1. Tar and xz node-install to create the package. Replace `ubuntu-18.04` with the relevant system and `amd64` with the relevant architecture. ```bash tar -Jcvf node-install-18.14.2-ubuntu-18.04-amd64-release.tar.xz node-install ``` diff --git a/tools/qt-builder/Dockerfile_Ubuntu_20.04_Qt5 b/tools/qt-builder/Dockerfile_Ubuntu_20.04_Qt5 index b05f96f05d..94bda6d410 100644 --- a/tools/qt-builder/Dockerfile_Ubuntu_20.04_Qt5 +++ b/tools/qt-builder/Dockerfile_Ubuntu_20.04_Qt5 @@ -2,13 +2,13 @@ # Some steps for actually using this: # - Check which commit you are building https://invent.kde.org/qt/qt/qt5/-/tree/kde/5.15 -# - Adjust this file to include the commit hash you are building, the date, the number of threads you want to use (-j10), and the Qt and QtWebEngine versions. +# - Adjust this file to include the commit hash you are building, the date, the number of threads you want to use (-j10), the platform, and the Qt and QtWebEngine versions. # Keep in mind that building Qt requires a lot of memory. You should have over 1.2GiB of system memory available per thread. -# - Run the build process with something like `PROGRESS_NO_TRUNC=1 DOCKER_BUILDKIT=1 BUILDKIT_STEP_LOG_MAX_SIZE=-1 docker build --progress plain -t overte-qt5:5.15.5-2022.08.12-kde_0b4d44f2ff1103349bac22b9b207cfcc1f50a53a -f Dockerfile_Ubuntu_20.04_Qt5 .` +# - Run the build process with something like `PROGRESS_NO_TRUNC=1 DOCKER_BUILDKIT=1 BUILDKIT_STEP_LOG_MAX_SIZE=-1 docker build --progress plain -t overte-qt5:5.15.9-2023.05.21-kde_fb3ec282151b1ee281a24f0545a40ac6438537c2 -f Dockerfile_Ubuntu_20.04_Qt5 .` # Buildkit is used to cache intermittent steps in case you need to modify something afterwards. # - Once the build has completed, create a container from the image and export the created Qt package. -# `docker create --name extract overte-qt5:5.15.5-2022.08.12-kde_0b4d44f2ff1103349bac22b9b207cfcc1f50a53a` -# `docker cp extract:qt5-install-5.15.5-2022.08.12-kde_0b4d44f2ff1103349bac22b9b207cfcc1f50a53a-ubuntu-20.04-amd64.tar.xz /path/on/host` +# `docker create --name extract overte-qt5:5.15.9-2023.05.21-kde_fb3ec282151b1ee281a24f0545a40ac6438537c2` +# `docker cp extract:qt5-install-5.15.9-2023.05.21-kde_fb3ec282151b1ee281a24f0545a40ac6438537c2-ubuntu-20.04-amd64.tar.xz /path/on/host` # `docker rm extract` FROM ubuntu:20.04 @@ -47,27 +47,27 @@ RUN apt-get -y install git python gperf flex bison pkg-config mesa-utils libgl1- RUN mkdir qt5-install && mkdir qt5-build WORKDIR qt5-build -RUN ../qt5/configure -force-debug-info -release -opensource -confirm-license -platform linux-g++-64 -recheck-all -nomake tests -nomake examples -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -skip qtlottie -skip qtquick3d -skip qtpim -skip qtdocgallery -no-warnings-are-errors -no-pch -no-icu -prefix ../qt5-install +RUN ../qt5/configure -force-debug-info -release -opensource -confirm-license -platform linux-g++ -recheck-all -nomake tests -nomake examples -skip qttranslations -skip qtserialport -skip qt3d -skip qtlocation -skip qtwayland -skip qtsensors -skip qtgamepad -skip qtcharts -skip qtx11extras -skip qtmacextras -skip qtvirtualkeyboard -skip qtpurchasing -skip qtdatavis3d -skip qtlottie -skip qtquick3d -skip qtpim -skip qtdocgallery -no-warnings-are-errors -no-pch -no-icu -prefix ../qt5-install -RUN NINJAFLAGS='-j10' make -j10 +RUN NINJAFLAGS='-j16' make -j16 -RUN make -j10 module-qtscript +RUN make -j16 module-qtscript -RUN make -j10 install +RUN make -j16 install WORKDIR ./qtscript -RUN make -j10 install +RUN make -j16 install WORKDIR ../../qt5-install RUN find . -name \*.prl -exec sed -i -e '/^QMAKE_PRL_BUILD_DIR/d' {} \; # Overwrite QtWebengine version to work around version conflicts -RUN find . -name \Qt5WebEngine*Config.cmake -exec sed -i '' -e 's/5\.15\.11/5\.15\.5/g' {} \; -RUN cp lib/libQt5WebEngine.so.5.15.11 lib/libQt5WebEngine.so.5.15.5 -RUN cp lib/libQt5WebEngineCore.so.5.15.11 lib/libQt5WebEngineCore.so.5.15.5 -RUN cp lib/libQt5WebEngineWidgets.so.5.15.11 lib/libQt5WebEngineWidgets.so.5.15.5 -RUN cp lib/libQt5Pdf.so.5.15.11 lib/libQt5Pdf.so.5.15.5 -RUN cp lib/libQt5PdfWidgets.so.5.15.11 lib/libQt5PdfWidgets.so.5.15.5 +RUN find . -name \Qt5WebEngine*Config.cmake -exec sed -i '' -e 's/5\.15\.14/5\.15\.9/g' {} \; +RUN cp lib/libQt5WebEngine.so.5.15.14 lib/libQt5WebEngine.so.5.15.9 +RUN cp lib/libQt5WebEngineCore.so.5.15.14 lib/libQt5WebEngineCore.so.5.15.9 +RUN cp lib/libQt5WebEngineWidgets.so.5.15.14 lib/libQt5WebEngineWidgets.so.5.15.9 +RUN cp lib/libQt5Pdf.so.5.15.14 lib/libQt5Pdf.so.5.15.9 +RUN cp lib/libQt5PdfWidgets.so.5.15.14 lib/libQt5PdfWidgets.so.5.15.9 COPY ./qt.conf ./bin/ @@ -75,4 +75,4 @@ COPY ./qt.conf ./bin/ RUN cp ../qt5-build/config.summary ./ WORKDIR .. -RUN XZ_OPT='-T0' tar -Jcvf qt5-install-5.15.5-2022.08.12-kde_0b4d44f2ff1103349bac22b9b207cfcc1f50a53a-ubuntu-20.04-amd64.tar.xz qt5-install +RUN XZ_OPT='-T0' tar -Jcvf qt5-install-5.15.9-2023.05.21-kde_fb3ec282151b1ee281a24f0545a40ac6438537c2-ubuntu-20.04-amd64.tar.xz qt5-install