fluent / cfl

Tiny library for data structures management, call it c:\ floppy
Apache License 2.0
0 stars 6 forks source link

Build failures on older targets #17

Closed patrick-stephens closed 2 years ago

patrick-stephens commented 2 years ago

Using CFL in Fluent Bit is currently showing various build issues for the targets we do not explicitly build here:

These seem to fail in the same way, e.g. https://github.com/fluent/fluent-bit/actions/runs/3059154101/jobs/4936214712#step:7:1319

#11 2.466 CMake Error at lib/cfl/src/CMakeLists.txt:24 (install):
#11 2.466   install TARGETS given no ARCHIVE DESTINATION for static library target
#11 2.466   "cfl-static".
#11 2.466 

To reproduce these failures directly just run a build container like so:

$ docker run --rm -it debian:buster /bin/sh -c 'apt-get update && apt-get install -y build-essential cmake make git && git clone https://github.com/fluent/cfl.git && cd cfl && cmake -DCFL_DEV=on . && make'
...
-- The C compiler identification is GNU 8.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test CFL_HAVE_TIMESPEC_GET
-- Performing Test CFL_HAVE_TIMESPEC_GET - Success
-- Performing Test CFL_HAVE_GMTIME_R
-- Performing Test CFL_HAVE_GMTIME_R - Success
-- Performing Test CFL_HAVE_GMTIME_S
-- Performing Test CFL_HAVE_GMTIME_S - Failed
-- Performing Test CFL_HAVE_CLOCK_GET_TIME
-- Performing Test CFL_HAVE_CLOCK_GET_TIME - Failed
-- xxHash build type: Debug
CMake Error at src/CMakeLists.txt:24 (install):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "cfl-static".

-- Configuring incomplete, errors occurred!

We should expand builds to include these I think.

Separately the CMake minimum required seems to be 3.12 via the usage of add_compile_definitions here: https://github.com/fluent/cfl/blob/cfc5f774a624bd9068d6c3e65b41224dc13c0f5f/lib/xxhash/cmake_unofficial/CMakeLists.txt#L47