forked from rlane/ubpf
-
Notifications
You must be signed in to change notification settings - Fork 128
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
Commit 089f627 leads to library linking errors due to header file missing <stdbool.h> #38
Comments
sbates130272
changed the title
Commit 089f6279752adfb01386600d119913403ed326ee leads to library linking errors due to header file
Commit 089f627 leads to library linking errors due to header file missing <stdbool.h>
Oct 8, 2020
sbates130272
added a commit
to sbates130272/ubpf
that referenced
this issue
Oct 8, 2020
Commit 089f627 added the bool type to an external function but did not add the approriate header to define that type. This still allowed the library to be built because <stdbool.h> was included in the internal library source files. However it causes issues when linking to this library from other programs. Fixes iovisor#38
iomartin
added a commit
to Eideticom/eid-hermes-qemu
that referenced
this issue
Oct 19, 2020
uBPF[1] is a userspace eBPF virtual machine, which includes an assembler, disassembler, interpreter and JIT compiler for x86-64. Because it is not part of the kernel, it can be used by userspace tools that need to operate on programs in the eBPF ISA. We need this to enable the hermes device model. There is currently an open issue on uBPF[2] that requires the inclusion of stdbool.h as well as ubpf.h. A PR has been opened[3], but has not yet been merged into upstream, so we add that header to our configure script. [1]: https://github.com/iovisor/ubpf [2]: iovisor/ubpf#38 [3]: iovisor/ubpf#39 Signed-off-by: Martin Oliveira <martin.oliveira@eideticom.com>
pchaigno
pushed a commit
that referenced
this issue
Jan 19, 2021
Commit 089f627 added the bool type to an external function but did not add the approriate header to define that type. This still allowed the library to be built because <stdbool.h> was included in the internal library source files. However it causes issues when linking to this library from other programs. Fixes #38
niclashedam
pushed a commit
to niclashedam/eid-hermes-qemu
that referenced
this issue
Feb 17, 2021
uBPF[1] is a userspace eBPF virtual machine, which includes an assembler, disassembler, interpreter and JIT compiler for x86-64. Because it is not part of the kernel, it can be used by userspace tools that need to operate on programs in the eBPF ISA. We need this to enable the hermes device model. There is currently an open issue on uBPF[2] that requires the inclusion of stdbool.h as well as ubpf.h. A PR has been opened[3], but has not yet been merged into upstream, so we add that header to our configure script. [1]: https://github.com/iovisor/ubpf [2]: iovisor/ubpf#38 [3]: iovisor/ubpf#39 Signed-off-by: Martin Oliveira <martin.oliveira@eideticom.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In 089f627 we added bounds_checks and introduced the bool type in ubpf.h which requires that <stdbool.h> be added to the include path. Since <stdbool.h> was already used internally this did not impact the compilation of libubpf.a. However this does cause a regression issue when linking to the library from a program that does currently include <stdbool.h>.
For example prior to commit 089f627 the following would compile using gcc:
but post this commit this now fails with
I think the correct way to solve this is to add <stdbool.h> to the external facing header file (ubpf.h) and optionally remove this from the internal files. I am happy to do a patch for this if required.
The text was updated successfully, but these errors were encountered: