Hi There,
On 24/02/2025 20:01, Pablo Lucas Silva Santos wrote:
Hi Chris,
Ty to see the patch,
On 24/02/2025 19:31, Chris Hofstaedtler wrote:
Duplicating these in fortran.c seems to make little sense. Ygl.h
defines them, if the preconditions are correctly met. To me this
seems to mean there is another build problem and your patch just
hides that.
After further investigation, I found that the root cause was a mismatch
in the header guard used for X11/Xlib.h. The expected macro was XLIB_H,
but for some reason (I think that something changed on new versions), it
was defined differently in the code I was working with.
Lib <X11/Xlib.h>:
...
/*
* Xlib.h - Header definition and support file for the C subroutine
* interface library (Xlib) to the X Window System Protocol (V11).
* Structures and symbols starting with "_" are private to the library.
*/
#ifndef _X11_XLIB_H_
#define _X11_XLIB_H_
...
Ok, I see, I'll learn more about ygl project and try find the solution
without "just mask the problem".
To properly address this issue, I updated all occurrences of _XLIB_H_ to
_X11_XLIB_H_ in the codebase, ensuring compatibility with X11. This
resolves the inclusion issue without simply masking the problem.
Chris
Kind regards,
Let me see what you think about it.
Best regards,
--
Pablo Lucas Silva Santos
https://www.linkedin.com/in/pablolucas890
Description: This patch updates the header guard check from _XLIB_H_ to
_X11_XLIB_H_, aligning with newer versions of the X11 library. The previous
condition prevented proper detection of X11/Xlib.h, causing issues when compiling
with GCC 14. By updating all occurrences of the old macro to the correct
_X11_XLIB_H_, the build process now correctly recognizes and includes the
necessary X11 headers, restoring compatibility with modern X11 implementations.
Author: Pablo Lucas Silva Santos <pablolucas...@gmail.com>
Bug-Debian: https://bugs.debian.org/1075698
Forwarded: (no)
Last-Update: 2025-02-24
--- ygl-4.2e.orig/X11/Ygl.h
+++ ygl-4.2e/X11/Ygl.h
@@ -475,14 +475,14 @@ extern "C" {
extern void gflush ( void );
extern void gsync ( void );
-#ifdef _XLIB_H_ /* Declare if <X11/Xlib.h> is included */
+#ifdef _X11_XLIB_H_ /* Declare if <X11/Xlib.h> is included */
extern Display *getXdpy ( void );
extern Window getXwid ( void );
#ifdef X11
extern Window getXdid ( void );
extern GC getXgc ( void );
#endif
-#endif /* _XLIB_H_ */
+#endif /* _X11_XLIB_H_ */
extern void wintitle ( Char8 * );
extern void winset ( Int32 );
@@ -607,9 +607,9 @@ extern "C" {
extern void winclose ( Int32 );
extern void gexit ( void );
-#ifdef _XLIB_H_ /* Declare if <X11/Xlib.h> is included */
+#ifdef _X11_XLIB_H_ /* Declare if <X11/Xlib.h> is included */
extern Int32 winX ( Display *, Window );
-#endif /* _XLIB_H_ */
+#endif /* _X11_XLIB_H_ */
/* gl2ppm.c */
extern int gl2ppm ( const char * );