Skip to content

Commit

Permalink
[#4972] Support for Ubuntu 24.04 (#43)
Browse files Browse the repository at this point in the history
* #4972: added ubuntu 24.04 files

* [#4972] changes to support Ubuntu 24.04

* revert back HEAD_REF

* corrected copyright file location

* changed CXX flag for ubuntu 20.04

* correct forced system binary for arm ubuntu 24.04

* converted zeromq to custom port

* fix zeromq version/port string

* Rename nesfolly to folly / Remove Boost

* touch up on cmake and vcpkg files

* update portfile

* fix portfile

* shared library off as default

* static linkage of zeromq

* static linkage of zeromq for all architectures

* expose BUILD_STATIC

* remove shared libs

* revert back shared lib of zmq for the use of cppzmq

* lowered down the g++ version to comply with gpu architecture

* upgrade artifacts to v4

* remove zmq static linkage

* added cpp flag

* add explanation for C++ and C flags

---------

Co-authored-by: Ankit Chaudhary <ankit.chaudhary@tu-berlin.de>
Co-authored-by: lukas schwerdtfeger <lukas.schwerdtfeger@gmail.com>
  • Loading branch information
3 people authored Oct 22, 2024
1 parent 67acf5b commit f0bd636
Show file tree
Hide file tree
Showing 25 changed files with 520 additions and 99 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ jobs:
fail-fast: false
matrix:
include:
- osversion: ubuntu-24.04
arch: "x64"
force_system_binary: 0
- osversion: ubuntu-20.04
arch: "x64"
force_system_binary: 0
- osversion: ubuntu-22.04
arch: "x64"
force_system_binary: 0
- osversion: ubuntu-24.04
arch: "arm64"
force_system_binary: 1
- osversion: ubuntu-20.04
arch: "arm64"
force_system_binary: 1
Expand Down Expand Up @@ -98,7 +104,7 @@ jobs:
files: |
nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-${{ matrix.osversion }}-nes.7z
- name: Upload GitHub Actions artifact of vcpkg build logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
id: uploadlogs
with:
Expand Down Expand Up @@ -172,7 +178,7 @@ jobs:
files: |
nes-dependencies-${{ steps.vars.outputs.tag }}-${{ env.VCPKG_DEP_LIST }}-nes.7z
- name: Upload GitHub Actions artifact of vcpkg build logs
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
id: uploadlogs
with:
Expand Down
6 changes: 5 additions & 1 deletion custom-triplets/arm64-linux-nes.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,8 @@ endif()

if (PORT STREQUAL oatpp)
set(VCPKG_LIBRARY_LINKAGE static)
endif()
endif()

if (PORT STREQUAL zeromq)
set(VCPKG_LIBRARY_LINKAGE static)
endif()
6 changes: 5 additions & 1 deletion custom-triplets/arm64-osx-nes.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,8 @@ endif()

if (PORT STREQUAL oatpp)
set(VCPKG_LIBRARY_LINKAGE static)
endif()
endif()

if (PORT STREQUAL zeromq)
set(VCPKG_LIBRARY_LINKAGE static)
endif()
6 changes: 5 additions & 1 deletion custom-triplets/x64-linux-musl-nes.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,8 @@ endif()

if (PORT STREQUAL oatpp)
set(VCPKG_LIBRARY_LINKAGE static)
endif()
endif()

if (PORT STREQUAL zeromq)
set(VCPKG_LIBRARY_LINKAGE static)
endif()
10 changes: 9 additions & 1 deletion custom-triplets/x64-linux-nes.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ set(VCPKG_LIBRARY_LINKAGE static)

set(VCPKG_CMAKE_SYSTEM_NAME Linux)

# use C++20 for updated packages
set(VCPKG_CXX_FLAGS -std=c++2a)
set(VCPKG_C_FLAGS "")

if(NOT CMAKE_HOST_SYSTEM_PROCESSOR)
execute_process(COMMAND "uname" "-m" OUTPUT_VARIABLE CMAKE_HOST_SYSTEM_PROCESSOR OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
Expand All @@ -30,4 +34,8 @@ endif()

if (PORT STREQUAL oatpp)
set(VCPKG_LIBRARY_LINKAGE static)
endif()
endif()

if (PORT STREQUAL zeromq)
set(VCPKG_LIBRARY_LINKAGE static)
endif()
6 changes: 5 additions & 1 deletion custom-triplets/x64-osx-nes.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ set(VCPKG_LIBRARY_LINKAGE static)
set(VCPKG_CMAKE_SYSTEM_NAME Darwin)
set(VCPKG_OSX_ARCHITECTURES x86_64)

# use C++20 for updated packages
set(VCPKG_CXX_FLAGS -std=c++2a)
set(VCPKG_C_FLAGS "")


if (PORT STREQUAL paho-mqtt)
set(VCPKG_LIBRARY_LINKAGE static)
Expand All @@ -28,4 +32,4 @@ endif()

if (PORT STREQUAL oatpp)
set(VCPKG_LIBRARY_LINKAGE static)
endif()
endif()
34 changes: 34 additions & 0 deletions docker/Dockerfile-ubuntu-24.04
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
FROM ubuntu:24.04

RUN apt-get update -qq && DEBIAN_FRONTEND="noninteractive" apt-get install -qq \
git \
wget \
python3 \
python3-venv \
tar \
p7zip-full \
cmake \
software-properties-common \
build-essential \
curl zip unzip tar \
pkg-config \
autoconf \
cmake \
ninja-build \
flex \
bison \
&& apt-get clean -qq

RUN wget https://www.python.org/ftp/python/2.7.18/Python-2.7.18.tgz
RUN tar xzf Python-2.7.18.tgz
RUN cd Python-2.7.18 && ./configure --enable-optimizations && make altinstall
RUN ln -s "/usr/local/bin/python2.7" "/usr/bin/python2"

RUN rm -f /usr/bin/g++
RUN apt-get install -y g++-11
RUN ln -s /usr/bin/g++-11 /usr/bin/g++
RUN g++ --version

ADD ./entrypoint-build.sh /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
67 changes: 0 additions & 67 deletions original-build-script/build-linux-steffen.sh

This file was deleted.

2 changes: 1 addition & 1 deletion vcpkg
Submodule vcpkg updated 1920 files
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ vcpkg_from_github(
nesfolly.patch
arm-compilation.patch
follyconfig.patch
malloc.patch
remove-boost.patch
)

vcpkg_cmake_configure(
Expand Down
Loading

0 comments on commit f0bd636

Please sign in to comment.