1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-30 00:00:11 +01:00

Merge branch 'ci-fixes-raspbian' into 'master'

Compatibility and CI fixes for Raspbian builds

See merge request acs/public/villas/VILLASnode!51
This commit is contained in:
Steffen Vogel 2019-10-18 10:44:47 +02:00
commit 0767a01408
4 changed files with 30 additions and 15 deletions

View file

@ -95,8 +95,7 @@ build:raspbian:armv6l:
variables: variables:
DOCKER_IMAGE_DEV: villas/node-dev-raspbian DOCKER_IMAGE_DEV: villas/node-dev-raspbian
CMAKE_OPTS: -DWITH_NODE_INFINIBAND=OFF CMAKE_OPTS: -DWITH_NODE_INFINIBAND=OFF
only: when: manual
- master
build:debian-multiarch:armhf: build:debian-multiarch:armhf:
extends: build:fedora:x86_64 extends: build:fedora:x86_64

View file

@ -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 raw_samples_available = bytes_available / d->sample_size;
const size_t villas_samples_available = raw_samples_available / d->chanlist_len; 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); 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); bytes_available / 1024, bytes_requested / 1024);
if (cnt > villas_samples_available) 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; smps[i]->length = d->chanlist_len;
if (smps[i]->capacity < 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); 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); memmove(c->buf, c->bufptr, bytes_left);
} }
info("consumed %ld bytes", bytes_consumed); info("consumed %zd bytes", bytes_consumed);
/* Start at the beginning again */ /* Start at the beginning again */
c->bufptr = c->buf; c->bufptr = c->buf;
@ -857,7 +857,7 @@ int comedi_write(struct node *n, struct sample *smps[], unsigned cnt, unsigned *
else { else {
struct timespec now = time_now(); struct timespec now = time_now();
if (time_delta(&d->last_debug, &now) >= 1) { 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, villas_samples_in_buffer,
(100.0f * villas_samples_in_buffer / buffer_capacity_villas)); (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) { while (villas_samples_written < cnt) {
struct sample *sample = smps[villas_samples_written]; struct sample *sample = smps[villas_samples_written];
if (sample->length != d->chanlist_len) 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); sample->length, d->chanlist_len);
d->bufptr = d->buffer; d->bufptr = d->buffer;

View file

@ -36,7 +36,7 @@ set(DOCKER_RUN_OPTS
--volume \"${PROJECT_SOURCE_DIR}:/villas\" --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} add_custom_target(deploy-docker-${SUFFIX}
COMMAND docker push ${DOCKER_IMAGE}-${SUFFIX}:${DOCKER_TAG} COMMAND docker push ${DOCKER_IMAGE}-${SUFFIX}:${DOCKER_TAG}
COMMAND docker push ${DOCKER_IMAGE}-${SUFFIX}:latest COMMAND docker push ${DOCKER_IMAGE}-${SUFFIX}:latest

View file

@ -28,14 +28,16 @@ ARG VERSION=unknown
ARG VARIANT=unknown ARG VARIANT=unknown
# Toolchain # Toolchain
RUN apt-get update && apt-get install -y \ RUN apt-get update && \
apt-get install -y \
autoconf automake libtool cmake \ autoconf automake libtool cmake \
pkg-config make gcc g++\ pkg-config make gcc g++\
git curl wget tar bzip2 \ git curl wget tar bzip2 \
protobuf-compiler protobuf-c-compiler protobuf-compiler protobuf-c-compiler
# Dependencies # Dependencies
RUN apt-get install -y\ RUN apt-get update && \
apt-get install -y\
libssl-dev \ libssl-dev \
libprotobuf-dev \ libprotobuf-dev \
libprotobuf-c-dev \ libprotobuf-c-dev \
@ -51,9 +53,7 @@ RUN apt-get install -y\
libcomedi-dev \ libcomedi-dev \
librdmacm-dev \ librdmacm-dev \
libre-dev \ libre-dev \
libusb-1.0-0-dev \ libusb-1.0-0-dev
libspdlog-dev \
libfmt-dev
ENV CC=gcc ENV CC=gcc
ENV CXX=g++ ENV CXX=g++
@ -61,6 +61,22 @@ ENV CXX=g++
# Add CMake install dir to PATH # Add CMake install dir to PATH
ENV PATH="usr/local/bin:${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 # Build & Install libwebsockets
RUN cd /tmp && \ RUN cd /tmp && \
git clone -b v3.1-stable https://github.com/warmcat/libwebsockets && \ git clone -b v3.1-stable https://github.com/warmcat/libwebsockets && \