Skip to content

#include <sys/signal.h> from os-posix.h causes compiler warnings in Alpine Linux  #438

@astrogeco

Description

@astrogeco

Describe the bug
When trying to build the cFS bundle using Alpine Linux using the musl library we get a gcc error:
#warning redirecting incorrect #include <sys/signal.h> to <signal.h>

From my seaarches It seems that sys/signal.h is an older implementation.

To Reproduce
Build and run the following Docker image

# Dockerfile to make cFS testing platform independent. Based on .travis.yml from cfs-Bundle repo
FROM alpine:3.11

RUN apk add \
  build-base \
  cmake \
  git

RUN echo -e "http://dl-cdn.alpinelinux.org/alpine/edge/community\nhttp://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories
RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing \
    perf

# Force image rebuild if bundle has changed since last build
ADD https://api.github.com/repos/nasa/cfs/git/refs/heads/master version.json

# Get current bundle
RUN git clone --recurse-submodules -j8 https://github.com/nasa/cFS.git

# Define cfs environment variables
ENV \
  BUILDTYPE=debug \
  CFS_ROOT=/cFS \
  ENABLE_UNIT_TESTS=true \
  OMIT_DEPRECATED=false \
  SIMULATION=native

# Set up for build
RUN cp $CFS_ROOT/cfe/cmake/Makefile.sample $CFS_ROOT/Makefile
RUN cp -r $CFS_ROOT/cfe/cmake/sample_defs $CFS_ROOT/sample_defs

# Run make at startup
ENTRYPOINT make -C $CFS_ROOT

Build and run the container:

Build: docker build --tag cfs-bundle:alpine DOCKERFILE_DIRECTORY Run: docker run -it --rm cfs-bundle:alpine`

Expected behavior
cFS Build like with Travis CI and Ubuntu

Code snips
In os-posix.h:40: #include <sys/signal.h>

System observed on:
Docker Desktop 2.2.0.4
OSX 10.14.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions