Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update toolchain to gcc-14 #559

Merged
merged 9 commits into from
May 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake
Submodule cmake updated 1 files
+1 −0 tfc_warnings.cmake
22 changes: 22 additions & 0 deletions containers/tfc-toolchain/build-doxygen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

set -ex

source shared.sh

VERSION=1.10.0

curl https://www.doxygen.nl/files/doxygen-1.10.0.src.tar.gz | tar xfz -

echo "Building Doxygen"

cd doxygen-1.10.0
hide_output mkdir build
hide_output cd build
hide_output cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/cpproot ..
hide_output cmake --build .
hide_output cmake --install .

cd ..
rm -rf doxygen-$VERSION

8 changes: 3 additions & 5 deletions containers/tfc-toolchain/install-common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,15 @@ hide_output apt install -y --no-install-recommends \
libtool \
autopoint \
gperf \
python3-distutils \
python3-jinja2 \
python3-venv \
gcc-13 \
g++-13 \
g++-13-aarch64-linux-gnu \
gcc-14 \
g++-14 \
g++-14-aarch64-linux-gnu \
libltdl-dev # Required for autoconf

# Install documentation specific packages
hide_output apt install -y --no-install-recommends \
doxygen \
omarhogni marked this conversation as resolved.
Show resolved Hide resolved
python3-venv \
python3-jinja2 \
graphviz
Expand Down
35 changes: 20 additions & 15 deletions containers/tfc-toolchain/tfc-toolchain.dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# boost-build requires newer compiler than gcc 8
FROM ubuntu:23.04 AS base
FROM ubuntu:24.04 AS base

ENV DEBIAN_FRONTEND noninteractive

Expand All @@ -21,14 +21,14 @@ RUN ldconfig
COPY install-common.sh /tmp/
RUN ./install-common.sh

# Give gcc-13 some better names
RUN ln -sf /usr/bin/gcc-13 /cpproot/bin/gcc
RUN ln -sf /usr/bin/g++-13 /cpproot/bin/g++
RUN ln -sf /usr/bin/gcc-13 /cpproot/bin/cc
RUN ln -sf /usr/bin/aarch64-linux-gnu-gcc-ar-13 /cpproot/bin/aarch64-linux-gnu-ar
# Give gcc-14 some better names
RUN ln -sf /usr/bin/gcc-14 /cpproot/bin/gcc
RUN ln -sf /usr/bin/g++-14 /cpproot/bin/g++
RUN ln -sf /usr/bin/gcc-14 /cpproot/bin/cc
RUN ln -sf /usr/bin/aarch64-linux-gnu-gcc-ar-14 /cpproot/bin/aarch64-linux-gnu-ar
RUN ln -sf /usr/bin/aarch64-linux-gnu-strip /cpproot/bin/aarch64-linux-gnu-strip
RUN ln -sf /usr/bin/aarch64-linux-gnu-gcc-13 /cpproot/bin/aarch64-linux-gnu-gcc
RUN ln -sf /usr/bin/aarch64-linux-gnu-g++-13 /cpproot/bin/aarch64-linux-gnu-g++
RUN ln -sf /usr/bin/aarch64-linux-gnu-gcc-14 /cpproot/bin/aarch64-linux-gnu-gcc
RUN ln -sf /usr/bin/aarch64-linux-gnu-g++-14 /cpproot/bin/aarch64-linux-gnu-g++
RUN ln -sf /usr/aarch64-linux-gnu /cpproot/aarch64-linux-gnu
RUN ln -sf /usr/include/aarch64-linux-gnu /cpproot/include/aarch64-linux-gnu
RUN ln -sf /usr/lib/aarch64-linux-gnu /cpproot/lib/aarch64-linux-gnu
Expand All @@ -39,7 +39,7 @@ RUN ./install-cmake.sh 3.29.0
COPY build-ninja.sh /tmp/
RUN ./build-ninja.sh 1.11.1

# This has to happen after gcc-13 and cmake
# This has to happen after gcc-14 and cmake
COPY build-mold.sh /tmp/
RUN ./build-mold.sh 2.30.0

Expand All @@ -53,17 +53,17 @@ RUN mkdir -p /var/run/dbus/
RUN sed -i 's|deny own=|allow own=|g' /usr/share/dbus-1/system.conf
RUN sed -i 's|deny send_type="method_call"|allow send_type="method_call"|g' /usr/share/dbus-1/system.conf

FROM base AS gcc-13
FROM base AS gcc-14

COPY build-binutils.sh /tmp/
RUN ./build-binutils.sh 2.40

# COPY build-gcc-from-commit.sh /tmp/
# RUN ./build-gcc-from-commit.sh eb83605be3db9e8246c73755eafcac5df32ddc69
RUN apt update
# RUN apt install g++-13-aarch64-linux-gnu -y # Already done in common
RUN ln -sf /usr/bin/aarch64-linux-gnu-gcc-13 /cpproot/bin/aarch64-linux-gnu-gcc
RUN ln -sf /usr/bin/aarch64-linux-gnu-g++-13 /cpproot/bin/aarch64-linux-gnu-g++
# RUN apt install g++-14-aarch64-linux-gnu -y # Already done in common
RUN ln -sf /usr/bin/aarch64-linux-gnu-gcc-14 /cpproot/bin/aarch64-linux-gnu-gcc
RUN ln -sf /usr/bin/aarch64-linux-gnu-g++-14 /cpproot/bin/aarch64-linux-gnu-g++
# RUN apt remove -y gcc g++

#RUN apt update && apt install -y --no-install-recommends libisl-dev libmpc-dev libc-dev
Expand All @@ -73,11 +73,11 @@ RUN apt clean all
RUN rm -rf /var/lib/apt/lists/*
RUN rm -rf /tmp/*

FROM gcc-13 as clang-18
FROM gcc-14 as clang-18

COPY shared.sh /tmp/
COPY build-clang.sh /tmp/
RUN ./build-clang.sh 18.1.2
RUN ./build-clang.sh 18.1.5

#ENV CC=clang
#ENV CXX=clang++
Expand All @@ -103,6 +103,11 @@ COPY build-node.sh /tmp/
COPY ./shared.sh /tmp/
RUN ./build-node.sh 21.7.1

# Todo: separate this into a docs container
COPY build-doxygen.sh /tmp/
RUN apt-get install -y --no-install-recommends flex bison
RUN ./build-doxygen.sh

# THIS is so much crap, boost-build vcpkg port strictly requires gcc, need to fix port to bypass
#RUN apt remove -y gcc
RUN apt autoremove -y
Expand Down
2 changes: 1 addition & 1 deletion libs/confman/src/file_storage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ auto write_and_apply_retention_policy(std::string_view file_content, std::filesy
/// \param file_contents contents of the file
/// \returns A std::error_code indicating success or failure. If write fails, IO error is returned.
auto write_to_file(std::filesystem::path const& file_path, std::string_view file_contents) -> std::error_code {
auto glz_err{ glz::buffer_to_file(file_contents, file_path) };
auto glz_err{ glz::buffer_to_file(file_contents, file_path.string()) };
if (glz_err != glz::error_code::none) {
return std::make_error_code(std::errc::io_error);
}
Expand Down
6 changes: 3 additions & 3 deletions libs/confman/testing/tests/file_storage_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,15 +123,15 @@ auto main(int argc, char** argv) -> int {
file_testable<test_me> conf{ ctx, file_name, test_me{ .a = observable<int>{ 1 }, .b = "bar" } };
glz::json_t json{};
std::string buffer{};
glz::read_file_json(json, file_name.string(), buffer);
std::ignore = glz::read_file_json(json, file_name.string(), buffer);
ut::expect(static_cast<int>(json["a"].get<double>()) == 1);
ut::expect(json["b"].get<std::string>() == "bar");

conf.make_change()->a = 2;
conf.make_change()->b = "test";

buffer = {};
glz::read_file_json(json, file_name.string(), buffer);
std::ignore = glz::read_file_json(json, file_name.string(), buffer);
ut::expect(static_cast<int>(json["a"].get<double>()) == 2);
ut::expect(json["b"].get<std::string>() == "test");
};
Expand Down Expand Up @@ -161,7 +161,7 @@ auto main(int argc, char** argv) -> int {
if (backup_found) {
glz::json_t backup_json{};
std::string buffer{};
glz::read_file_json(backup_json, found_file.string(), buffer);
std::ignore = glz::read_file_json(backup_json, found_file.string(), buffer);

ut::expect(backup_json["a"].as<int>() == 3) << backup_json["a"].as<int>();
ut::expect(backup_json["b"].get<std::string>() == "bar") << backup_json["b"].get<std::string>();
Expand Down
2 changes: 1 addition & 1 deletion libs/motor/src/error.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class motor_error_category_t : public std::error_category {
// clang-format off
PRAGMA_CLANG_WARNING_PUSH_OFF(-Wglobal-constructors)
PRAGMA_CLANG_WARNING_PUSH_OFF(-Wexit-time-destructors)
constinit motor_error_category_t category_instance{};
thread_local motor_error_category_t category_instance{};
PRAGMA_CLANG_WARNING_POP
PRAGMA_CLANG_WARNING_POP
// clang-format on
Expand Down
4 changes: 2 additions & 2 deletions libs/stx/inc/public/tfc/stx/glaze_meta.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,12 @@ template <typename duration_t>
constexpr auto parse8601(const std::string& save) -> date::sys_time<duration_t> {
std::istringstream in{ save };
date::sys_time<duration_t> tp;
in >> date::parse("%FT%TZ", tp);
omarhogni marked this conversation as resolved.
Show resolved Hide resolved
date::from_stream(in, "%FT%TZ", tp);
if (in.fail()) {
in.clear();
in.exceptions(std::ios::failbit);
in.str(save);
in >> date::parse("%FT%T%Ez", tp);
date::from_stream(in, "%FT%T%Ez", tp);
}
return tp;
}
Expand Down
4 changes: 2 additions & 2 deletions vcpkg-configuration.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"default-registry": {
"kind": "git",
"repository": "https://github.com/microsoft/vcpkg",
"baseline": "66a252f70eebdd744c02d7ab8c1cc6fe123c70ee"
"repository": "https://github.com/jbbjarnason/vcpkg",
"baseline": "7bc57b8493d90d7e618e0b8319459f5b894dc01d"
},
"registries": [
{
Expand Down
4 changes: 2 additions & 2 deletions vcpkg.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"fmt",
{
"name": "glaze",
"version>=": "1.9.6"
"version>=": "2.6.4"
},
"gtest",
{
Expand All @@ -33,7 +33,7 @@
"features": [
"use-libfmt"
],
"version>=": "2.1.0"
"version>=": "2.1.1"
},
"openssl",
"pcg",
Expand Down
Loading