Skip to content

Conversation

@Madeeks
Copy link

@Madeeks Madeeks commented Dec 22, 2025

When attempting to build the LNX provider as DSO (i.e. using the --enable-lnx=dl configure flag), the build fails with errors related to missing headers and GNU macros.

Setting CPPFLAGS for the liblnx-fi object to expose the missing resources during compilation makes the build succeed.

pkglib_LTLIBRARIES += liblnx-fi.la
liblnx_fi_la_SOURCES = $(_lnx_files) $(_lnx_headers)
liblnx_fi_la_CPPFLAGS = -I$(top_srcdir)/prov/lnx/include -I$(top_srcdir)/include
liblnx_fi_la_CPPFLAGS = -I$(top_srcdir)/prov/lnx/include -I$(top_srcdir)/include -D_GNU_SOURCE
Copy link
Contributor

Choose a reason for hiding this comment

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

if enabling GNU extensions is truly necessary to get a functional build, IMO the only acceptable way to do it is to add AC_USE_SYSTEM_EXTENSIONS at the top level. I'm opposed to mixing code with/without gnu extensions in the same project on a by-target basis. (Either this project is portable extensionless C99, or it isn't, but enabling extensions only on a select group of translation units doesn't change that reality, it just causes compatibility bugs when struct time_t varies in size unexpectedly between translation units... just as one example of how these small differences can bite you. Debugging issues of this kind is not easy or fun.)

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for your feedback!
I realize the current implementation is suboptimal. I will convert this PR to Draft until I can find a more appropriate and elegant solution.

@Madeeks Madeeks marked this pull request as draft December 29, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants