Skip to content

libtiff upgrade to version 4.6.0#25096

Merged
vpisarev merged 14 commits intoopencv:4.xfrom
klatism:libtiff-upgrade
Mar 22, 2024
Merged

libtiff upgrade to version 4.6.0#25096
vpisarev merged 14 commits intoopencv:4.xfrom
klatism:libtiff-upgrade

Conversation

@klatism
Copy link
Copy Markdown
Contributor

@klatism klatism commented Feb 26, 2024

Upgrade libtiff dependency from version 4.2.0 to 4.6.0.

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV
  • The PR is proposed to the proper branch
  • There is a reference to the original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

@asmorkalov
Copy link
Copy Markdown
Contributor

Looks like libport.h and snprintf.c are not present in libtiff 4.6.0 and may be removed from OpenCV too.

@asmorkalov
Copy link
Copy Markdown
Contributor

@opencv-alalek should we update CMake with the original project CMake as they diverge significantly.

@opencv-alalek
Copy link
Copy Markdown
Contributor

with the original project CMake

All 3rdparty libs have adoption to OpenCV build scripts. We can't use original "as is".
Need to check applied patches vs changes from upstream.

@opencv-alalek
Copy link
Copy Markdown
Contributor

Please ignore CMake warnings - they are expected (internal checks of build configurations).
Please take a look on compilation warnings (e.g., on Windows, Mac).

@asmorkalov asmorkalov added this to the 4.10.0 milestone Feb 27, 2024
@asmorkalov asmorkalov requested a review from opencv-alalek March 5, 2024 11:53
Copy link
Copy Markdown
Contributor

@asmorkalov asmorkalov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me. I propose to drop versioninfo.rc, makefiles and other files that are not used in OpenCV build.

@klatism
Copy link
Copy Markdown
Contributor Author

klatism commented Mar 6, 2024

Thanks! I'll try to get rid of those unused files
Also, looking into that failing Android test. Not sure yet what happened there. May need some help.

@opencv-alalek
Copy link
Copy Markdown
Contributor

failing Android test

Please ignore. It is CI infrastructure problem.

@asmorkalov
Copy link
Copy Markdown
Contributor

@opencv-alalek Any sugesstions? May I merge the pr?

@@ -0,0 +1,195 @@
EXPORTS TIFFAccessTagMethods
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use .def files.

libtiff is always compiled as static library in OpenCV so it is not exported.

}

/* initialise the huffman code tables */
int main(int argc, char *argv[])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No utility files in OpenCV

@klatism
Copy link
Copy Markdown
Contributor Author

klatism commented Mar 8, 2024

removed more files yesterday, which seems to have a peculiar effect - Android CI is now green, but Ubuntu started to fail. I'm wondering whether it may be an infrastructure problem as well.

@opencv-alalek
Copy link
Copy Markdown
Contributor

Thank you for update!

Ignore, these CI builders fails on other PRs too in the same way (not related to this PR).

Copy link
Copy Markdown
Contributor

@opencv-alalek opencv-alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done! Thank you for contribution 👍

CMakeLists.txt Outdated
@@ -227,7 +227,7 @@ endif()
OCV_OPTION(OPENCV_ENABLE_NONFREE "Enable non-free algorithms" OFF)

# 3rd party libs
OCV_OPTION(OPENCV_FORCE_3RDPARTY_BUILD "Force using 3rdparty code from source" OFF)
OCV_OPTION(OPENCV_FORCE_3RDPARTY_BUILD "Force using 3rdparty code from source" ON)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this "validation" change before merge.

@klatism
Copy link
Copy Markdown
Contributor Author

klatism commented Mar 11, 2024

the temporary change to OPENCV_FORCE_3RDPARTY_BUILD is reverted. Ready to submit.

@klatism
Copy link
Copy Markdown
Contributor Author

klatism commented Mar 21, 2024

@asmorkalov @opencv-alalek, just checking if there's anything else left to do in this PR, or it can be merged.

@vpisarev vpisarev merged commit 52f3f5a into opencv:4.x Mar 22, 2024
@asmorkalov asmorkalov mentioned this pull request Apr 1, 2024
klatism added a commit to klatism/opencv that referenced this pull request May 17, 2024
* libtiff upgrade to version 4.6.0

* fix tiffvers.h cmake generation

* temp: force build 3rd party deps from source

* remove libport.h and spintf.c

* cmake fixes

* don't use tiff_dummy_namespace on windows

* introduce numeric_types namespace alias

* include cstdint

* uint16_t is not a numeric_types type

* fix uint16 and uint32 type defs

* use standard c++ types

* remove unused files

* remove more unused files

* revert build 3rd party code from source

---------

Co-authored-by: Misha Klatis <misha.klatis@autodesk.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants