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

MINIFICPP-1121 - Upgrade spdlog to version 1.8.0 #837

Closed

Conversation

hunyadi-dev
Copy link
Contributor

This is a draft PR used for running CI jobs on different platforms.

Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.

In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced
    in the commit message?

  • Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically master)?

  • Is your initial contribution a single, squashed commit?

For code changes:

  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file?
  • If applicable, have you updated the NOTICE file?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

Note:

Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.

@hunyadi-dev hunyadi-dev force-pushed the MINIFICPP-1121_spdlog_upgrade branch 3 times, most recently from d89f489 to 4e6909c Compare July 16, 2020 07:25
@hunyadi-dev hunyadi-dev marked this pull request as ready for review July 16, 2020 07:56
@hunyadi-dev hunyadi-dev force-pushed the MINIFICPP-1121_spdlog_upgrade branch 2 times, most recently from b467ba8 to 8116851 Compare July 16, 2020 09:04
LICENSE Show resolved Hide resolved
NOTICE Outdated Show resolved Hide resolved
@hunyadi-dev hunyadi-dev force-pushed the MINIFICPP-1121_spdlog_upgrade branch 5 times, most recently from 1d5ab27 to aa02d18 Compare July 20, 2020 11:15
CMakeLists.txt Outdated Show resolved Hide resolved
libminifi/test/TestBase.cpp Outdated Show resolved Hide resolved
LICENSE Show resolved Hide resolved
@hunyadi-dev hunyadi-dev force-pushed the MINIFICPP-1121_spdlog_upgrade branch 3 times, most recently from 58ab0ea to 88f4425 Compare August 4, 2020 12:30
@szaszm
Copy link
Member

szaszm commented Aug 10, 2020

Could you rebase to main? Two reasons: 1. there are conflicts, 2. there are more CI failures than the usual flickers, but they don't seem to be related, so I would like to see another run.

@hunyadi-dev hunyadi-dev force-pushed the MINIFICPP-1121_spdlog_upgrade branch 2 times, most recently from 4eb3541 to 2fe7f0a Compare August 12, 2020 09:25
@hunyadi-dev
Copy link
Contributor Author

The slow speed on the builds are probably not only due to cache misses. Local builds (on a MacBook Pro 16", 2019) show similar clean build speeds when not using ccache:

cd .. && rm -rf build && mkdir build && cd build && cmake -G Ninja -DCMAKE_BUILD_TYPE=Debug -DFORCE_COLORED_OUTPUT=ON -DENABLE_LIBRDKAFKA=ON -DENABLE_PYTHON=ON -DENABLE_COAP=ON -DSKIP_TESTS=  -DUSE_SHARED_LIBS=ON  -DPORTABLE=ON  -DBUILD_ROCKSDB=ON  -DBUILD_IDENTIFIER= ../src && export CCACHE_DISABLE=1 && time ninja -j4
  1. On this branch:

    ninja -j4 3536.57s user 429.61s system 442% cpu 14:56.78 total

  2. Reference (main):

    ninja -j4 2823.80s user 439.10s system 457% cpu 11:53.96 total

Please review for potential loss of build speeds. Is it worth the effort of upgrading?

@hunyadi-dev hunyadi-dev marked this pull request as draft September 8, 2020 10:01
@hunyadi-dev
Copy link
Contributor Author

I got rid of the cmake issue in make debian.

* by upgrading to debian 10 buster: [https://github.com/szaszm/nifi-minifi-cpp/tree/spdlog_upgrade_debian_buster](https://github.com/szaszm/nifi-minifi-cpp/tree/spdlog_upgrade_debian_buster?rgh-link-date=2020-11-20T12%3A42%3A17Z)

* by using stretch-backports and stretch-backports-sloppy (due to an accidental upload to backports by the package maintainer): [https://github.com/szaszm/nifi-minifi-cpp/tree/MINIFICPP-1121_spdlog_upgrade](https://github.com/szaszm/nifi-minifi-cpp/tree/MINIFICPP-1121_spdlog_upgrade?rgh-link-date=2020-11-20T12%3A42%3A17Z)

Thanks, that is a great addition, I cherry picked the latter to this PR.

Copy link
Member

@szaszm szaszm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is ready for merge but let's wait for one approval besides mine because of the latest changes. @fgerlits @arpadboda

Copy link
Contributor

@fgerlits fgerlits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor, but the PR comment still says this is a draft PR.

RUN echo "deb http://deb.debian.org/debian stretch-backports main" | tee -a /etc/apt/sources.list \
&& echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" | tee -a /etc/apt/sources.list \
&& apt-get update && apt-get install -y openjdk-8-jdk libpython3.5-dev openjdk-8-source sudo git maven \
&& apt-get -t stretch-backports-sloppy install -y libarchive13\
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need the system libarchive? We bundle that.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a dependency of cmake. The maintainer incorrectly uploaded cmake 3.16 (instead of 3.13) to the amd64 stretch-backports, which depends on libarchive >=3.3.3. The version in the stretch repos is 3.2 and there is no libarchive in stretch-backports, so this is a workaround.

See this bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=954852
and see the inconsistent version near the bottom of this page: https://packages.debian.org/stretch-backports/cmake

Comment on lines +21 to +32
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set(BYPRODUCT "lib/spdlogd.lib")
else()
set(BYPRODUCT "lib/spdlog.lib")
endif()
else()
include(GNUInstallDirs)
if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
set(BYPRODUCT "${CMAKE_INSTALL_LIBDIR}/libspdlogd.a")
else()
set(BYPRODUCT "${CMAKE_INSTALL_LIBDIR}/libspdlog.a")
endif()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happened here? I think I remember a commit which changed these to generator expressions, but now the generator expressions are not there.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cmake/BundledSpdlog.cmake Outdated Show resolved Hide resolved
@szaszm
Copy link
Member

szaszm commented Dec 8, 2020

There are some compilation errors caused by the last change

@hunyadi-dev
Copy link
Contributor Author

@szaszm rebased and updated again...

@szaszm
Copy link
Member

szaszm commented Dec 9, 2020

This is the issue: https://github.com/apache/nifi-minifi-cpp/pull/837/checks?check_run_id=1522646567#step:5:14323
Similar to ec40383, probably just missing includes.

hunyadi-dev and others added 15 commits December 10, 2020 14:13
…eplace incompatible interface

Dependency directory is yet to be renamed in this commit.
…uto, change return types in LoggerConfiguration sink creation
chmod a+x debian using stretch-backports
…g compile times

Co-authored-by: adamdebreceni <64783590+adamdebreceni@users.noreply.github.com>
@szaszm szaszm closed this in 8f7a946 Dec 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants