LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 04-25-2016, 09:40 PM   #1
TarFile
Member
 
Registered: Mar 2003
Posts: 315

Rep: Reputation: 27
Trying to build opencv picks up wrong library (32bit not 64bit)


Using sbopkg opencv errors with wrong version

Code:
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libgstbase-1.0.so when searching for -lgstbase-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: cannot find -lgstbase-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libgstreamer-1.0.so when searching for -lgstreamer-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: cannot find -lgstreamer-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libgstvideo-1.0.so when searching for -lgstvideo-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: cannot find -lgstvideo-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libgstbase-1.0.so when searching for -lgstbase-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: cannot find -lgstbase-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libgstreamer-1.0.so when searching for -lgstreamer-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: cannot find -lgstreamer-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libgstapp-1.0.so when searching for -lgstapp-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: cannot find -lgstapp-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libgstbase-1.0.so when searching for -lgstbase-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: cannot find -lgstbase-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libgstreamer-1.0.so when searching for -lgstreamer-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: cannot find -lgstreamer-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libgstriff-1.0.so when searching for -lgstriff-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: cannot find -lgstriff-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libgstreamer-1.0.so when searching for -lgstreamer-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: cannot find -lgstreamer-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libgstpbutils-1.0.so when searching for -lgstpbutils-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: cannot find -lgstpbutils-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: skipping incompatible /usr/lib/libgstreamer-1.0.so when searching for -lgstreamer-1.0
/usr/lib64/gcc/x86_64-slackware-linux/5.3.0/../../../../x86_64-slackware-linux/bin/ld: cannot find -lgstreamer-1.0
collect2: error: ld returned 1 exit status
modules/videoio/CMakeFiles/opencv_videoio.dir/build.make:253: recipe for target 'lib/libopencv_videoio.so.3.1.0' failed
make[2]: *** [lib/libopencv_videoio.so.3.1.0] Error 1
make[2]: Leaving directory '/tmp/SBo/opencv-3.1.0/build'
CMakeFiles/Makefile2:3880: recipe for target 'modules/videoio/CMakeFiles/opencv_videoio.dir/all' failed
make[1]: *** [modules/videoio/CMakeFiles/opencv_videoio.dir/all] Error 2
make[1]: Leaving directory '/tmp/SBo/opencv-3.1.0/build'
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
The correct one is in /usr/lib64.

How do i tell sbopkg to use the /usr/lib64?

I know this is probably easy but I am drawing a blank here.

I need to put something in the options but what?
 
Old 04-25-2016, 09:56 PM   #2
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.2
Posts: 1,566

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
I have problems compiling with my unofficial and unsupported multilib setup.

If you are using multilib packages from somewhere and also have some 32bit packages installed, then you might run into problems with the build process trying to link 32bit libraries instead of 64bit libraries. If this occurs, it can probably be solved by placing the following line:
LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
after the lines for CFLAGS and CXXFLAGS passed to the configure script. In other words, make it look something like this:
CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
./configure \
Beyond that, you are on your own. This is an unsupported setup.
From the SBo FAQ. I have to do this sometimes.
 
Old 04-25-2016, 10:21 PM   #3
TarFile
Member
 
Registered: Mar 2003
Posts: 315

Original Poster
Rep: Reputation: 27
I can't seem to find the SBo FAQ.

Do you happen to have a link?

I must be having a bad day
 
Old 04-25-2016, 10:50 PM   #4
TarFile
Member
 
Registered: Mar 2003
Posts: 315

Original Poster
Rep: Reputation: 27
I am using sbopkg and I don't exactly understand which file I am supposed to edit.

I tried to modify the opencv.SlackBuild but that does not look like the example so where should I be looking?
 
Old 04-25-2016, 11:41 PM   #5
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.2
Posts: 1,566

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
edit the opencv.SlackBuild file and change it like below...

From

Quote:
mkdir -p build
cd build
cmake \

To

Quote:
mkdir -p build
cd build
LDFLAGS="-L/usr/lib${LIBDIRSUFFIX}" \
cmake \
then compile and see if that fixes the build
 
Old 04-26-2016, 12:24 AM   #6
TarFile
Member
 
Registered: Mar 2003
Posts: 315

Original Poster
Rep: Reputation: 27
Well so far that did not make any difference. This should not be such a pain I hope I don't have to uninstall multilib to get this to go.
 
Old 04-26-2016, 12:34 AM   #7
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.2
Posts: 1,566

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
I wouldn't do that, If all else fails just install a clean 64bit Slackware in a virtual machine and built it there. I do this to test all my slackbuilds against a clean install before I submit. Plus on that rare occasion I have your problem this is a way around it. Qemu or virtualbox work great, I use Virtualbox because its easy to get going, but I believe qemu has more options.
 
Old 04-26-2016, 12:44 AM   #8
TarFile
Member
 
Registered: Mar 2003
Posts: 315

Original Poster
Rep: Reputation: 27
Well I got virt-machine installed. I had to do that for QT5 for some reason it would not build on my 14.1 system. I'll give that a shot.
 
Old 04-26-2016, 12:51 AM   #9
TarFile
Member
 
Registered: Mar 2003
Posts: 315

Original Poster
Rep: Reputation: 27
OK building current now on a VM.
 
Old 04-26-2016, 12:53 AM   #10
Daedra
Senior Member
 
Registered: Dec 2005
Location: Springfield, MO
Distribution: Slackware64-14.2
Posts: 1,566

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
cool, let us know if it builds ok

Last edited by Daedra; 04-26-2016 at 01:00 AM.
 
Old 04-26-2016, 01:20 AM   #11
TarFile
Member
 
Registered: Mar 2003
Posts: 315

Original Poster
Rep: Reputation: 27
Downloading and building now.
 
Old 04-26-2016, 02:06 AM   #12
TarFile
Member
 
Registered: Mar 2003
Posts: 315

Original Poster
Rep: Reputation: 27
That worked.
 
Old 04-26-2016, 02:24 AM   #13
ml4711
Member
 
Registered: Aug 2012
Location: Ryomgård, Danmark
Distribution: Slackware64
Posts: 146

Rep: Reputation: 101Reputation: 101
As a last resort you can always hide that 32bit lib path
Just find an empty directory t.ex. /home/ftp and then do this:

Code:
mount --bind /home/ftp /usr/lib
compile your stuff
umount /usr/lib
Cheers
 
1 members found this post helpful.
Old 04-26-2016, 11:24 AM   #14
TarFile
Member
 
Registered: Mar 2003
Posts: 315

Original Poster
Rep: Reputation: 27
I considered doing that but it was late and I was not sure if there would be unexpected consequences. I'll give that a shot if it happens again which it probably will.
 
Old 04-26-2016, 12:34 PM   #15
TarFile
Member
 
Registered: Mar 2003
Posts: 315

Original Poster
Rep: Reputation: 27
Not sure the problem was solved but the workarounds did the trick.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] build 32bit-kernel on 64bit kernel system jimmyting Linux - Software 2 06-04-2012 07:58 AM
Porting 32bit application to 64bit on 64bit RedHat 5.4 pvpnguyen Programming 4 07-23-2010 06:52 AM
Using a 32bit library on a 64bit computer sniff Programming 1 07-04-2006 03:47 AM
Compiling opencv-0.9.7 in suse 10.0 64bit tomazN Linux - Software 1 04-07-2006 11:42 AM
can 64bit processor run both 64bit and 32bit computers? DJOtaku Linux - General 4 09-08-2005 08:14 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:06 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration