Skip to content
This repository has been archived by the owner on Dec 19, 2022. It is now read-only.

Add edinburgh snap #16

Merged
merged 3 commits into from
Jun 27, 2019

Conversation

anonymouse64
Copy link
Contributor

Duplicate of #15, but for Edinburgh as we need an Edinburgh snap to build the dev kit image.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
Previously, this would fail in a clean ubuntu 18.04 instance with:

[100%] Linking C executable device-grove
/usr/bin/ld: CMakeFiles/device-grove.dir/main.c.o: undefined reference to symbol 'sem_post@@GLIBC_2.2.5'
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

This is the simplest way to link to pthreads from this project without
digging into the c-sdk, etc.

Also set the c standard to c99 in a more portable way by setting 
CMAKE_C_STANDARD.

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
* Add an install hook to copy the configuration file and default device
  profile from read-only $SNAP into $SNAP_DATA for use from the service.
  This is so users can modify the configuration.toml file and device
  profile easily
* Build the device-sdk-c from source on the edinburgh branch
* Use sed to modify the hostname for EdgeX services as localhost by
  default
* Patch libmraa using the patch in this repo before building it
* Stage all of the source files from iotech-c-utils and tomlc99 into
  $SNAPCRAFT_STAGE, then copy from there to the src directory of
  device-sdk-c before building device-sdk-c to handle the deps. This
  mirrors what the upstream build.sh script does as close as possible.
* Use environment variables for the options to launch device-grove 
  due to https://bugs.launchpad.net/snapd/+bug/1827392 because we can't
  have "=" in the snap command specification

Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
@anonymouse64
Copy link
Contributor Author

@SteveOss please review this as well when you get a chance

Copy link
Member

@SteveOss SteveOss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@SteveOss SteveOss merged commit fc1883a into edgexfoundry:edinburgh Jun 27, 2019
@anonymouse64 anonymouse64 deleted the feature/edinburgh-snap branch August 2, 2019 02:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants