koku-xinput-wine icon indicating copy to clipboard operation
koku-xinput-wine copied to clipboard

Cmake does not find SDL2

Open ekianjo opened this issue 7 years ago • 5 comments

Even though it's installed as libsdl2-2.0-0 on my system (Mint 17.3) ANything I can do about that?

ekianjo avatar Sep 24 '16 11:09 ekianjo

you will need to install libsdl2-dev .. but I am not sure if it installs the 32Bit-version too

KoKuToru avatar Sep 24 '16 20:09 KoKuToru

At least on Fedora, I also had to set PKG_CONFIG_PATH to contain the 32bit version of the headers.

wberrier avatar Dec 05 '16 04:12 wberrier

I am running debian jessie and ran into this problem too.

The 64 and 32 bit versions of SDL2 conflict; installing one will uninstall the other.

I use multiple applications that depend on the 64 bit libsdl2 package.

Fortunately, I could work around this by downloading the source and compiling it.

Unfortunately, SDL2 documentation is completely worthless in regards to having any form of instruction compiling for 32 bit.

There are at least a dozen wrong ways to do it, here is what worked for me:

mkdir build_i386
cd build_i386
CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 ../configure --build=i386-linux
CFLAGS=-m32 CXXFLAGS=-m32 LDFLAGS=-m32 make
sudo make install
sudo ldconfig

The last step (ldconfig) adds it to the linker, and you can verify that it's a 32bit version by running ldconfig -p | grep SDL2.

Afterwards I was able to build koku-xinput-wine following the readme.

I hope this helps solve your problem and that it saves others time/effort trying to figure it out.

@KoKuToru this utility is awesome! Thank you so much for creating and sharing it.

cdelorme avatar Jan 07 '17 21:01 cdelorme

@cdelorme I am trying your fix but am a total n00b to all this. Where does one get the source for the 32 bit package? I keep finding pre-compiled versions.

Also, do you have to put the source file anywhere in particular?

YalithKBK avatar Aug 11 '17 11:08 YalithKBK

@YalithKBK it's the same source code, you are simply instructing the compiler to compile for a 32 bit platform as opposed to 64 bit. **This is done by adding --build=i386-linux when running ./configure, but also by setting the CFLAGS, CXXFLAGS, and LDFLAGS accordingly so that everything else also compiles correctly.

The build_i386 folder is an arbitrary way of separating a 32 bit build from a 64 bit build, if you happen to build both which I did when testing.

I am also somewhat of a noob when it comes to the linker, but I believe ldconfig is refreshing the index of shared libraries, so while the file may have been correctly installed no other applications will see or connect to it.

cdelorme avatar Aug 11 '17 12:08 cdelorme