LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   opencv-2.4.4a won't build on Slack 14-32 bit. (http://www.linuxquestions.org/questions/slackware-14/opencv-2-4-4a-wont-build-on-slack-14-32-bit-4175453938/)

camorri 03-13-2013 01:44 PM

opencv-2.4.4a won't build on Slack 14-32 bit.
 
The version of opencv available is now 2.4.4a and I can not get the slackbuild to work.

I edited the Slackbuild, and changed the version from 2.4.4 to 2.4.4a. I got this failure :

Code:

./opencv.SlackBuild: line 65: cd: OpenCV-2.4.4a: No such file or directory
I then changed the version back to 2.4.4, and renamed the bz2 file to OpenCV-2.4.4.tar.bz2 and got the following error:

Code:

./opencv.SlackBuild: line 65: cd: OpenCV-2.4.4: No such file or directory
Can some one that knows more about slackbuilds give me some guidance?

Not sure what to try next. FWIW, this fails on both my Slackware 14, 32 bit systems.

ponce 03-13-2013 02:02 PM

opencv devs released a new tarball (taking away the old) changing some of their usual conventions.
here I modified the slackbuild like this, but who knows if with opencv-2.4.5 things will change again...
Code:

diff --git a/libraries/opencv/opencv.SlackBuild b/libraries/opencv/opencv.SlackBuild
index 70de7dd..66ab9aa 100644
--- a/libraries/opencv/opencv.SlackBuild
+++ b/libraries/opencv/opencv.SlackBuild
@@ -60,9 +60,9 @@ set -e
 rm -rf $PKG
 mkdir -p $TMP $PKG $OUTPUT
 cd $TMP
-rm -rf $SRCNAM-$VERSION
-tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
-cd $SRCNAM-$VERSION
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$SRCNAM-${VERSION}a.tar.bz2
+cd $PRGNAM-$VERSION
 chown -R root:root .
 find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff --git a/libraries/opencv/opencv.info b/libraries/opencv/opencv.info
index 28e7cd1..2f2090a 100644
--- a/libraries/opencv/opencv.info
+++ b/libraries/opencv/opencv.info
@@ -1,8 +1,8 @@
 PRGNAM="opencv"
 VERSION="2.4.4"
 HOMEPAGE="http://opencv.willowgarage.com/wiki/"
-DOWNLOAD="http://downloads.sourceforge.net/opencvlibrary/OpenCV-2.4.4.tar.bz2"
-MD5SUM="bb7272c102a801a9f9ee01db6e7ad8e9"
+DOWNLOAD="http://downloads.sourceforge.net/opencvlibrary/OpenCV-2.4.4a.tar.bz2"
+MD5SUM="876dce80ea2648b7e4d4c5a567b4d37b"
 DOWNLOAD_x86_64=""
 MD5SUM_x86_64=""
 REQUIRES=""

EDIT: Re-reading it now, I should have incremented BUILD too.

camorri 03-13-2013 02:28 PM

Ponce,

Thank-you for the quick response. I'm relatively new to slackbuilds. I'm not sure how to add the info from post 2 into the slackbuild.

Is there a guide somewhere on how to edit a slackbuild?

ponce 03-13-2013 02:55 PM

the text above is in diff format, it shows which lines of the files are changed and how in respect of the present opencv.SlackBuild files that you got from SBo.

to use it with the patch command, copy the text above in a file, called for example my.patch, then go in the slackbuild folder you downloaded and issue a
Code:

patch -p3 < /path/to/my.patch
if you feel like, you can alternatively edit the files interested, opencv.info and opencv.SlackBuild, with any editor and change the lines as shown above: the lines that go away are the ones with the '-' at the beginning, and get substituted by the ones that start with the '+'.

camorri 03-13-2013 04:48 PM

Ponce,

Thank-you very much for your assistance. I created the patch file, ran the patch command, and was able to build the new opencv-2.4.4a. I ran upgradepkg, and it worked without problems.

This problem is solved.


All times are GMT -5. The time now is 04:16 AM.