-
-
Save ryanpcmcquen/687747c6de09693a6916 to your computer and use it in GitHub Desktop.
#!/bin/sh | |
## curl https://gist.githubusercontent.com/ryanpcmcquen/687747c6de09693a6916/raw/torchlight-sdl-fix.sh | sh | |
# set this to your Torchlight directory | |
TORCHLIGHTDIR=/usr/local/games/Torchlight | |
## grab the SDL repo | |
hg clone http://hg.libsdl.org/SDL | |
## enter the directory | |
cd SDL | |
# check out the revision before the one that introduces the bug as advised here: http://forums.runicgames.com/viewtopic.php?f=24&t=33360&start=60#p474739 | |
hg up 4de584a3a027 --clean | |
# Fix X11 compilation issues with another changeset | |
hg export 6caad66a4966 > patch | |
hg import patch | |
# just in case | |
./autogen.sh | |
# use build dir else configure will complain | |
mkdir build | |
cd build | |
../configure | |
make | |
# copy the resulting lib to the game's lib64 directory | |
cp -Rv build/.libs/libSDL2*so* $TORCHLIGHTDIR/lib64/ |
Hi,
when use the script, I have a problem:
destination directory: SDL abort: destination 'SDL' is not empty 6 files updated, 0 files merged, 0 files removed, 0 files unresolved applying patch Generating build information using autoconf This may take a while ... Couldn't find autoconf, aborting mkdir: impossible de créer le répertoire «build»: Le fichier existe configure: WARNING: Libtool does not cope well with whitespace in
pwdchecking build system type... x86_64-unknown-linux-gnu checking host system type... x86_64-unknown-linux-gnu checking how to print strings... printf checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking for a sed that does not truncate output... /bin/sed checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for fgrep... /bin/grep -F checking for ld used by gcc... /usr/bin/ld checking if the linker (/usr/bin/ld) is GNU ld... yes checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B checking the name lister (/usr/bin/nm -B) interface... BSD nm checking whether ln -s works... yes checking the maximum length of command line arguments... 1572864 checking whether the shell understands some XSI constructs... yes checking whether the shell understands "+="... yes checking how to convert x86_64-unknown-linux-gnu file names to x86_64-unknown-linux-gnu format... func_convert_file_noop checking how to convert x86_64-unknown-linux-gnu file names to toolchain format... func_convert_file_noop checking for /usr/bin/ld option to reload object files... -r checking for objdump... objdump checking how to recognize dependent libraries... pass_all checking for dlltool... no checking how to associate runtime and link libraries... printf %s\n checking for ar... ar checking for archiver @FILE support... @ checking for strip... strip checking for ranlib... ranlib checking for gawk... no checking for mawk... mawk checking command to parse /usr/bin/nm -B output from gcc object... ok checking for sysroot... no checking for mt... mt checking if mt is a manifest tool... no checking how to run the C preprocessor... gcc -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for dlfcn.h... yes checking for objdir... .libs checking if gcc supports -fno-rtti -fno-exceptions... no checking for gcc option to produce PIC... -fPIC -DPIC checking if gcc PIC flag -fPIC -DPIC works... yes checking if gcc static flag -static works... yes checking if gcc supports -c -o file.o... yes checking if gcc supports -c -o file.o... (cached) yes checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking whether -lc should be explicitly linked in... no checking dynamic linker characteristics... GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking whether stripping libraries is possible... yes checking if libtool supports shared libraries... yes checking whether to build shared libraries... yes checking whether to build static libraries... yes checking for gcc... (cached) gcc checking whether we are using the GNU C compiler... (cached) yes checking whether gcc accepts -g... (cached) yes checking for gcc option to accept ISO C89... (cached) none needed checking for g++... g++ checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking how to run the C++ preprocessor... g++ -E checking for ld used by g++... /usr/bin/ld -m elf_x86_64 checking if the linker (/usr/bin/ld -m elf_x86_64) is GNU ld... yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking for g++ option to produce PIC... -fPIC -DPIC checking if g++ PIC flag -fPIC -DPIC works... yes checking if g++ static flag -static works... yes checking if g++ supports -c -o file.o... yes checking if g++ supports -c -o file.o... (cached) yes checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes checking dynamic linker characteristics... (cached) GNU/Linux ld.so checking how to hardcode library paths into programs... immediate checking for a BSD-compatible install... /usr/bin/install -c checking whether make sets $(MAKE)... yes checking for windres... no checking for an ANSI C-conforming const... yes checking for inline... inline checking for working volatile... yes checking for GCC -MMD -MT option... yes checking for ANSI C header files... (cached) yes checking for sys/types.h... (cached) yes checking stdio.h usability... yes checking stdio.h presence... yes checking for stdio.h... yes checking for stdlib.h... (cached) yes checking stddef.h usability... yes checking stddef.h presence... yes checking for stddef.h... yes checking stdarg.h usability... yes checking stdarg.h presence... yes checking for stdarg.h... yes checking malloc.h usability... yes checking malloc.h presence... yes checking for malloc.h... yes checking for memory.h... (cached) yes checking for string.h... (cached) yes checking for strings.h... (cached) yes checking for inttypes.h... (cached) yes checking for stdint.h... (cached) yes checking ctype.h usability... yes checking ctype.h presence... yes checking for ctype.h... yes checking math.h usability... yes checking math.h presence... yes checking for math.h... yes checking iconv.h usability... yes checking iconv.h presence... yes checking for iconv.h... yes checking signal.h usability... yes checking signal.h presence... yes checking for signal.h... yes checking for size_t... yes checking for M_PI in math.h... yes checking for working alloca.h... yes checking for alloca... yes checking for working memcmp... yes checking for working strtod... yes checking for mprotect... yes checking for malloc... yes checking for calloc... yes checking for realloc... yes checking for free... yes checking for getenv... yes checking for setenv... yes checking for putenv... yes checking for unsetenv... yes checking for qsort... yes checking for abs... yes checking for bcopy... yes checking for memset... yes checking for memcpy... yes checking for memmove... yes checking for strlen... yes checking for strlcpy... no checking for strlcat... no checking for strdup... yes checking for _strrev... no checking for _strupr... no checking for _strlwr... no checking for strchr... yes checking for strrchr... yes checking for strstr... yes checking for itoa... no checking for _ltoa... no checking for _uitoa... no checking for _ultoa... no checking for strtol... yes checking for strtoul... yes checking for _i64toa... no checking for _ui64toa... no checking for strtoll... yes checking for strtoull... yes checking for atoi... yes checking for atof... yes checking for strcmp... yes checking for strncmp... yes checking for _stricmp... no checking for strcasecmp... yes checking for _strnicmp... no checking for strncasecmp... yes checking for sscanf... yes checking for snprintf... yes checking for vsnprintf... yes checking for fseeko... yes checking for fseeko64... yes checking for sigaction... yes checking for setjmp... yes checking for nanosleep... yes checking for sysconf... yes checking for sysctlbyname... no checking for pow in -lm... yes checking for atan... yes checking for atan2... yes checking for ceil... yes checking for copysign... yes checking for cos... yes checking for cosf... yes checking for fabs... yes checking for floor... yes checking for log... yes checking for pow... yes checking for scalbn... yes checking for sin... yes checking for sinf... yes checking for sqrt... yes checking for iconv_open in -liconv... no checking for iconv... yes checking for struct sigaction.sa_sigaction... yes checking size of void*... 8 checking for GCC builtin atomic operations... yes checking for GCC -mmmx option... yes checking for GCC -m3dnow option... yes checking for GCC -msse option... yes checking for GCC -msse2 option... yes checking for Altivec with GCC altivec.h and -maltivec option... no checking for Altivec with GCC -maltivec option... no checking for Altivec with GCC altivec.h and -faltivec option... no checking for Altivec with GCC -faltivec option... no checking for GCC -fvisibility=hidden option... yes checking for dlopen... yes checking for dlopen in -lc... no checking for dlopen in -ldl... yes checking for OSS audio support... yes checking for ALSA CFLAGS... checking for ALSA LDFLAGS... -lasound -lm -ldl -lpthread checking for libasound headers version >= 0.9.0... not present. checking for snd_ctl_open in -lasound... no checking for pkg-config... /usr/bin/pkg-config checking for PulseAudio 0.9 support... no checking for artsc-config... no checking for esd-config... no checking for ESD - version >= 0.2.8... no *** The esd-config script installed by ESD could not be found *** If ESD was installed in PREFIX, make sure PREFIX/bin is in *** your path, or set the ESD_CONFIG environment variable to the *** full path to esd-config. checking audio/audiolib.h usability... no checking audio/audiolib.h presence... no checking for audio/audiolib.h... no checking for AuOpenServer in -laudio... no checking for NAS audio support... no checking for X... libraries , headers checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes -- dynamic libX11 -> libX11.so.6 -- dynamic libX11ext -> libXext.so.6 checking for const parameter to XextAddDisplay... yes checking for const parameter to _XData32... yes checking for XGenericEvent... yes checking for XkbKeycodeToKeysym in -lX11... yes checking for X11/Xcursor/Xcursor.h... yes -- dynamic libXcursor -> libXcursor.so.1 checking for X11/extensions/Xinerama.h... yes -- dynamic libXinerama -> libXinerama.so.1 checking for X11/extensions/XInput2.h... yes -- dynamic libXi -> libXi.so.6 checking for xinput2 multitouch... yes checking for X11/extensions/Xrandr.h... yes -- dynamic libXrandr -> libXrandr.so.2 checking for X11/extensions/scrnsaver.h... yes -- dynamic libXss -> libXss.so.1 checking for X11/extensions/shape.h... yes checking for X11/extensions/xf86vmode.h... yes -- dynamic libXxf86vm -> libXxf86vm.so.1 checking for OpenGL (GLX) support... yes checking for OpenGL ES (EGL) support... no checking libudev.h usability... yes checking libudev.h presence... yes checking for libudev.h... yes checking for pkg-config... (cached) /usr/bin/pkg-config checking dbus/dbus.h usability... yes checking dbus/dbus.h presence... no configure: WARNING: dbus/dbus.h: accepted by the compiler, rejected by the preprocessor! configure: WARNING: dbus/dbus.h: proceeding with the compiler's result checking for dbus/dbus.h... yes checking for Linux 2.4 unified input interface... yes checking for Touchscreen library support... no checking for hid_init in -lusbhid... no checking usb.h usability... no checking usb.h presence... no checking for usb.h... no checking libusb.h usability... no checking libusb.h presence... no checking for libusb.h... no checking for hid_init in -lusb... no checking for usbhid... no checking for pthreads... yes checking for recursive mutexes... yes checking for pthread semaphores... yes checking for sem_timedwait... yes checking for pthread_spin_trylock... yes checking for pthread_np.h... no checking for pthread_setname_np... yes checking for pthread_set_name_np... no checking linux/version.h usability... yes checking linux/version.h presence... yes checking for linux/version.h... yes checking for GCC -Wall option... yes checking for necessary GCC -Wno-multichar option... no configure: creating ./config.status config.status: creating Makefile config.status: creating sdl2-config config.status: creating SDL2.spec config.status: creating sdl2.pc config.status: creating include/SDL_config.h config.status: include/SDL_config.h is unchanged config.status: executing libtool commands Warning, configure.in is out of date #(cd .. && sh autogen.sh && sh configure) /bin/bash ../build-scripts/updaterev.sh ../build-scripts/updaterev.sh: ligne 13: $header.new : redirection ambiguë ../build-scripts/updaterev.sh: ligne 14: $header.new : redirection ambiguë mv: la cible 'linux/SDL/build/include/SDL_revision.h' n'est pas un répertoire Makefile:120 : la recette pour la cible « update-revision » a échouée make: *** [update-revision] Erreur 1 cp: impossible d'évaluer 'build/.libs/libSDL2*so*': Aucun fichier ou dossier de ce type
please help me
Thanks
If the screen is flickering, try running the game windowed, or use a desktop environment that does not have compositing, such as
dwm
orfluxbox
.