Skip to content

Commit

Permalink
Remove libb2 (BLAKE2) support
Browse files Browse the repository at this point in the history
  • Loading branch information
erijo committed Jun 17, 2020
1 parent 27d69d7 commit 3367633
Show file tree
Hide file tree
Showing 13 changed files with 15 additions and 143 deletions.
22 changes: 4 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,11 @@ jobs:
packages:
- elfutils
- libzstd1-dev
- libb2-dev

# Job 2: Build on Linux with native 32-bit GCC
- os: linux
compiler: gcc
env: T="Linux GCC 32-bit" VERBOSE=1 CFLAGS="-m32 -g -O2" CXXFLAGS="-m32 -g -O2" LDFLAGS="-m32" CMAKE_PARAMS="-DUSE_LIBZSTD_FROM_INTERNET=ON -DUSE_LIBB2_FROM_INTERNET=ON" ENABLE_CACHE_CLEANUP_TESTS=1
env: T="Linux GCC 32-bit" VERBOSE=1 CFLAGS="-m32 -g -O2" CXXFLAGS="-m32 -g -O2" LDFLAGS="-m32" CMAKE_PARAMS="-DUSE_LIBZSTD_FROM_INTERNET=ON" ENABLE_CACHE_CLEANUP_TESTS=1
addons:
apt:
packages:
Expand All @@ -37,7 +36,6 @@ jobs:
packages:
- elfutils
- libzstd1-dev
- libb2-dev

# Job 4: Build on Linux with native GCC and CUDA compiler
- os: linux
Expand All @@ -48,14 +46,13 @@ jobs:
packages:
- elfutils
- libzstd1-dev
- libb2-dev
before_install:
- source ./misc/install_cuda.sh

# Job 5: Build on Linux with 32-bit MinGW cross-compiler
- os: linux
compiler: i686-w64-mingw32-g++-posix
env: T="Linux MinGW 32-bit" VERBOSE=1 CC=i686-w64-mingw32-gcc-posix CXX=i686-w64-mingw32-g++-posix CMAKE_PARAMS="-DCMAKE_SYSTEM_NAME=Windows -DUSE_LIBZSTD_FROM_INTERNET=ON -DUSE_LIBB2_FROM_INTERNET=ON" RUN_TESTS=0 ENABLE_CACHE_CLEANUP_TESTS=1
env: T="Linux MinGW 32-bit" VERBOSE=1 CC=i686-w64-mingw32-gcc-posix CXX=i686-w64-mingw32-g++-posix CMAKE_PARAMS="-DCMAKE_SYSTEM_NAME=Windows -DUSE_LIBZSTD_FROM_INTERNET=ON" RUN_TESTS=0 ENABLE_CACHE_CLEANUP_TESTS=1
addons:
apt:
packages:
Expand All @@ -64,7 +61,7 @@ jobs:
# Job 6: Build on Linux with 64-bit MinGW cross-compiler
- os: linux
compiler: x86_64-w64-mingw32-g++
env: T="Linux MinGW 64-bit" VERBOSE=1 CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix CMAKE_PARAMS="-DCMAKE_SYSTEM_NAME=Windows -DUSE_LIBZSTD_FROM_INTERNET=ON -DUSE_LIBB2_FROM_INTERNET=ON" RUN_TESTS=0 ENABLE_CACHE_CLEANUP_TESTS=1
env: T="Linux MinGW 64-bit" VERBOSE=1 CC=x86_64-w64-mingw32-gcc-posix CXX=x86_64-w64-mingw32-g++-posix CMAKE_PARAMS="-DCMAKE_SYSTEM_NAME=Windows -DUSE_LIBZSTD_FROM_INTERNET=ON" RUN_TESTS=0 ENABLE_CACHE_CLEANUP_TESTS=1
addons:
apt:
packages:
Expand All @@ -73,7 +70,7 @@ jobs:
# Job 7: Build on MacOS with native Clang
- os: osx
compiler: clang
env: T="MacOS Clang" VERBOSE=1 CMAKE_PARAMS="-DUSE_LIBZSTD_FROM_INTERNET=ON -DUSE_LIBB2_FROM_INTERNET=ON" ENABLE_CACHE_CLEANUP_TESTS=1
env: T="MacOS Clang" VERBOSE=1 CMAKE_PARAMS="-DUSE_LIBZSTD_FROM_INTERNET=ON" ENABLE_CACHE_CLEANUP_TESTS=1

# Job 8: Run Clang's undefined behavior sanitizer
- os: linux
Expand All @@ -84,7 +81,6 @@ jobs:
packages:
- elfutils
- libzstd1-dev
- libb2-dev

# Job 9: Run Clang's address sanitizer
- os: linux
Expand All @@ -95,7 +91,6 @@ jobs:
packages:
- elfutils
- libzstd1-dev
- libb2-dev

# Job 10: Run Clang's static analyzer
- os: linux
Expand All @@ -105,7 +100,6 @@ jobs:
apt:
packages:
- libzstd1-dev
- libb2-dev

# Job 11: Run Clang-Tidy
- os: linux
Expand All @@ -115,7 +109,6 @@ jobs:
apt:
packages:
- libzstd1-dev
- libb2-dev

# Job 12: Run Clang-Format in check mode
- os: linux
Expand All @@ -125,7 +118,6 @@ jobs:
apt:
packages:
- libzstd1-dev
- libb2-dev
before_install:
- pip install --user cmake_format

Expand All @@ -137,7 +129,6 @@ jobs:
packages:
- elfutils
- libzstd1-dev
- libb2-dev

# Job 14: Build source package, extract it out of source, run tests.
- os: linux
Expand All @@ -147,7 +138,6 @@ jobs:
packages:
- elfutils
- libzstd1-dev
- libb2-dev

# Job 15: Build documentation
- os: linux
Expand All @@ -157,7 +147,6 @@ jobs:
packages:
- elfutils
- libzstd1-dev
- libb2-dev
- asciidoc

# Job 16: Build manpage
Expand All @@ -168,7 +157,6 @@ jobs:
packages:
- elfutils
- libzstd1-dev
- libb2-dev
- asciidoc
- xsltproc

Expand All @@ -183,7 +171,6 @@ jobs:
apt:
packages:
- libzstd1-dev
- libb2-dev

# Job 12: Run Clang-Format check mode
- os: linux
Expand All @@ -193,6 +180,5 @@ jobs:
apt:
packages:
- libzstd1-dev
- libb2-dev
before_install:
- pip install --user cmake_format
7 changes: 2 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,11 @@ include(GenerateVersionFile)
option(USE_LIBZSTD_FROM_INTERNET "Download and use libzstd from the Internet" OFF)
find_package(zstd 1.1.2 REQUIRED)

option(USE_LIBB2_FROM_INTERNET "Download and use libb2 from the Internet" OFF)
find_package(libb2 0.98 REQUIRED)

#
# Special flags
#
# Note: Cppcheck will scan everything after this point. zstd and libb2 are above
# so they don't get scanned.
# Note: Cppcheck will scan everything after this point. zstd is above so it
# doesn't get scanned.
#
include(CodeAnalysis)
option(ENABLE_TRACING "Enable possibility to use internal ccache tracing" OFF)
Expand Down
67 changes: 0 additions & 67 deletions cmake/Findlibb2.cmake

This file was deleted.

33 changes: 0 additions & 33 deletions cmake/Libb2CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion cmake/StandardWarnings.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
-Wno-conversion
-Wno-disabled-macro-expansion
-Wno-documentation-unknown-command
-Wno-error=reserved-id-macro # libb2 blake2.h
-Wno-exit-time-destructors
-Wno-format-nonliteral
-Wno-global-constructors
Expand Down
5 changes: 0 additions & 5 deletions doc/INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ To build ccache you need:
- CMake 3.4.3 or newer.
- A C++11 compiler.
- A C99 compiler.
- [libb2](https://github.com/BLAKE2/libb2). If you don't have libb2 installed
and can't or don't want to install it on your system, you can pass
`-DUSE_LIBB2_FROM_INTERNET=ON` to cmake, which will download libb2 from the
Internet and unpack it in the local binary tree.
ccache will then be linked statically to the locally built libb2.
- [libzstd](https://www.zstd.net). If you don't have libzstd installed and
can't or don't want to install it on your system, you can pass
`-DUSE_LIBZSTD_FROM_INTERNET=ON` to cmake, which will download libzstd from
Expand Down
1 change: 0 additions & 1 deletion dockerfiles/debian-10-buster/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
elfutils \
gcc-multilib \
libb2-dev \
libzstd-dev \
xsltproc \
&& rm -rf /var/lib/apt/lists/*
Expand Down
1 change: 0 additions & 1 deletion dockerfiles/debian-9-stretch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
elfutils \
gcc-multilib \
libb2-dev \
libzstd-dev \
xsltproc \
&& rm -rf /var/lib/apt/lists/*
Expand Down
1 change: 0 additions & 1 deletion dockerfiles/travis/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ RUN apt-get -qq update && apt-get install -y --no-install-recommends \
RUN apt-get -qq update && apt-get install -y --no-install-recommends \
elfutils \
libzstd1-dev \
libb2-dev \
wget \
ca-certificates \
&& rm -rf /var/lib/apt/lists/*
1 change: 0 additions & 1 deletion dockerfiles/ubuntu-16-xenial/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
elfutils \
gcc-multilib \
libb2-dev \
libzstd1-dev \
xsltproc \
&& rm -rf /var/lib/apt/lists/*
Expand Down
1 change: 0 additions & 1 deletion dockerfiles/ubuntu-20-focal/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y --no-i
cmake \
elfutils \
gcc-multilib \
libb2-dev \
#libzstd1-dev \ not available?!
xsltproc \
&& rm -rf /var/lib/apt/lists/*
Expand Down
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ endif()
find_package(Threads REQUIRED)
target_link_libraries(
ccache_lib
PRIVATE standard_settings standard_warnings ZSTD::ZSTD libb2::libb2
PRIVATE standard_settings standard_warnings ZSTD::ZSTD
Threads::Threads third_party_lib)

target_include_directories(ccache_lib PRIVATE ${CMAKE_BINARY_DIR} .)
Expand Down
16 changes: 8 additions & 8 deletions test-all-systems.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ echo "Warning: Docker support is rather experimental\n"

# Ubuntu (ancient, old and latest)

# zstd and libb2 not available for Ubuntu 14.
CC=gcc CXX=g++ CMAKE_PARAMS="-DUSE_LIBZSTD_FROM_INTERNET=ON -DUSE_LIBB2_FROM_INTERNET=ON" ./docker.sh ubuntu-14-trusty
# zstd not available for Ubuntu 14.
CC=gcc CXX=g++ CMAKE_PARAMS="-DUSE_LIBZSTD_FROM_INTERNET=ON" ./docker.sh ubuntu-14-trusty

# See https://github.com/ccache/ccache/issues/601
#CC=clang CXX=clang++ CMAKE_PARAMS="-DUSE_LIBZSTD_FROM_INTERNET=ON -DUSE_LIBB2_FROM_INTERNET=ON" ./docker.sh ubuntu-14-tusty
#CC=clang CXX=clang++ CMAKE_PARAMS="-DUSE_LIBZSTD_FROM_INTERNET=ON" ./docker.sh ubuntu-14-tusty

CC=gcc CXX=g++ ./docker.sh ubuntu-16-xenial
CC=clang CXX=clang++ ./docker.sh ubuntu-16-xenial
Expand All @@ -43,9 +43,9 @@ echo "Warning: Docker support is rather experimental\n"

# Alpine (old and latest)

CC=gcc CXX=g++ CMAKE_PARAMS="-DUSE_LIBZSTD_FROM_INTERNET=ON -DUSE_LIBB2_FROM_INTERNET=ON" ./docker.sh alpine-3.4
CC=gcc CXX=g++ CMAKE_PARAMS="-DUSE_LIBZSTD_FROM_INTERNET=ON" ./docker.sh alpine-3.4
# Clang is not capable to compile libzstd from internet before alpine 3.12 (Some SSE2 error regarding missing file emmintrin.h)
#CC=clang CXX=clang++ CMAKE_PARAMS="-DUSE_LIBZSTD_FROM_INTERNET=ON -DUSE_LIBB2_FROM_INTERNET=ON" ./docker.sh alpine-3.4
CC=clang CXX=clang++ CMAKE_PARAMS="-DUSE_LIBZSTD_FROM_INTERNET=ON -DUSE_LIBB2_FROM_INTERNET=ON" ./docker.sh alpine-3.12
CC=gcc CXX=g++ CMAKE_PARAMS="-DUSE_LIBB2_FROM_INTERNET=ON" ./docker.sh alpine-3.12
CC=clang CXX=clang++ CMAKE_PARAMS="-DUSE_LIBB2_FROM_INTERNET=ON" ./docker.sh alpine-3.12
#CC=clang CXX=clang++ CMAKE_PARAMS="-DUSE_LIBZSTD_FROM_INTERNET=ON" ./docker.sh alpine-3.4
CC=clang CXX=clang++ CMAKE_PARAMS="-DUSE_LIBZSTD_FROM_INTERNET=ON" ./docker.sh alpine-3.12
CC=gcc CXX=g++ ./docker.sh alpine-3.12
CC=clang CXX=clang++ ./docker.sh alpine-3.12

0 comments on commit 3367633

Please sign in to comment.