edgexfoundry / edgexfoundry/device-can
make docker and setup errors
- Dominant language
- C
- Stars
- 6
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
# 🐞 Bug Report
### Affected Services [**REQUIRED**]
The issue is located in:
It's the device-can.
### Is this a regression?
Yes, the previous version in which this bug was not present was: ....
There's no previous version
### Description and Minimal Reproduction [**REQUIRED**]
Not sure if this device is available or not since there is no tag although it hasn't some much activity lately.
We're trying to use it but we find several issues.
The first one is that the command **make docker** doesn't work since the **version target** in the Makefile doesn't work properly because in the git describe there is no tag.
Additionally, if in the VERSION file we enter the 0.0.0 version (for example), the docker seems to work fine but in reality, the building is failing since the library execinfo is not included in the version 3.18 of alpine.
```
#16 0.570 [ 50%] Building C object CMakeFiles/device-can.dir/c/device-can.c.o
#16 0.597 /device-can/src/c/device-can.c:29:10: fatal error: execinfo.h: No such file or directory
#16 0.597 29 | #include
#16 0.597 | ^~~~~~~~~~~~
#16 0.597 compilation terminated.
```
Putting the alpine 3.16, adding the library and changing the SDK version to 3.1.0, the error seems to disappear.
In the Dockerfile adding:
```
RUN apk add --update --no-cache ...... libexecinfo-dev
```
In the CMakelist.txt
```
`target_link_libraries (device-can PRIVATE execinfo)`
```
## 🔥 Exception or Error
```
make docker
docker build \
-f scripts/Dockerfile.alpine \
--label "git_sha=d651ea3b6a910acc67fc03659010dbc4d0ea4ccf" \
-t edgexfoundry/device-can:d651ea3b6a910acc67fc03659010dbc4d0ea4ccf \
-t edgexfoundry/device-can:-dev \
.
[+] Building 0.0s (0/0) docker:default
ERROR: invalid tag "edgexfoundry/device-can:-dev": invalid reference format
make: *** [Makefile:34: docker_device_can] Error 1
```
## 🌍 Your Environment
**Deployment Environment:**
**EdgeX Version [**REQUIRED**]:** 3.1
**Anything else relevant?**
Contributor guide
Assessment
This issue has not been assessed yet.