Rawtherapee: Linking against system version of KLT fails on Fedora 31

Created on 11 Nov 2019  路  4Comments  路  Source: Beep6581/RawTherapee

See here: https://discuss.pixls.us/t/problems-building-current-git-on-fedora-31

To reproduce:

  1. Clean building environment, clean clone of dev
  2. klt-devel-1.3.4 installed (which is the latest version as of writing)
  3. Build RT using -DWITH_SYSTEM_KLT="ON"
  4. Linking fails with undefined reference to `KLTCreateTrackingContext' or others.

Can anyone test on different Linux distro's?

compilation bug

Most helpful comment

As the maintainer of RT in Fedora repositories, I would like to add some notes:

  • RT 5.7 stable builds fine with system KLT 1.3.4
  • KLT in Fedora has not been upgraded in the last years and it's the same version bundled in RT

So, if the problem is with RT master branch, I suppose it could be due to the recent dependencies cleanup... I should have some free time tomorrow, if so I'll have a look at this.

All 4 comments

It's not present in Debian, and seems to be packaged nearly exclusively in Fedora.

klt is not packaged in Gentoo/Sabayon either.

As the maintainer of RT in Fedora repositories, I would like to add some notes:

  • RT 5.7 stable builds fine with system KLT 1.3.4
  • KLT in Fedora has not been upgraded in the last years and it's the same version bundled in RT

So, if the problem is with RT master branch, I suppose it could be due to the recent dependencies cleanup... I should have some free time tomorrow, if so I'll have a look at this.

I confirm that today dev branch fails to build using system KLT:

/usr/bin/ld: ../rtengine/librtengine.a(calc_distort.cc.o): in function `calcDistortion(unsigned char*, unsigned char*, int, int, int, double&)':
/home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:48: undefined reference to `KLTCreateTrackingContext'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:55: undefined reference to `KLTCreateFeatureList'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:56: undefined reference to `KLTCreateFeatureTable'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:62: undefined reference to `KLTSelectGoodFeatures'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:63: undefined reference to `KLTStoreFeatureList'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:65: undefined reference to `KLTTrackFeatures'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:66: undefined reference to `KLTStoreFeatureList'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:279: undefined reference to `KLTFreeFeatureTable'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:280: undefined reference to `KLTFreeFeatureList'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:281: undefined reference to `KLTFreeTrackingContext'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:160: undefined reference to `KLTFreeFeatureTable'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:161: undefined reference to `KLTFreeFeatureList'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:162: undefined reference to `KLTFreeTrackingContext'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:270: undefined reference to `KLTFreeFeatureTable'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:271: undefined reference to `KLTFreeFeatureList'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:272: undefined reference to `KLTFreeTrackingContext'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:261: undefined reference to `KLTFreeFeatureTable'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:262: undefined reference to `KLTFreeFeatureList'
/usr/bin/ld: /home/rpmbuild/rpmbuild/BUILD/RawTherapee-dev/rtengine/calc_distort.cc:263: undefined reference to `KLTFreeTrackingContext'
collect2: error: ld returned 1 exit status

I see that calc_distort.cc has not been changed lately, but maybe these two lines:
https://github.com/Beep6581/RawTherapee/blob/7b54c7f2a42da28f38bdaf5399c0ef3e339e58dc/rtengine/calc_distort.cc#L8-L9
should not statically refer to the bundled KLT?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Beep6581 picture Beep6581  路  4Comments

jade-nl picture jade-nl  路  4Comments

heckflosse picture heckflosse  路  4Comments

agriggio picture agriggio  路  4Comments

heckflosse picture heckflosse  路  5Comments