Bug #140

Can't compile against opencv 2.4.0

Added by Anonymous about 1 year ago. Updated about 1 year ago.

Status:ClosedStart date:21.05.2012
Priority:NormalDue date:
Category:-% Done:

100%

Target version:-
Version:0.3.2

Description

Trying to build nomacs 0.3.2 against opencv 2.4.0 fails with this output: [[http://paste.chakra-project.org/1670/]]

There is no such issue when trying to build it against opencv 2.3.1.

Thank you,
Neo

History

#1 Updated by Stefan about 1 year ago

  • Status changed from New to In Progress
  • Assignee set to Stefan

Hi,

just tried to build nomacs 0.3.2 against opencv 2.4.0. when using windows no problem occured
so i installed chakra on a virtual machine, but chakra has also opencv 2.3.1 (and there also no problem occured)

which chakra are you using? is there a development version (and is there an iso file)? or how do i get opencv 2.4 in chakra?

According to your compile errors it seems that only an include path is not set correctly

Greetings

#2 Updated by Anke about 1 year ago

Chakra uses testing repo's for new packages, before all moves to stable (to enable testing repo's, you'll need to edit /etc/pacman.conf, and add [testing] above all other repo's).
New OpenCV is in the testing repo's, and is build on the new toolchain, including gcc4.7. Trying to build old OpenCV (2.3.1) on the new gcc version fails (will need patches for new gcc), so it seems the above posted build errors are due to mis-linking of some includes in nomacs when OpenCV is compiled on new gcc

#3 Updated by Stefan about 1 year ago

hi.

i have enabled the testing repo and upgraded the packages. I have no problems compiling nomacs against opencv 2.4 (used gcc 4.7).
perhaps you can use make VERBOSE=1 for compiling and you can see which lib is not linked correctly

#4 Updated by Neophytos about 1 year ago

Hey,

Just to be sure, does "pacman -Qs opencv" state you have 2.4?

Also, can you please provide the output of your build? Maybe we are missing something in the build instructions. This is the PKGBUILD which automates the build procedure:

pkgname=nomacs
pkgver=0.3.2
pkgrel=1
pkgdesc="A Qt image viewer" 
arch=(i686 x86_64)
url="http://www.nomacs.org/" 
license=('GPL3')
depends=('qt' 'exiv2' 'libraw' 'opencv')
makedepends=('cmake')
install="$pkgname.install" 
source=("http://downloads.sourceforge.net/project/$pkgname/$pkgname-$pkgver/$pkgname-$pkgver-source.zip")
md5sums=('144d74f73954c865afafb8d3b7b6a6f1')
screenshot="http://www.nomacs.org/wp-content/uploads/2011/08/home1.png" 

build() {
  cd "$srcdir" 
  [ -d bld ] || mkdir bld && cd bld
  cmake ..
  make
}

package() {
  cd "$srcdir/bld" 
  make DESTDIR="$pkgdir/" install
}

I see there is a similar issue on ArchLinux with the same PKGBUILD: https://aur.archlinux.org/packages.php?ID=55539

#5 Updated by Neophytos about 1 year ago

I see no way to edit my previous post, so forgive me for posting again. I made a mistake in the PKGBUILD above, in the cmake line we use:

cmake .. -DCMAKE_INSTALL_PREFIX=/usr

although I did try and without it, but same luck. =P

#6 Updated by Stefan about 1 year ago

  • Status changed from In Progress to Feedback

ooops ... sorry. i compiled nomacs against opencv 2.3.1 and then made the upgrade and unfortunately i've forgotten to delete the cmake cache, thus the cmake variables were correct

Seems like opencv changed their cmake files and cmake was not able to set the LIBS using pkg_check_modules (with 2.3.1 it was not able to set it using find_package). Now i have changed the CMakeLists.txt and updated the nomacs-0.3.2-source.zip. Now i am able to build the package

Greetings

#7 Updated by Neophytos about 1 year ago

OK, that worked! Can be marked as solved. =)

Thank you Stefan for the quick responses.

And keep up the g00d work on this application, really liking it so far!

Regards

#8 Updated by Stefan about 1 year ago

  • Status changed from Feedback to Closed
  • % Done changed from 0 to 100

Great. Thank you and keep enjoying it :)

Also available in: Atom PDF