build error latest git

kubuntu 20.04

ncv.o opencv/opencv.cpp &&
mv -f $depbase.Tpo $depbase.Po
opencv/opencv.cpp: In function ‘unsigned char* cvCalculH(s_star*, s_star*, int, Homography*, transformation_type)’:
opencv/opencv.cpp:388:3: error: ‘estimateTranslation3D’ was not declared in this scope
388 | estimateTranslation3D(img3, ref3, s, mask, CV_RANSAC, defaultRANSACReprojThreshold);
| ^~~~~~~~~~~~~~~~~~~~~
make[2]: *** [Makefile:1330: opencv/opencv.o] Error 1
make[2]: Leaving directory ‘/home/steve/siril/src’
make[1]: *** [Makefile:599: all-recursive] Error 1
make[1]: Leaving directory ‘/home/steve/siril’
make: *** [Makefile:455: all] Error 2

Indeed, the new master requires opencv 4, but the configure has not been updated to warn about it. Last version with opencv 3 was 8a47b0adbe38b0d61f100c7821b15e673aebccf.

You should redo a configure (meson or configure). It will warn you about the version you need (4.4.0).

I tried it and configure still searches for opencv 3.

Oh sorry.
I only used meson :).

Will see that.

Should be ok now

Ubuntu 20.04

Built opencv v4.5.0 from git.

A bit of a mess.
The cmake in the build instructions doesn’t work.
Managed to get it to build with this cmake:

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_DOCS=ON -D BUILD_EXAMPLES=ON -D WITH_OPENCL=OFF -D WITH_OPENCL_SVM=OFF -D WITH_OPENCLAMDFFT=OFF -D WITH_OPENCLAMDBLAS=OFF -D WITH_OPENGL=ON -D WITH_EIGEN=ON -D FORCE_VTK=TRUE -D WITH_VTK=ON …

Then it can’t find the libraries, so:
export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib

Then finally siril launches.

Does anyone have e.g. a PPA with the latest opencv which just works?

TIA

Not a PPA, but the flatpak has all dependencies included.

1 Like

Good idea but there doesn’t seem to be a flatpak for opencv. Or at least it’s not on flathub or a search ‘flatpak opencv’ or similar. Do you have a link?
TIA

Add this option in the opencv build:

-DOPENCV_GENERATE_PKGCONFIG=ON

OpenCV is built with the siril flatpak, you don’t need a separate package for it: org.free_astro.siril/org.free_astro.siril.json at db69846bdcdc0f296b848e739b56cfa3585db2e7 · flathub/org.free_astro.siril · GitHub

Mmm. I’m building the code using the method described here:
FA / Siril · GitLab

I’ve succeeded in doing so.

My question was more about the opencv > 4.4.0 dependency and whether there was a simpler way to obtain this for the Ubuntu LTS, other than having to build it.

Please accept my apologies if it’s off topic here.

Cheers

The option I gave you will help siril to detect opencv.