Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lcms] Update to v2.16 #42187

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

donny-dont
Copy link
Contributor

  • Changes comply with the maintainer guide.
  • SHA512s are updated for each updated download.
  • The "supports" clause reflects platforms that may be fixed by this new version.
  • Any fixed CI baseline entries are removed from that file.
  • Any patches that are no longer applied are deleted from the port's directory.
  • The version database is fixed by rerunning ./vcpkg x-add-version --all and committing the result.
  • Only one version is added to each modified port's versions file.

Copy link
Contributor Author

@donny-dont donny-dont left a comment

Choose a reason for hiding this comment

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

Migrating to the meson port present in 2.16. Only thing I'm not sure of how to make the CMake config that was present before. Think this change will break libjxl since it references the config.

--- a/src/lcms2.def
+++ b/src/lcms2.def
@@ -1,5 +1,3 @@
-LIBRARY LCMS2.DLL
Copy link
Contributor Author

Choose a reason for hiding this comment

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


// Handle "register" keyword
-#if defined(CMS_NO_REGISTER_KEYWORD)
+#if __cplusplus >= 201703L || defined(CMS_NO_REGISTER_KEYWORD)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

ports/lcms/vcpkg.json Outdated Show resolved Hide resolved
@@ -13,5 +13,28 @@
"name": "vcpkg-cmake-config",
"host": true
}
]
],
"features": {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@dg0yt dg0yt left a comment

Choose a reason for hiding this comment

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

Only thing I'm not sure of how to make the CMake config that was present before. Think this change will break libjxl since it references the config.

Alternatives:

  • Write it manually.
  • Move reverse dependencies to pkg-config.

ports/lcms/vcpkg.json Outdated Show resolved Hide resolved
ports/lcms/vcpkg.json Outdated Show resolved Hide resolved
ports/lcms/portfile.cmake Outdated Show resolved Hide resolved
ports/lcms/vcpkg.json Outdated Show resolved Hide resolved
@MonicaLiu0311 MonicaLiu0311 added the category:port-update The issue is with a library, which is requesting update new revision label Nov 18, 2024
@MonicaLiu0311 MonicaLiu0311 marked this pull request as draft November 18, 2024 07:01
@donny-dont donny-dont force-pushed the lcms-2.16 branch 2 times, most recently from 24b687c to 4551952 Compare November 18, 2024 22:02
@donny-dont donny-dont marked this pull request as ready for review November 19, 2024 01:26
@donny-dont
Copy link
Contributor Author

@dg0yt @MonicaLiu0311 is there any way to see what the failure is on linux? My windows build with the same port completed.

@MonicaLiu0311
Copy link
Contributor

Please get failure logs here. Steps to view CI errors: #38994 (comment):

CMake Error at scripts/cmake/vcpkg_execute_build_process.cmake:134 (message):
    Command failed: /mnt/vcpkg-ci/downloads/tools/cmake-3.30.1-linux/cmake-3.30.1-linux-x86_64/bin/cmake --build . --config Debug --target install -- -v -j33
    Working Directory: /mnt/vcpkg-ci/b/openimageio/x64-linux-dbg
    See logs for more information:
      /mnt/vcpkg-ci/b/openimageio/install-x64-linux-dbg-out.log

Call Stack (most recent call first):
  /mnt/vcpkg-ci/installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_build.cmake:74 (vcpkg_execute_build_process)
  /mnt/vcpkg-ci/installed/x64-linux/share/vcpkg-cmake/vcpkg_cmake_install.cmake:16 (vcpkg_cmake_build)
  ports/openimageio/portfile.cmake:75 (vcpkg_cmake_install)
  scripts/ports.cmake:196 (include)

install-x64-linux-dbg-out.log

@dg0yt
Copy link
Contributor

dg0yt commented Nov 19, 2024

TLDNR: There is a stray -D-pthread which is probably meant to be a -pthread.

@donny-dont
Copy link
Contributor Author

TLDNR: There is a stray -D-pthread which is probably meant to be a -pthread.

Good catch. Trying to reproduce in WSL now to see where thats coming from.

@donny-dont
Copy link
Contributor Author

With the amount of packages required and the number of failures I've had over the course of the day because my Ubuntu WSL2 setup was missing some apt-get packages I don't think I'll get further with this today.

Just curious if the CI can be restarted if #42175 lands?

@MonicaLiu0311
Copy link
Contributor

Just curious if the CI can be restarted if #42175 lands?

It is currently in the reviewed status, please wait a moment.

@donny-dont
Copy link
Contributor Author

TLDNR: There is a stray -D-pthread which is probably meant to be a -pthread.

Ok so I got the x64-linux failure locally. I searched the CMakeCache.txt to see where the -pthread was coming from.

Line 1561: PC_LIBRAW_CFLAGS:INTERNAL=-I/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../../include;-I/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../../include/libraw;-pthread;-I/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../../include/jasper;-DLIBJASPER_STATIC_DEFINE
	Line 1563: PC_LIBRAW_CFLAGS_OTHER:INTERNAL=-pthread;-DLIBJASPER_STATIC_DEFINE
	Line 1567: PC_LIBRAW_LDFLAGS:INTERNAL=-L/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../lib/manual-link;-lraw;-L/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../lib;-llcms2;-lm;-pthread;-lz;-ljasperd;-ljpeg
	Line 1568: PC_LIBRAW_LDFLAGS_OTHER:INTERNAL=-pthread
	Line 1578: PC_LIBRAW_R_CFLAGS:INTERNAL=-I/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../../include;-I/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../../include/libraw;-pthread;-I/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../../include/jasper;-DLIBJASPER_STATIC_DEFINE
	Line 1580: PC_LIBRAW_R_CFLAGS_OTHER:INTERNAL=-pthread;-DLIBJASPER_STATIC_DEFINE
	Line 1584: PC_LIBRAW_R_LDFLAGS:INTERNAL=-L/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../lib;-lraw_r;-llcms2;-lm;-pthread;-lz;-ljasperd;-ljpeg
	Line 1585: PC_LIBRAW_R_LDFLAGS_OTHER:INTERNAL=-pthread
	Line 1595: PC_LIBRAW_R_STATIC_CFLAGS:INTERNAL=-I/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../../include;-I/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../../include/libraw;-pthread;-I/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../../include/jasper;-DLIBJASPER_STATIC_DEFINE
	Line 1597: PC_LIBRAW_R_STATIC_CFLAGS_OTHER:INTERNAL=-pthread;-DLIBJASPER_STATIC_DEFINE
	Line 1599: PC_LIBRAW_R_STATIC_LDFLAGS:INTERNAL=-L/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../lib;-lraw_r;-llcms2;-lm;-pthread;-lz;-ljasperd;-ljpeg
	Line 1600: PC_LIBRAW_R_STATIC_LDFLAGS_OTHER:INTERNAL=-pthread
	Line 1613: PC_LIBRAW_STATIC_CFLAGS:INTERNAL=-I/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../../include;-I/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../../include/libraw;-pthread;-I/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../../include/jasper;-DLIBJASPER_STATIC_DEFINE
	Line 1615: PC_LIBRAW_STATIC_CFLAGS_OTHER:INTERNAL=-pthread;-DLIBJASPER_STATIC_DEFINE
	Line 1617: PC_LIBRAW_STATIC_LDFLAGS:INTERNAL=-L/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../lib/manual-link;-lraw;-L/home/dev/vcpkg-upstream/installed/x64-linux/debug/lib/pkgconfig/../../lib;-llcms2;-lm;-pthread;-lz;-ljasperd;-ljpeg
	Line 1618: PC_LIBRAW_STATIC_LDFLAGS_OTHER:INTERNAL=-pthread

The find module for libraw uses pkgconfig so that's where the CFLAGS values are arriving from. Its own pkconfig file did not have -pthread in it, but it did reference lcms. Then I looked at the pkgconfig from lcms.

prefix=${pcfiledir}/../..
includedir=${prefix}/include
libdir=${prefix}/lib

Name: lcms2
Description: LCMS Color Management Library
Version: 2.16

Libs: "-L${libdir}" -llcms2 -lm -pthread
Cflags: "-I${includedir}" -pthread

So it is the problem here. So in these cases do we remove the -pthread from Cflags? I can open up a patch on the lcms repo with a suggested fix for this.

@dg0yt
Copy link
Contributor

dg0yt commented Nov 20, 2024

-pthread in the pc files is not the problem. But maybe it is used wrongly (for definitions, prepending -D).

Use the meson build. Remove obsolete patches and CMake build.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:port-update The issue is with a library, which is requesting update new revision
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants