On Wednesday, 12 November 2025 19:27:41 CET Philippe DIDIER wrote:
> Le 12/11/2025 à 13:14, Christian Schoenebeck a écrit :
> > On Tuesday, November 11, 2025 12:15:22 AM CET Philippe DIDIER wrote:
> > [...]
> > 
> >> But I failed to build LinuxSampler for the next coming version of my
> >> distribution using GCC15.2 :
> >> my system was not supposed to be UNIX98 compatible
> >> But indeed it is
> >> 
> >> I simply have had to add this patch to add one line in configure.ac and
> >> it's OK now :
> >> 
> >> --- /configure.ac    2025-11-07 14:35:24.000000000 +0100
> >> +++ /configure.ac    2025-11-09 19:12:47.608538979 +0100
> >> @@ -131,6 +131,7 @@
> >> 
> >>    #define _GNU_SOURCE 1
> >>    #endif
> >>    #include <features.h>
> >> 
> >> +#include <stdlib.h>
> >> 
> >>    void main(void) {
> >>    #if _XOPEN_SOURCE >= 500
> >>    exit(0); /* UNIX98 compatible */
> > 
[...]
> I am using a Linux distribution (Mageia)
> The actual version of Mageia is Mageia9
> No problem to build LinuxSampler 2.4.1 with GCC 12.3
> 
> But we are preparing the next MAgeia10 inside Mageia Caludron
> and Mageia10 will be built upon GCC15.2
> That's where the problem appeared (GCC15.x is more strict)
> The workaround was to modify configure.ac with a patch
> adding only :
> #include <stdlib.h> after line 133 That's enough

I was able to reproduce this with GCC 14 as well. Apparently not a compiler 
version issue. Root cause was the exit() function not been declared. 
Apparently stdlib.h was previously included by features.h.

I fixed this now by replacing the exit function calls by a simple return 
statement, and also addressed other configure checks that were prone to this 
issue as well:

https://svn.linuxsampler.org/cgi-bin/viewvc.cgi?view=revision&revision=4413

Thanks!

/Christian




_______________________________________________
Linuxsampler-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linuxsampler-devel

Reply via email to