-   Slackware (
-   -   opencv-2.4.4a won't build on Slack 14-32 bit. (

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 :


./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:


./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...

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
-tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
+tar xvf $CWD/$SRCNAM-${VERSION}a.tar.bz2
 chown -R root:root .
 find . \
  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
diff --git a/libraries/opencv/ b/libraries/opencv/
index 28e7cd1..2f2090a 100644
--- a/libraries/opencv/
+++ b/libraries/opencv/
@@ -1,8 +1,8 @@

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

camorri 03-13-2013 02:28 PM


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

patch -p3 < /path/to/my.patch
if you feel like, you can alternatively edit the files interested, 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


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 08:59 AM.