diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 53190efe4..acc57b3e6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -95,8 +95,7 @@ build:raspbian:armv6l: variables: DOCKER_IMAGE_DEV: villas/node-dev-raspbian CMAKE_OPTS: -DWITH_NODE_INFINIBAND=OFF - only: - - master + when: manual build:debian-multiarch:armhf: extends: build:fedora:x86_64 diff --git a/lib/nodes/comedi.cpp b/lib/nodes/comedi.cpp index ce6a42c52..5adaaa6c2 100644 --- a/lib/nodes/comedi.cpp +++ b/lib/nodes/comedi.cpp @@ -561,10 +561,10 @@ int comedi_read(struct node *n, struct sample *smps[], unsigned cnt, unsigned *r const size_t raw_samples_available = bytes_available / d->sample_size; const size_t villas_samples_available = raw_samples_available / d->chanlist_len; - info("there are %ld bytes available (%ld requested) => %ld villas samples", + info("there are %zd bytes available (%zu requested) => %zu villas samples", bytes_available, bytes_requested, villas_samples_available); - info("there are %ld kB available (%ld kB requested)", + info("there are %zu kB available (%zu kB requested)", bytes_available / 1024, bytes_requested / 1024); if (cnt > villas_samples_available) @@ -582,7 +582,7 @@ int comedi_read(struct node *n, struct sample *smps[], unsigned cnt, unsigned *r smps[i]->length = d->chanlist_len; if (smps[i]->capacity < d->chanlist_len) { - error("Sample has insufficient capacity: %d < %ld", + error("Sample has insufficient capacity: %d < %zd", smps[i]->capacity, d->chanlist_len); } @@ -611,7 +611,7 @@ int comedi_read(struct node *n, struct sample *smps[], unsigned cnt, unsigned *r memmove(c->buf, c->bufptr, bytes_left); } - info("consumed %ld bytes", bytes_consumed); + info("consumed %zd bytes", bytes_consumed); /* Start at the beginning again */ c->bufptr = c->buf; @@ -857,7 +857,7 @@ int comedi_write(struct node *n, struct sample *smps[], unsigned cnt, unsigned * else { struct timespec now = time_now(); if (time_delta(&d->last_debug, &now) >= 1) { - debug(LOG_COMEDI | 2, "Comedi write buffer: %4ld villas samples (%2.0f%% of buffer)", + debug(LOG_COMEDI | 2, "Comedi write buffer: %4zd villas samples (%2.0f%% of buffer)", villas_samples_in_buffer, (100.0f * villas_samples_in_buffer / buffer_capacity_villas)); @@ -870,7 +870,7 @@ int comedi_write(struct node *n, struct sample *smps[], unsigned cnt, unsigned * while (villas_samples_written < cnt) { struct sample *sample = smps[villas_samples_written]; if (sample->length != d->chanlist_len) - error("Value count in sample (%d) != configured output channels (%ld)", + error("Value count in sample (%d) != configured output channels (%zd)", sample->length, d->chanlist_len); d->bufptr = d->buffer; diff --git a/packaging/docker/CMakeLists.txt b/packaging/docker/CMakeLists.txt index 8efb4d05e..7f8957e15 100644 --- a/packaging/docker/CMakeLists.txt +++ b/packaging/docker/CMakeLists.txt @@ -36,7 +36,7 @@ set(DOCKER_RUN_OPTS --volume \"${PROJECT_SOURCE_DIR}:/villas\" ) -foreach(SUFFIX app dev dev-centos dev-ubuntu) +foreach(SUFFIX app dev dev-centos dev-ubuntu dev-raspbian) add_custom_target(deploy-docker-${SUFFIX} COMMAND docker push ${DOCKER_IMAGE}-${SUFFIX}:${DOCKER_TAG} COMMAND docker push ${DOCKER_IMAGE}-${SUFFIX}:latest @@ -66,7 +66,7 @@ foreach(SUFFIX app dev dev-centos dev-ubuntu) add_dependencies(deploy-docker-${SUFFIX} docker-${SUFFIX}) add_dependencies(run-docker-${SUFFIX} docker-${SUFFIX}) endforeach() - + # Special cases for 'docker' target add_custom_target(run-docker COMMAND docker run ${DOCKER_RUN_OPTS} ${DOCKER_IMAGE}:${DOCKER_TAG} node -h diff --git a/packaging/docker/Dockerfile.dev-raspbian b/packaging/docker/Dockerfile.dev-raspbian index da1fd4139..93aa1e313 100644 --- a/packaging/docker/Dockerfile.dev-raspbian +++ b/packaging/docker/Dockerfile.dev-raspbian @@ -28,14 +28,16 @@ ARG VERSION=unknown ARG VARIANT=unknown # Toolchain -RUN apt-get update && apt-get install -y \ +RUN apt-get update && \ + apt-get install -y \ autoconf automake libtool cmake \ pkg-config make gcc g++\ git curl wget tar bzip2 \ protobuf-compiler protobuf-c-compiler # Dependencies -RUN apt-get install -y\ +RUN apt-get update && \ + apt-get install -y\ libssl-dev \ libprotobuf-dev \ libprotobuf-c-dev \ @@ -51,9 +53,7 @@ RUN apt-get install -y\ libcomedi-dev \ librdmacm-dev \ libre-dev \ - libusb-1.0-0-dev \ - libspdlog-dev \ - libfmt-dev + libusb-1.0-0-dev ENV CC=gcc ENV CXX=g++ @@ -61,6 +61,22 @@ ENV CXX=g++ # Add CMake install dir to PATH ENV PATH="usr/local/bin:${PATH}" +# Build & Install fmtlib +RUN cd /tmp && \ + git clone --recursive https://github.com/fmtlib/fmt.git && \ + mkdir -p fmt/build && cd fmt/build && \ + git checkout 5.2.0 && \ + cmake -DBUILD_SHARED_LIBS=1 .. && make -j$(nproc) install && \ + rm -rf /tmp/* + +# Build & Install spdlog +RUN cd /tmp && \ + git clone --recursive https://github.com/gabime/spdlog.git && \ + mkdir -p spdlog/build && cd spdlog/build && \ + git checkout v1.3.1 && \ + cmake -DCMAKE_BUILD_TYPE=Release -DSPDLOG_FMT_EXTERNAL=1 -DSPDLOG_BUILD_BENCH=OFF .. && make -j$(nproc) install && \ + rm -rf /tmp/* + # Build & Install libwebsockets RUN cd /tmp && \ git clone -b v3.1-stable https://github.com/warmcat/libwebsockets && \