LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cannot find -lsndfile / libsndfile in 32-bit linux platform (https://www.linuxquestions.org/questions/linux-newbie-8/cannot-find-lsndfile-libsndfile-in-32-bit-linux-platform-4175531053/)

$shellCrypt 01-14-2015 05:54 PM

cannot find -lsndfile / libsndfile in 32-bit linux platform
 
I am on a x86_64 platform in Ubuntu 14. However, I would like to build for a 32-bit linux platform. I run into the following issue when I try to build using make:

Code:

/usr/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-linux-gnu/4.9/../../../libsndfile.so when searching for -lsndfile
/usr/bin/ld: skipping incompatible /usr/local/lib/libsndfile.so when searching for -lsndfile
/usr/bin/ld: skipping incompatible /usr/local/lib/libsndfile.a when searching for -lsndfile
/usr/bin/ld: skipping incompatible /usr/lib/libsndfile.so when searching for -lsndfile
/usr/bin/ld: cannot find -lsndfile

It seems like I am getting this error because I don't have the 32-bit libraries. I could not find anywhere online where I could directly procure the 32-bit version of the library. I tried to follow the steps here:
http://www.linuxfromscratch.org/blfs...ibsndfile.html

but instead specifying the build for the configure command:
Code:

./configure --build=i686-pc-linux-gnu --disable-static && make
But that didn't help either.

Has anyone encountered this issue before? Any pointers on what I could try? Would I have to create a subdirectory like /usr/lib32/ and move libraries around, perhaps?

I would be grateful for any tips you could provide me. Thanks!

veerain 01-16-2015 03:32 AM

Try building with

Code:

./configure --target=i686-pc-linux-gnu

$shellCrypt 01-16-2015 08:16 AM

Thanks for a quick reply veerain. I tried both the target and host flags with ./configure for i686 and i386 with no luck. I had some luck after providing CFLAGS like -m32 with the make command - It would put the libraries in the right folder but error out because more 32-bit libraries (like libflac) were unavailable.

I had a feeling this would end up as a repetitive process, so ended up installing 32-bit Ubuntu. I was then able to successfully install the sndfile package in the right location. It would have been simpler if I was able to search and find 32-bit packages like these from Ubuntu repository. I wonder if that is possible...


All times are GMT -5. The time now is 05:26 AM.