Re: PKG_LIB_DIR/PKGMODULEDIR expansion issues
Robert Krawitz <[email protected]> Sat, 16 Jul 2022 14:30:42 -0400
| Newsgroups | gmane.linux.printing.gimp-print.devel |
|---|---|
| Message-ID | <[email protected]> |
On 7/16/22 06:31, Matsumura, George wrote:
> Greetings,
>
> In order to solve the mentioned issues, I was able to create the
> attached prefix_defines.patch which moves the expansion of the ${prefix}
> and ${exec_prefix} variables to build time through make as opposed to
> configure time through autoconf. This is in accordance with the
> suggestion here:
> https://www.gnu.org/software/autoconf/manual/autoconf-2.67/html_node/Installation-Directory-Variables.html
>
> Specifically, this guideline was followed:
>
> "In order to support these features, it is essential that
> datarootdir remains defined as ‘${prefix}/share’, so that its value
> can be expanded based on the current value of prefix.
>
> A corollary is that you should not use these variables except in
> makefiles. For instance, instead of trying to evaluate datadir in
> configure and hard-coding it in makefiles using e.g.,
> ‘AC_DEFINE_UNQUOTED([DATADIR], ["$datadir"], [Data directory.])’,
> you should add -DDATADIR='$(datadir)' to your makefile's definition
> of CPPFLAGS (AM_CPPFLAGS if you are also using Automake)."
>
> This approach is somewhat similar to that which existed in gutenprint
> before commit b6043e. I wasn't sure if there was a particular reason why
> this method was undesirable/removed at the time.
>
> As a consequence of my build of gutenprint not being able to find the
> modules, I hit the segfault described here:
> https://sourceforge.net/p/gimp-print/bugs/732/
> The attached no_modules_segfault.patch alters this behaviour so that
> stp_printer_model_count is called instead of stp_list_get_length,
> leading to an informative warning being printed in the case of no
> modules instead of a segmentation fault. This is consistent with usage
> in the rest of the code.
>
> Thank you for reading this, and any consideration of these changes would
> be very much appreciated. I apologize for any mistakes I made in
> creating the patches. If there is anything I can do to improve them,
> please let me know.
Thanks. I'll take a look at things.
_______________________________________________
Gimp-print-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gimp-print-devel