We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 4908

Summary: Autoreconf errors
Product: SDL Reporter: Paul Cercueil <paul>
Component: buildAssignee: Ryan C. Gordon <icculus>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2 CC: icculus
Version: HG 2.0Keywords: target-2.0.14
Hardware: x86_64   
OS: Linux   
Attachments: Fix for autotools

Description Paul Cercueil 2019-12-20 16:30:04 UTC
Created attachment 4122 [details]
Fix for autotools

Running autoreconf (to create the configure file from configure.ac) fails with the following errors:

paul@frank:~/dev/gcw0/SDL2$ autoreconf -isvf
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force 
configure.ac:979: warning: macro 'AM_PATH_ESD' not found in library
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --force
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-scripts'.
libtoolize: linking file 'build-scripts/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'acinclude'.
libtoolize: linking file 'acinclude/libtool.m4'
libtoolize: linking file 'acinclude/ltoptions.m4'
libtoolize: linking file 'acinclude/ltsugar.m4'
libtoolize: linking file 'acinclude/ltversion.m4'
libtoolize: linking file 'acinclude/lt~obsolete.m4'
libtoolize: Consider adding '-I acinclude' to ACLOCAL_AMFLAGS in Makefile.am.
configure.ac:979: warning: macro 'AM_PATH_ESD' not found in library
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoheader: warning: missing template: HAVE_AUDIOCLIENT_H
autoheader: Use AC_DEFINE([HAVE_AUDIOCLIENT_H], [], [Description])
autoheader: warning: missing template: HAVE_MMDEVICEAPI_H
autoheader: warning: missing template: SDL_ARM_NEON_BLITTERS
autoheader: warning: missing template: SDL_ARM_SIMD_BLITTERS
autoheader: warning: missing template: SDL_VIDEO_DRIVER_X11_XINPUT2_SUPPORTS_MULTITOUCH
autoreconf: /usr/bin/autoheader failed with exit status: 1


With the attached patch, the process will suceed, but not all issues are resolved, e.g. the AM_PATH_ESD macro is still missing.

Besides, while the original pre-generated configure file results in a successful build, the generated configure file (with the aforementioned patch applied) results in build errors:

/home/paul/dev/gcw0/buildroot/output/build/sdl2-2.0.10/src/thread/pthread/SDL_systhread.c: In function 'SDL_SYS_CreateThread':
/home/paul/dev/gcw0/buildroot/output/build/sdl2-2.0.10/src/thread/pthread/SDL_systhread.c:98:20: warning: implicit declaration of function 'dlsym' [-Wimplicit-function-declaration]
   98 |         void *fn = dlsym(RTLD_DEFAULT, "pthread_setname_np");
      |                    ^~~~~
/home/paul/dev/gcw0/buildroot/output/build/sdl2-2.0.10/src/thread/pthread/SDL_systhread.c:98:26: error: 'RTLD_DEFAULT' undeclared (first use in this function)
   98 |         void *fn = dlsym(RTLD_DEFAULT, "pthread_setname_np");
      |                          ^~~~~~~~~~~~
/home/paul/dev/gcw0/buildroot/output/build/sdl2-2.0.10/src/thread/pthread/SDL_systhread.c:98:26: note: each undeclared identifier is reported only once for each function it appears in
/home/paul/dev/gcw0/buildroot/output/build/sdl2-2.0.10/src/thread/pthread/SDL_systhread.c: In function 'SDL_SYS_SetThreadPriority':
/home/paul/dev/gcw0/buildroot/output/build/sdl2-2.0.10/src/thread/pthread/SDL_systhread.c:196:20: warning: implicit declaration of function 'syscall' [-Wimplicit-function-declaration]
  196 |     pid_t thread = syscall(SYS_gettid);
      |                    ^~~~~~~
/home/paul/dev/gcw0/buildroot/output/build/sdl2-2.0.10/src/thread/pthread/SDL_systhread.c:196:28: error: 'SYS_gettid' undeclared (first use in this function)
  196 |     pid_t thread = syscall(SYS_gettid);
      |                            ^~~~~~~~~~
In file included from /home/paul/dev/gcw0/buildroot/output/build/sdl2-2.0.10/src/thread/pthread/../../SDL_internal.h:45,
                 from /home/paul/dev/gcw0/buildroot/output/build/sdl2-2.0.10/src/thread/pthread/SDL_systhread.c:22:
/home/paul/dev/gcw0/buildroot/output/build/sdl2-2.0.10/src/thread/pthread/../../dynapi/SDL_dynapi_overrides.h:673:36: warning: implicit declaration of function 'SDL_LinuxSetThreadPriority_REAL'; did you mean 'SDL_SetThreadPriority_REAL'? [-Wimplicit-function-declaration]
  673 | #define SDL_LinuxSetThreadPriority SDL_LinuxSetThreadPriority_REAL
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/paul/dev/gcw0/buildroot/output/build/sdl2-2.0.10/src/thread/pthread/SDL_systhread.c:207:12: note: in expansion of macro 'SDL_LinuxSetThreadPriority'
  207 |     return SDL_LinuxSetThreadPriority(thread, value);
      |            ^~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:605: build/SDL_systhread.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/paul/dev/gcw0/buildroot/output/build/sdl2-2.0.10'
make: *** [package/pkg-generic.mk:241: /home/paul/dev/gcw0/buildroot/output/build/sdl2-2.0.10/.stamp_built] Error 2
Comment 1 Ryan C. Gordon 2020-04-07 18:28:58 UTC
Your patch is now https://hg.libsdl.org/SDL/rev/1463104b6302, thanks!

I'm going to leave this bug open and see about cleaning up the other issues for 2.0.14, but I might kick this on to a later release if I don't get to it. If you find yourself making further patches before me, I'll happily apply them, though!

--ryan.
Comment 2 Ryan C. Gordon 2020-06-28 22:53:16 UTC
(In reply to Ryan C. Gordon from comment #1)
> Your patch is now https://hg.libsdl.org/SDL/rev/1463104b6302, thanks!
> 
> I'm going to leave this bug open and see about cleaning up the other issues
> for 2.0.14

It turns out the rest of these appear to be handled by our autogen.sh script, which creates aclocal.m4 with AM_PATH_ESD, etc.

All the errors in the autoreconf command line listed in Comment #0 are gone between the already-applied patch and using autogen.sh to do the reconfiguration.

I think this can be closed now, please reopen if I'm wrong!

--ryan.