Problems building current git on Fedora 31

Hello,
I’ve been building Rawtherapee on Fedora for some time now, building an rpm from a local git repo.
Attempting to build git snapshot 5.7-165-g58f44e96c a couple of days ago, resulted in the following error messages …

/home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:48: undefined reference to KLTCreateTrackingContext' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:55: undefined reference to KLTCreateFeatureList’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:56: undefined reference to KLTCreateFeatureTable' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:62: undefined reference to KLTSelectGoodFeatures’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:63: undefined reference to KLTStoreFeatureList' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:65: undefined reference to KLTTrackFeatures’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:66: undefined reference to KLTStoreFeatureList' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:279: undefined reference to KLTFreeFeatureTable’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:280: undefined reference to KLTFreeFeatureList' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:281: undefined reference to KLTFreeTrackingContext’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:160: undefined reference to KLTFreeFeatureTable' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:161: undefined reference to KLTFreeFeatureList’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:162: undefined reference to KLTFreeTrackingContext' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:270: undefined reference to KLTFreeFeatureTable’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:271: undefined reference to KLTFreeFeatureList' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:272: undefined reference to KLTFreeTrackingContext’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:261: undefined reference to KLTFreeFeatureTable' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:262: undefined reference to KLTFreeFeatureList’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:263: undefined reference to `KLTFreeTrackingContext’
collect2: error: ld returned 1 exit status
make[2]: *** [rtgui/CMakeFiles/rth.dir/build.make:2366: rtgui/rawtherapee] Error 1
make[2]: Leaving directory ‘/home/terry/rpmbuild/BUILD/rawtherapee-5.7’
make[1]: *** [CMakeFiles/Makefile2:246: rtgui/CMakeFiles/rth.dir/all] Error 2
make[1]: Leaving directory ‘/home/terry/rpmbuild/BUILD/rawtherapee-5.7’
make: *** [Makefile:133: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.8wZAT6 (%build)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.8wZAT6 (%build)

I was using the -DWITH_SYSTEM_KLT=ON, which has been my norm.
I also tried -DWITH_SYSTEM_KLT=OFF, which also resulted in an error…
RPM build errors:
File not found: /home/terry/rpmbuild/BUILDROlibrtengine.a librtexif.a/home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:48: undefined reference to KLTCreateTrackingContext' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:55: undefined reference to KLTCreateFeatureList’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:56: undefined reference to KLTCreateFeatureTable' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:62: undefined reference to KLTSelectGoodFeatures’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:63: undefined reference to KLTStoreFeatureList' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:65: undefined reference to KLTTrackFeatures’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:66: undefined reference to KLTStoreFeatureList' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:279: undefined reference to KLTFreeFeatureTable’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:280: undefined reference to KLTFreeFeatureList' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:281: undefined reference to KLTFreeTrackingContext’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:160: undefined reference to KLTFreeFeatureTable' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:161: undefined reference to KLTFreeFeatureList’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:162: undefined reference to KLTFreeTrackingContext' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:270: undefined reference to KLTFreeFeatureTable’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:271: undefined reference to KLTFreeFeatureList' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:272: undefined reference to KLTFreeTrackingContext’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:261: undefined reference to KLTFreeFeatureTable' /usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:262: undefined reference to KLTFreeFeatureList’
/usr/bin/ld: /home/terry/rpmbuild/BUILD/rawtherapee-5.7/rtengine/calc_distort.cc:263: undefined reference to `KLTFreeTrackingContext’
collect2: error: ld returned 1 exit status
make[2]: *** [rtgui/CMakeFiles/rth.dir/build.make:2366: rtgui/rawtherapee] Error 1
make[2]: Leaving directory ‘/home/terry/rpmbuild/BUILD/rawtherapee-5.7’
make[1]: *** [CMakeFiles/Makefile2:246: rtgui/CMakeFiles/rth.dir/all] Error 2
make[1]: Leaving directory ‘/home/terry/rpmbuild/BUILD/rawtherapee-5.7’
make: *** [Makefile:133: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.8wZAT6 (%build)

RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.8wZAT6 (%build)OT/rawtherapee-5.7-1.0.20191104.fc31.x86_64/usr/lib64/*.so

Checking the rpmbuildroot /usr/lib64 has libs librtengine.a librtexif.a

It would seem things have changed somewhere since my previous successful build of 02 Nov which used Fedora 30 and git snapshot 5.7-158-g0ee3873ce.

Anyone have any suggestions as to where the problem lies and and how to fix it?

Cheers,
Terry

@tduell delete your cloned repository, then follow the “Automatic Way” procedure, and paste the whole console log if there is still a problem (whole meaning from the moment you wrote wget till the very end):
http://rawpedia.rawtherapee.com/Linux#The_Automatic_Way

When pasting logs, Format your code to make it more readable

1 Like

Hello Morgan,

@tduell delete your cloned repository, then follow the “Automatic Way”
procedure, and paste the whole console log if there is still a problem
(whole meaning from the moment you wrote wget till the very end):
http://rawpedia.rawtherapee.com/Linux#The_Automatic_Way

The process you advise doesn’t appear to provide a means of building a
Fedora package (rpm).
I typically use the rpm spec files developed by Fedora Engineering to
package for a Fedora release.
I have been building and packaging Rawtherapee via this process regularly
without any errors until my recent attempt, as reported, which suggests an
issue with the source or with Fedora 31.
Thanks for your help.

Cheers,

@tduell I’ve just succesfully compiled RawTherapee manually on a freshly installed and updated version Fedora 31. No issues there, so I assume the problem is somewhere in your build environment and not with the RT source…

Edit: make sure you have done this:
sudo dnf install make cmake gcc-c++ gtk3-devel gtkmm30-devel lensfun-devel librsvg2-devel lcms2-devel fftw-devel libiptcdata-devel libjpeg-turbo-devel libcanberra-devel libatomic
Those were the minimal amount of packages I had to install to compile. YMMV.

@Thanatomatic, thanks for that advice.
I will have another try with the current git source and see how I go.
Can you tell me if you built an rpm, and if so are you able to share your spec file?

Cheers,
Terry

I tried building an rpm using the 5.7 archive that the website points to (on github?), and that built without error, but on closer examination that source was dated 10 Sep, and builds from my local repo up to date at that time also built without error, so the cause of my local rpm build failures is still a mystery.

Cheers,
Terry

A new clue…klt-devel-1.3.4-20 was installed on my F31 system via the normal update process, on Sat 02 Nov 2019, i.e. between when i was last able to build with error and when I next tried a build, as reported in my initial post.
This may be a red herring, not sure yet.
@Thanatomatic, can you please check what version of klt-devel you used, or if klt use was set to OFF, when you had a successful build, and report the date of the source you used?

Cheers,
Terry

@tduell Please use my correct handle if you want to ping me, it ‘manic’ not ‘matic’ at the end :wink:

I did not build using KLT, as I didn’t see the need to. My installed version of klt-devel is the same as yours, and indeed, with -DWITH_SYSTEM_KLT="OFF" I get the same linking errors as you.

I created an issue on GitHub: #5525

@Thanatomanic, sorry for the error with your handle.
Thanks for your info, and creating an issue on GitHub.

Cheers,
Terry

I see 5.8 has been released, so updated my git repo and attempted to build the master/default, but still encounter the same klt errors.
I thought this problem was to be fixed in 5.8.

Cheers,
Terry

The 5.8-dev code now builds OK in Fedora 31, thanks to all involved for the fix.
Not sure if anyone has noticed, but the ‘about’ declares itself as ‘5.6’.

Cheers,
Terry

The KLT fix was not merged for 5.8 on account of no one having tested it. I merged it yesterday into dev and so it will be part of 5.9.

https://github.com/Beep6581/RawTherapee/issues/5525