Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(epics): Fix include path -- at least on Debuan unstable. #4298

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

octo
Copy link
Member

@octo octo commented Apr 9, 2024

ChangeLog: Epics plugin: The include path for header files has been adapted to new versions of the epics-base package.

@octo octo requested a review from a team as a code owner April 9, 2024 13:08
@collectd-bot collectd-bot added the Fix A pull request fixing a bug label Apr 9, 2024
@matwey
Copy link
Contributor

matwey commented Apr 9, 2024

How did you learn it? There is no epics directory in include path at all when epics is installed manually. I supposed that pkg-config should provide full correct path to the header.

@octo
Copy link
Member Author

octo commented Apr 9, 2024

Hey @matwey! I stumbled over this, because our build for Debian unstable currently fails with the following error:

src/epics.c:26:10: fatal error: cadef.h: No such file or directory
   26 | #include <cadef.h>
      |          ^~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:8195: src/epics_la-epics.lo] Error 1

Looking at the list of files in the epics-base package you can see that the file is at /usr/local/epics/cadef.h.

Side note: An easy way to inspect our CI environment is by pulling the Docker container:

docker image pull collectd/ci:debian_unstable
docker run -ti collectd/ci:debian_unstable

Unfortunately the build still fails due to a broken include. I have reported this upstream at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1068708

The epics-base package seems to be very new and quite experimental. If you know how this should ideally be layed out to work properly, please share your expertise on the Debian bug – I think the package maintainers could really benefit from it.

I'll revert this PR to "draft" since it doesn't actually fix the issue.

@matwey
Copy link
Contributor

matwey commented Apr 11, 2024

Hey @matwey! I stumbled over this, because our build for Debian unstable currently fails with the following error:

src/epics.c:26:10: fatal error: cadef.h: No such file or directory
   26 | #include <cadef.h>
      |          ^~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:8195: src/epics_la-epics.lo] Error 1

Looking at the list of files in the epics-base package you can see that the file is at /usr/local/epics/cadef.h.

Side note: An easy way to inspect our CI environment is by pulling the Docker container:

docker image pull collectd/ci:debian_unstable
docker run -ti collectd/ci:debian_unstable

Unfortunately the build still fails due to a broken include. I have reported this upstream at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1068708

# pkg-config --cflags epics-base
-I/build/reproducible-path/epics-base-7.0.8+dfsg1/include -I/build/reproducible-path/epics-base-7.0.8+dfsg1/include/os/Linux -I/build/reproducible-path/epics-base-7.0.8+dfsg1/include/compiler/gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_X86_64_ -DUNIX -Dlinux -ffile-prefix-map=/build/reproducible-path/epics-base-7.0.8+dfsg1=. -D_FORTIFY_SOURCE=2 -ffile-prefix-map=/build/reproducible-path/epics-base-7.0.8+dfsg1=. -fstack-protector-strong -fstack-clash-protection -fcf-protection -D_FORTIFY_SOURCE=2 -mtune=generic -m64

pkg-config is still not fixed in Debian. This command should provide correct include paths for building.

The epics-base package seems to be very new and quite experimental. If you know how this should ideally be layed out to work properly, please share your expertise on the Debian bug – I think the package maintainers could really benefit from it.

I'll revert this PR to "draft" since it doesn't actually fix the issue.

@kenhys
Copy link
Contributor

kenhys commented May 4, 2024

@octo @matwey

FYI:
I've dig the bug report and sent a PoC patch to fix this issue. waiting triage from maintainer.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059706#38

@matwey
Copy link
Contributor

matwey commented May 4, 2024

@octo @matwey

FYI: I've dig the bug report and sent a PoC patch to fix this issue. waiting triage from maintainer. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1059706#38

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix A pull request fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants