1

I've tried to search for this, but looking for "Linux lts" is obviously not giving me what I want.

I'm a n00b stumbling my way through an overly-complicated fix to a simple problem. For those curious, I am trying to get an Xbox360 controller working with Stick of Truth on Wine/Steam. I found koku-xinput-wine, which should do it, but need to use this solution to get it to work. So, I'm trying to compile libSDL2 into a 32 bit version, while still having the 64-bit version installed. I followed the commands at the link above:

mkdir build_i386
cd build_i386
cd SDL2-2.0.2
CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 ../configure --build=i386-linux
CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 make

While trying to compile libSDL2, I got a bunch of those big blocks of text linking various files. The last one of which is below along with the error I get:

libtool: link: gcc -shared  -fPIC -DPIC  build/.libs/SDL.o build/.libs/SDL_assert.o build/.libs/SDL_error.o build/.libs/SDL_hints.o build/.libs/SDL_log.o build/.libs/SDL_atomic.o build/.libs/SDL_spinlock.o build/.libs/SDL_audio.o build/.libs/SDL_audiocvt.o build/.libs/SDL_audiodev.o build/.libs/SDL_audiotypecvt.o build/.libs/SDL_mixer.o build/.libs/SDL_wave.o build/.libs/SDL_cpuinfo.o build/.libs/SDL_dynapi.o build/.libs/SDL_clipboardevents.o build/.libs/SDL_dropevents.o build/.libs/SDL_events.o build/.libs/SDL_gesture.o build/.libs/SDL_keyboard.o build/.libs/SDL_mouse.o build/.libs/SDL_quit.o build/.libs/SDL_touch.o build/.libs/SDL_windowevents.o build/.libs/SDL_rwops.o build/.libs/SDL_haptic.o build/.libs/SDL_gamecontroller.o build/.libs/SDL_joystick.o build/.libs/e_atan2.o build/.libs/e_log.o build/.libs/e_pow.o build/.libs/e_rem_pio2.o build/.libs/e_sqrt.o build/.libs/k_cos.o build/.libs/k_rem_pio2.o build/.libs/k_sin.o build/.libs/s_atan.o build/.libs/s_copysign.o build/.libs/s_cos.o build/.libs/s_fabs.o build/.libs/s_floor.o build/.libs/s_scalbn.o build/.libs/s_sin.o build/.libs/SDL_power.o build/.libs/SDL_render.o build/.libs/SDL_yuv_mmx.o build/.libs/SDL_yuv_sw.o build/.libs/SDL_render_d3d.o build/.libs/SDL_render_gl.o build/.libs/SDL_shaders_gl.o build/.libs/SDL_render_gles.o build/.libs/SDL_render_gles2.o build/.libs/SDL_shaders_gles2.o build/.libs/SDL_render_psp.o build/.libs/SDL_blendfillrect.o build/.libs/SDL_blendline.o build/.libs/SDL_blendpoint.o build/.libs/SDL_drawline.o build/.libs/SDL_drawpoint.o build/.libs/SDL_render_sw.o build/.libs/SDL_rotate.o build/.libs/SDL_getenv.o build/.libs/SDL_iconv.o build/.libs/SDL_malloc.o build/.libs/SDL_qsort.o build/.libs/SDL_stdlib.o build/.libs/SDL_string.o build/.libs/SDL_thread.o build/.libs/SDL_timer.o build/.libs/SDL_RLEaccel.o build/.libs/SDL_blit.o build/.libs/SDL_blit_0.o build/.libs/SDL_blit_1.o build/.libs/SDL_blit_A.o build/.libs/SDL_blit_N.o build/.libs/SDL_blit_auto.o build/.libs/SDL_blit_copy.o build/.libs/SDL_blit_slow.o build/.libs/SDL_bmp.o build/.libs/SDL_clipboard.o build/.libs/SDL_egl.o build/.libs/SDL_fillrect.o build/.libs/SDL_pixels.o build/.libs/SDL_rect.o build/.libs/SDL_shape.o build/.libs/SDL_stretch.o build/.libs/SDL_surface.o build/.libs/SDL_video.o build/.libs/SDL_nullevents.o build/.libs/SDL_nullframebuffer.o build/.libs/SDL_nullvideo.o build/.libs/SDL_diskaudio.o build/.libs/SDL_dummyaudio.o build/.libs/SDL_sysloadso.o build/.libs/SDL_dspaudio.o build/.libs/SDL_pulseaudio.o build/.libs/SDL_systhread.o build/.libs/SDL_syssem.o build/.libs/SDL_sysmutex.o build/.libs/SDL_syscond.o build/.libs/SDL_systls.o build/.libs/SDL_sysjoystick.o build/.libs/SDL_syshaptic.o build/.libs/SDL_syspower.o build/.libs/SDL_sysfilesystem.o build/.libs/SDL_systimer.o build/.libs/SDL_udev.o build/.libs/SDL_evdev.o   -lm -ldl -lts -lpthread -lrt  -m32 -Wl,--no-undefined   -Wl,-soname -Wl,libSDL2-2.0.so.0 -o build/.libs/libSDL2-2.0.so.0.2.0
/usr/bin/ld: cannot find -lts
collect2: error: ld returned 1 exit status
make: *** [build/libSDL2.la] Error 1

I have had the error of "cannot find ...." a few times while trying to compile and have easily fixed it by installing whatever library was missing. This time, though, I can't figure out what I'm missing. Does anyone know what package this library is in? I can't figure out how to install it.

  • What you posted doesn't say "error". Was there anything else? Also,"while trying to compile" is rather vague. We can only guess which command was used to produce that message. Why not tell? And why not post more output? Could it be that -lts doesn't exist? It does look that way. – mikewhatever Aug 11 '17 at 22:59
  • 1
    Please edit your question to include the exact sequence of commands / operations leading up to the error – steeldriver Aug 11 '17 at 23:38
  • Looking at things a bit differently, is there a chance that this is an options list to a command? I have seen commands with this as an options/switches list. It might be worth it to have an understanding of the command trying to work with at time was seen. – Craig Aug 12 '17 at 0:15
  • What does this have to do with Ubuntu? – heynnema Aug 12 '17 at 14:39
  • 1
    libsdl2 is available in Ubuntu’s default repositories for both amd64 and i386 architectures. Is there any reason why you’re not using those? Does the Xbox controller work with native (SDL2) applications at all on your system? In haven’t tried any Xbox controller with Wine myself but in my experience Wine just uses whatever controller or joystick is present and exposes it to "wrapped" Windows applications. You may not be able to use features that are specific to the Xbox controller though, just generic controller features. – David Foerster Aug 13 '17 at 14:16
2

When you pass an option -lfoo to the linker, the library it looks for is libfoo, not liblfoo. And since you're building something, you probably need the development headers as well, so: libts-dev.

sudo apt install libts-dev

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.