Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

sth0
Copy link
Contributor

@sth0 sth0 commented Oct 31, 2024

Needed cast of NULL to (unsigned long) in xftdpy.c to comply with stricter compiler requirements.

Needed cast of NULL to (unsigned long) in xftdpy.c
@sth0 sth0 added the bug label Oct 31, 2024
Copy link
Contributor

@dhomeier dhomeier left a comment

Choose a reason for hiding this comment

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

Does build on 14.7/Xcode 16.1 as well; however I was also able to build the latest version 2.3.8 without needing to patch any additional files; the bug in https://bugs.freedesktop.org/show_bug.cgi?id=47178 seems to have long been fixed upstream.

@sth0
Copy link
Contributor Author

sth0 commented Oct 31, 2024

I will try the newer upstream version, I just didn't want to get into recreating a complex patch file.

@sth0
Copy link
Contributor Author

sth0 commented Nov 1, 2024

Updated to use upstream 2.3.8 version. Only tested on Intel 15.X system

Copy link
Contributor

@dhomeier dhomeier 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 apart from the Shlibs-version; built on 14.7/Xcode 16.1-arm64.
I originally tried with the old AM_CPPFLAGS patch (the freetype one in xftglyphs.c is already merged upstream), but that does not seem to be needed anymore either – compiled with -I../include/X11/Xft in front in any case.

@sth0
Copy link
Contributor Author

sth0 commented Nov 2, 2024

After reading the shlibs policy, I am not sure why this package would be compatibility version 6.0.0 vs 5.0.0 and not 2.0.0. What sets that version number? Is it just an incremented value as the shlib version is changed? Why would it be a major change instead of a minor change to reflect the actual code revision version?

@dhomeier
Copy link
Contributor

dhomeier commented Nov 5, 2024

The compatibility version is whatever otool -L says it is, which is set upstream in the code, so not really within the powers of our packaging policy. When and how upstream developers decide to increment it is usually beyond my understanding, so I generally build with fink --validate.

@nieder
Copy link
Member

nieder commented Nov 10, 2024

Is the spacing bug mentioned in the unpatched .info (now at https://gitlab.freedesktop.org/xorg/lib/libxft/-/issues/1 ) fixed? @dmacks

ETA: noticed @dhomeier saying https://bugs.freedesktop.org/show_bug.cgi?id=47178 was fixed. That bug was only closed because upstream moved from bugzilla to gitlab. The moved current bug URL is at my link above.

@nieder
Copy link
Member

nieder commented Nov 10, 2024

Doesn't matter since I think the NULL fix is fine, but upstream changed it to 0, rather than typing it.
https://gitlab.freedesktop.org/xorg/lib/libxft/-/commit/9c23173cf1ff861bdb8538e3aa21ec509b0d87d8

I cherry picked the first commit (NULL fix) and applied it to master.

@sth0
Copy link
Contributor Author

sth0 commented Nov 10, 2024

I thought I had reverted everything except the NULL fix. But anyway, thanks, and I think which value is cast to what is irrelevant. I personally prefer keeping the NULL for readability of the code, but YMMV.

@nieder
Copy link
Member

nieder commented Nov 10, 2024

Yeah, I don't care if it's a typed NULL or 0. Anyway, I have no idea why this PR shows conflicts since I specifically cherry picked the first commit in the PR.

@sth0
Copy link
Contributor Author

sth0 commented Nov 10, 2024

I see the difference, the update to the newer upstream as suggested by dhomeier was rejected. 2.3.8 vs 2.3.0

@sth0
Copy link
Contributor Author

sth0 commented Nov 11, 2024

Been traveling, seems like I didn't push the reversion to the previous Shlibs def. Now done.

@nieder
Copy link
Member

nieder commented Nov 12, 2024

From the build output during deb file validation at the end:

Validating .deb dir /opt/sw/build.build/root-xft2-shlibs-2.3.8-1...
Error: Shlibs field says compatibility version for /opt/sw/lib/xft2/lib/libXft.2.dylib is 5.0.0, but it is actually 6.0.0.

The values before 928321f were actually correct.

@dhomeier
Copy link
Contributor

The previous ones were those for 2.3.8, these are now the 2.2.0 ones again, but I thought the update to 2.3.8 was rejected since it is not clear if the spacing problem in https://gitlab.freedesktop.org/xorg/lib/libxft/-/issues/1 has really been fixed?
There is one newer commit https://gitlab.freedesktop.org/xorg/lib/libxft/-/commit/3ca7a7c that sounds like it might be dealing with it, but I haven't been able to confirm that – did not notice any fonts problems with my xterm, but it does not look like that is linking xft2.

@dhomeier
Copy link
Contributor

dhomeier commented Nov 12, 2024

I did build mrxvt now once against the 2.2.0 version from your initial commit, and against 2.3.8 without the patches, and cannot see any differences in font spacings or other issues between the two:
mrxvt-xft2-2 2 0

mrxvt-xft2-2 3 8

So updating might be OK? Also built on 10.14 with Xcode 11.3 without the patchfile.

sth0 added 2 commits November 14, 2024 21:29
# Conflicts:
#	10.9-libcxx/stable/main/finkinfo/x11/xft2-dev.info
#	10.9-libcxx/stable/main/finkinfo/x11/xft2-dev.patch
% otool -L /opt/sw/lib/xft2/lib/libXft.2.3.8.dylib
/opt/sw/lib/xft2/lib/libXft.2.3.8.dylib:
		/opt/sw/lib/xft2/lib/libXft.2.dylib (compatibility version 6.0.0, current version 6.8.0)
@sth0
Copy link
Contributor Author

sth0 commented Nov 15, 2024

Set compatibility version to 6.0.0 as tool declares it
Resolved merge with master, this should be working.

% otool -L /opt/sw/lib/xft2/lib/libXft.2.3.8.dylib
/opt/sw/lib/xft2/lib/libXft.2.3.8.dylib:
/opt/sw/lib/xft2/lib/libXft.2.dylib (compatibility version 6.0.0, current version 6.8.0)

@sth0 sth0 requested a review from dhomeier December 14, 2024 20:26
@sth0
Copy link
Contributor Author

sth0 commented Jan 3, 2025

Should be good to go?
image

Patchfile necessary for stringent compiler on Sequoia

@sth0
Copy link
Contributor Author

sth0 commented May 30, 2025

ping?

Copy link
Member

@dmacks dmacks left a comment

Choose a reason for hiding this comment

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

Needs a Shlibs tweak. There is a new teeny-version available (2.3.9), but it does not appear to have substantial changes...no harm in simply getting this ticket corrected and merged, and then work on small update sometime.

Files: lib/xft2/lib/libXft.2.*dylib
Shlibs: %p/lib/xft2/lib/libXft.2.dylib 5.0.0 %n (>= 2.2.0-1)
DocFiles: AUTHORS COPYING ChangeLog NEWS README
Shlibs: %p/lib/xft2/lib/libXft.2.dylib 6.0.0 %n (>= 2.2.0-1)
Copy link
Member

Choose a reason for hiding this comment

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

The parenthetical in the Shlibs field is a package-version string that indicates when the compatibility_version value changed. "As of fink package 2.3.8-1, it jumped from 5.0.0 to 6.0.0", so it should be "(>= 2.2.0-1)" not "(>= 2.2.0-1)". The Shlibs tag is indeed confusing to lots of people!

@sth0
Copy link
Contributor Author

sth0 commented Jun 1, 2025

version 2.3.8 builds just fine with the edit I listed above. However that small tweak upstream update to version 2.3.9 does not build. It is looking for xproto and xrender which appear to be virtual packages that are installed. Looks like the correct PKG_CONFIG_PATH is set.

Is this because it is using ppkg-config and not system-pkgconfig which does not provide xrender and xproto?

checking whether make supports nested variables... (cached) yes
checking for xrender >= 0.8.2 x11 xproto >= 7.0.22... no
configure: error: Package requirements (xrender >= 0.8.2 x11 xproto >= 7.0.22) were not met:

Can't find xrender >= 0.8.2 x11 xproto.pc in any of /opt/sw/lib/pkgconfig /opt/sw/share/pkgconfig /opt/X11/lib/pkgconfig /opt/X11/share/pkgconfig /usr/X11/lib/pkgconfig /usr/X11/share/pkgconfig /usr/lib/pkgconfig /usr/share/pkgconfig
use the PKG_CONFIG_PATH environment variable, or
specify extra search paths via 'search_paths'

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables XRENDER_CFLAGS
and XRENDER_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
### execution of /tmp/fink.mH0FZ failed, exit code 1

and listing of libraries:

%  fink list xrender xproto
Information about 16257 packages read in 2 seconds.
 i   system-pkgconfig-cairo-xlib-xrender                      1.17.4-1                                   [virtual pkgconfig package representing cairo-xlib-xrender]
 i   system-pkgconfig-dmxproto                                2.3.1-1                                    [virtual pkgconfig package representing dmxproto]
 i   system-pkgconfig-xproto                                  7.0.33-1                                   [virtual pkgconfig package representing xproto]
 i   system-pkgconfig-xrender                                 0.9.10-1                                   [virtual pkgconfig package representing xrender]
% 

@nieder
Copy link
Member

nieder commented Jun 1, 2025

$ grep Version: /opt/X11/lib/pkgconfig/xrender.pc /opt/X11/share/pkgconfig/xproto.pc /opt/X11/share/pkgconfig/renderproto.pc 
/opt/X11/lib/pkgconfig/xrender.pc:Version: 0.9.11
/opt/X11/share/pkgconfig/xproto.pc:Version: 7.0.33
/opt/X11/share/pkgconfig/renderproto.pc:Version: 0.11.1

renderproto is a dependency of xrender, so I included it in the debug.

This is with Xquartz 2.8.5. Your fink list output indicates a slightly older version, but the virtual packages should still satisfy what ppkg-config is looking for (ppkg-config is just a different tool to read .pc files). system-pkgconfig-FOO is the name of a virtual package that Fink creates to identify having a specific .pc available from Xquartz.

Try manually running the detections one by one to see which one breaks and if there are more details:

ppkg-config --cflags "xrender >= 0.8.2"
ppkg-config --cflags "x11"
ppkg-config --cflags "xproto >= 7.0.22"
ppkg-config --cflags "renderproto >= 0.9"

They should all output -I/opt/X11/include

@sth0
Copy link
Contributor Author

sth0 commented Jun 1, 2025

They should all output -I/opt/X11/include
And they all do list that. How ever my Xquartz is old (2.8.2)
The versions are all the same except xrender.pc shows version 0.9.10 which should satisfy the requirement
I reinstalled Xquartz (same version) and the file exists /opt/X11/include/X11/extensions/Xrender.h and Xproto.h

I seem to have two different versions of xproto.pc ??? But either one should satisfy the dependency.

% diff /opt/X11/lib/pkgconfig/xproto.pc /opt/X11/share/pkgconfig/xproto.pc
2,3d1
< exec_prefix=${prefix}
< libdir=${exec_prefix}/lib
9c7
< Version: 7.0.31
---
> Version: 7.0.33

I am going to remove Xquartz as much as I can and reinstall.

@sth0
Copy link
Contributor Author

sth0 commented Jun 1, 2025

Removing all X11 and reinstalling Xquartz 2.8.5 still has package not found.
all four of the individual tests give -I/opt/X11/include
The ppkg-config command returns that the package exists

% ppkg-config --exists "xrender >= 0.8.2"
% echo $?
0

@dmacks
Copy link
Member

dmacks commented Jun 1, 2025

It's a bug in ppkg-config. Will look into it....

@dmacks
Copy link
Member

dmacks commented Jun 1, 2025

It's a bug in ppkg-config. Will look into it....

PerlPkgConfig/perl-PkgConfig#63

@sth0
Copy link
Contributor Author

sth0 commented Jun 2, 2025

Ok, that is why I seem to be beating my head against a wall. Thanks for that info.

@dmacks
Copy link
Member

dmacks commented Jun 2, 2025

The ppkg-config bug can be worked-around by a patch to ./configure, but more generally #923/#1254 is the robust solution.

Updated to use pkgconf instead of ppkg-config, avoid command line bug in ppkg-config
Updated Shlibs to version 6.0 for library versions >= 2.3.8
@sth0
Copy link
Contributor Author

sth0 commented Jun 2, 2025

Probably need to wait until pkgconf is released, but since it is broken anyway.....
Updated to use pkgconf instead of ppkg-config, avoid command line bug in ppkg-config
Updated Shlibs to version 6.0 for library versions >= 2.3.8
Builds in maintainer mode

@sth0 sth0 requested a review from dmacks June 2, 2025 20:09
@dhomeier
Copy link
Contributor

dhomeier commented Jun 4, 2025

As an intermediate data point I've built and installed the pkgconf from #1254 and successfully built some packages like the new openssl350 with it on Big Sur 11.7, but am completely stuck in conflicting dependency hell before I can even attempt to build this package, as already fontconfig2 or freetype219 are pulling this in:

The following package will be installed or updated:
 xft2-dev
The following 76 additional packages will be installed:
 blt-dev blt-shlibs cairo cairo-shlibs cmake doxygen fontconfig-config fontconfig2-dev fontconfig2-shlibs freeglut2 freeglut2-shlibs freetype219
 freetype219-shlibs gd3 gd3-shlibs ghostscript gnutls30-3.7 gnutls30-3.7-shlibs groff gsasl19-dev gsasl19-shlibs gtk-doc itstool json-c5 json-c5-shlibs lcms2
 lcms2-shlibs libbrotli1 libbrotli1-shlibs libcurl4 libcurl4-shlibs libgraphite2-dev libgraphite2-shlibs libharfbuzz0-dev libharfbuzz0-shlibs libheif1-dev
 libheif1-shlibs libidn libidn-shlibs libjasper7 libjasper7-shlibs libjpeg8.2-turbo libjpeg8.2-turbo-shlibs liblerc4 liblerc4-shlibs libopenjp2.7
 libopenjp2.7-shlibs libraqm0-dev libraqm0-shlibs librtmp1 librtmp1-shlibs libtiff6 libtiff6-shlibs libwebp7 libwebp7-shlibs libwoff2-1.0.2-dev
 libwoff2-1.0.2-shlibs libx265.192-dev libx265.192-shlibs libxml2-py310 netpbm-bin netpbm11-shlibs openjpeg-bin openldap2-dev openldap2-shlibs
 openmotif4-2level openmotif4-2level-common openmotif4-2level-shlibs openssl300-dev python310 python310-shlibs tcltk tcltk-dev tcltk-shlibs texlive-base
 xft2-shlibs
The following 2 packages might be temporarily removed:
 freeglut2 libjpeg9
Default answer will be chosen in 60 seconds...
Do you want to continue? [Y/n] 
Reading buildlock packages...
	All buildlocks accounted for.
/opt/sw2/bin/dpkg-lockwait -i /opt/sw2/fink/dists/stable/main/binary-darwin-x86_64/crypto/openssl300-dev_3.0.16-1_darwin-x86_64.deb
Selecting previously unselected package openssl300-dev.
dpkg: considering removing openssl110-dev in favour of openssl300-dev ...
dpkg: yes, will remove openssl110-dev in favour of openssl300-dev
(Reading database ... 225305 files and directories currently installed.)
Preparing to unpack .../openssl300-dev_3.0.16-1_darwin-x86_64.deb ...
Unpacking openssl300-dev (3.0.16-1) ...
Setting up openssl300-dev (3.0.16-1) ...
Processing triggers for dpkg-base-files (0.4-1) ...
Clearing dependency_libs of .la files in /opt/sw2/lib ...
Failed: Problem resolving dependencies. Check for circular dependencies.

I don't have the time or nerve to figure out which of the 76 packages may be built on either openssl300-dev or openssl110-dev only (virtually everything seems to be pulling in texlive-base and ghostscript with their full host already), but willing to continue with a pointer on how to proceed.

@dmacks
Copy link
Member

dmacks commented Jun 4, 2025

From that list of packages, I suspect it's #1246. @nieder has a proposed change that could fix it (#1246 (comment)).

@dhomeier
Copy link
Contributor

dhomeier commented Jun 5, 2025

Thanks, will have an eye on that. In fact, recalling fink list --format=dotty-build --recursive turned out that the only openssl110 dependency is python310, but trying to replace that with the openssl300-build from #996 lets it directly fail with
Failed: Problem resolving dependencies. Check for circular dependencies.

@dmacks
Copy link
Member

dmacks commented Jun 20, 2025

pkgconf (PR #1254) is pushed. You can either use it directly (dependency on 'pkgconf' and passing bin/pkgconf as the pkg-config executable by whatever means) or a dependency on 'pkgconfig (>= 1.0)', which supplies the default executable location bin/pkg-config as a wrapper around bin/pkgconf. I pushed the latter to the existing xft2-dev.info via ada38da

@sth0
Copy link
Contributor Author

sth0 commented Jun 20, 2025

sounds good. I am on travel for the next couple of weeks so I will pick up when I return.

@dmacks
Copy link
Member

dmacks commented Jun 20, 2025

Enjoy! I just got back from vacay (I think that's what the cool kids call it) a few days ago.

@sth0
Copy link
Contributor Author

sth0 commented Jun 20, 2025

Part vacay, part work, just saw my daughter graduated, visiting relatives, then a week of work at Los Alamos lab and then a week of more vacay...

@dmacks
Copy link
Member

dmacks commented Oct 11, 2025

Thanks all! I've squash-merged this PR (some parts had already been pushed, so that was easiest fix for the conflicts).

Now that pkgconfig is actually pkgconf, we also don't need any special hackery regarding that. If user already has old pkgconfig installed, that's sufficient; if they try to install pkgconfig now they get pkgconf, and don't need a special path to it.

@dmacks dmacks closed this Oct 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants