Skip to content

[fltk] Revise#51569

Merged
BillyONeal merged 9 commits into
microsoft:masterfrom
dg0yt:fltk
May 7, 2026
Merged

[fltk] Revise#51569
BillyONeal merged 9 commits into
microsoft:masterfrom
dg0yt:fltk

Conversation

@dg0yt

@dg0yt dg0yt commented May 6, 2026

Copy link
Copy Markdown
Contributor

Somehwat improve the dependency import/export mess, hopefully reducing vcpkg baseline regressions.

@dg0yt dg0yt mentioned this pull request May 6, 2026
@BillyONeal

Copy link
Copy Markdown
Member

Related: #51530 (comment)

Repeating relevant information here since this PR is open and that one is closed:

ninja: error: '/usr/lib/x86_64-linux-gnu/libXft.so', needed by 'utils/mglview', missing and no known rule to make it
/usr/bin/ld: cannot find -lXft: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:13119: libinterp/dldfcn/__fltk_uigetfile__.la] Error 1
make[2]: *** Waiting for unfinished jobs....
/usr/bin/ld: cannot find -lXft: No such file or directory
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:13131: libinterp/dldfcn/__init_fltk__.la] Error 1
make[1]: *** [Makefile:28742: all-recursive] Error 1
make: *** [Makefile:11735: all] Error 2

In the broken run fltk had package abi 4cba3965e0f7fcf2771ed15737dad6542d9b28abded996e677bb9825d8994b13

endif (X11_Xft_FOUND)

if (OPTION_USE_XFT)
- set (USE_XFT X11_Xft_FOUND)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

NB a literal X11_Xft_FOUND, not the value.
But it shouldn't get there without X11_Xft_FOUND.

@dg0yt

dg0yt commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

'/usr/lib/x86_64-linux-gnu/libXft.so'

IMO this path should only be produce by find_library in FindX11.cmake in fltk, and eventually it is stored in fltk-config. It is really strange that it ends up in a downstream ninja rule and is reported as missing in the same CI run.

@dg0yt

dg0yt commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

/usr/lib/x86_64-linux-gnu/libXft.so is exported from fltk, but AFAICT it shouldn't exist in the image used in CI.

/mnt/vcpkg-ci/installed/x64-linux/share/fltk/FLTK-Targets.cmake(64):  set_target_properties(fltk PROPERTIES INTERFACE_INCLUDE_DIRECTORIES /mnt/vcpkg-ci/installed/x64-linux/include INTERFACE_LINK_LIBRARIES dl;/usr/lib/x86_64-linux-gnu/libSM.so;/usr/lib/x86_64-linux-gnu/libICE.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so;/usr/lib/x86_64-linux-gnu/libXinerama.so;/usr/lib/x86_64-linux-gnu/libXfixes.so;/usr/lib/x86_64-linux-gnu/libXcursor.so;/usr/lib/x86_64-linux-gnu/libXrender.so;/usr/lib/x86_64-linux-gnu/libXft.so;$<$<NOT:$<CONFIG:DEBUG>>:/mnt/vcpkg-ci/installed/x64-linux/lib/libfontconfig.a>;$<$<CONFIG:DEBUG>:/mnt/vcpkg-ci/installed/x64-linux/debug/lib/libfontconfig.a>;$<$<NOT:$<CONFIG:DEBUG>>:/mnt/vcpkg-ci/installed/x64-linux/lib/libfreetype.a>;$<$<CONFIG:DEBUG>:/mnt/vcpkg-ci/installed/x64-linux/debug/lib/libfreetyped.a>;$<$<NOT:$<CONFIG:DEBUG>>:/mnt/vcpkg-ci/installed/x64-linux/lib/libz.a>;$<$<CONFIG:DEBUG>:/mnt/vcpkg-ci/installed/x64-linux/debug/lib/libz.a>;$<$<NOT:$<CONFIG:DEBUG>>:/mnt/vcpkg-ci/installed/x64-linux/lib/libbz2.a>;$<$<CONFIG:DEBUG>:/mnt/vcpkg-ci/installed/x64-linux/debug/lib/libbz2d.a>;$<$<NOT:$<CONFIG:DEBUG>>:/mnt/vcpkg-ci/installed/x64-linux/lib/libpng16.a>;$<$<CONFIG:DEBUG>:/mnt/vcpkg-ci/installed/x64-linux/debug/lib/libpng16d.a>;$<$<NOT:$<CONFIG:DEBUG>>:/mnt/vcpkg-ci/installed/x64-linux/lib/libz.a>;$<$<CONFIG:DEBUG>:/mnt/vcpkg-ci/installed/x64-linux/debug/lib/libz.a>;m;$<$<NOT:$<CONFIG:DEBUG>>:/mnt/vcpkg-ci/installed/x64-linux/lib/libbrotlidec.a>;$<$<CONFIG:DEBUG>:/mnt/vcpkg-ci/installed/x64-linux/debug/lib/libbrotlidec.a>;$<$<NOT:$<CONFIG:DEBUG>>:/mnt/vcpkg-ci/installed/x64-linux/lib/libbrotlicommon.a>;$<$<CONFIG:DEBUG>:/mnt/vcpkg-ci/installed/x64-linux/debug/lib/libbrotlicommon.a>;$<$<NOT:$<CONFIG:DEBUG>>:/mnt/vcpkg-ci/installed/x64-linux/lib/libexpat.a>;$<$<CONFIG:DEBUG>:/mnt/vcpkg-ci/installed/x64-linux/debug/lib/libexpat.a> )

@BillyONeal

Copy link
Copy Markdown
Member

@dg0yt

dg0yt commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

fltk[core] does not give an indication that it finds libXft.

/mnt/vcpkg-ci/b/fltk/src/ase-1.3.11-61ddd0adce.clean/src/CMakeLists.txt(309):  target_link_libraries(fltk dl;/usr/lib/x86_64-linux-gnu/libSM.so;/usr/lib/x86_64-linux-gnu/libICE.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so;/usr/lib/x86_64-linux-gnu/libXinerama.so;/usr/lib/x86_64-linux-gnu/libXfixes.so;/usr/lib/x86_64-linux-gnu/libXcursor.so;/usr/lib/x86_64-linux-gnu/libXrender.so )

@BillyONeal

Copy link
Copy Markdown
Member

The broken one indeed has:

set_target_properties(fltk PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "dl;/usr/lib/x86_64-linux-gnu/libSM.so;/usr/lib/x86_64-linux-gnu/libICE.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so;/usr/lib/x86_64-linux-gnu/libXinerama.so;/usr/lib/x86_64-linux-gnu/libXfixes.so;/usr/lib/x86_64-linux-gnu/libXcursor.so;/usr/lib/x86_64-linux-gnu/libXrender.so;/usr/lib/x86_64-linux-gnu/libXft.so;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libfontconfig.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libfontconfig.a>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libfreetype.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libfreetyped.a>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libz.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libz.a>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libbz2.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libbz2d.a>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libpng16.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libpng16d.a>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libz.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libz.a>;m;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libbrotlidec.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libbrotlidec.a>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libbrotlicommon.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libbrotlicommon.a>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libexpat.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libexpat.a>"
)

@dg0yt

dg0yt commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

fltk[core,opengl] does:

target_link_libraries(fltk dl;/usr/lib/x86_64-linux-gnu/libSM.so;/usr/lib/x86_64-linux-gnu/libICE.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so;/usr/lib/x86_64-linux-gnu/libXinerama.so;/usr/lib/x86_64-linux-gnu/libXfixes.so;/usr/lib/x86_64-linux-gnu/libXcursor.so;/usr/lib/x86_64-linux-gnu/libXrender.so )

but @BillyONeal's zip comes with this result in FLTK-Targets.cmake:

set_target_properties(fltk PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "dl;/usr/lib/x86_64-linux-gnu/libSM.so;/usr/lib/x86_64-linux-gnu/libICE.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so;/usr/lib/x86_64-linux-gnu/libXinerama.so;/usr/lib/x86_64-linux-gnu/libXfixes.so;/usr/lib/x86_64-linux-gnu/libXcursor.so;/usr/lib/x86_64-linux-gnu/libXrender.so;/usr/lib/x86_64-linux-gnu/libXft.so;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libfontconfig.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libfontconfig.a>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libfreetype.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libfreetyped.a>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libz.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libz.a>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libbz2.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libbz2d.a>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libpng16.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libpng16d.a>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libz.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libz.a>;m;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libbrotlidec.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libbrotlidec.a>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libbrotlicommon.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libbrotlicommon.a>;\$<\$<NOT:\$<CONFIG:DEBUG>>:${VCPKG_IMPORT_PREFIX}/lib/libexpat.a>;\$<\$<CONFIG:DEBUG>:${VCPKG_IMPORT_PREFIX}/debug/lib/libexpat.a>"
)

i.e. after libXrender comes libXft with its chain of usage requirements (via fontconfig and freetype).

@dg0yt

dg0yt commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

Synchronizing posts...

@dg0yt

dg0yt commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

And then it is gone again.

@BillyONeal

Copy link
Copy Markdown
Member

image

@dg0yt dg0yt marked this pull request as ready for review May 7, 2026 16:17

@BillyONeal BillyONeal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks!

@BillyONeal BillyONeal merged commit 4bc07e3 into microsoft:master May 7, 2026
16 checks passed
@dg0yt dg0yt deleted the fltk branch May 7, 2026 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants