varnish-cache icon indicating copy to clipboard operation
varnish-cache copied to clipboard

build: macos compatibility build fixes

Open chenrui333 opened this issue 9 months ago • 6 comments

fixes https://github.com/varnishcache/varnish-cache/issues/4299 relates to https://github.com/Homebrew/homebrew-core/pull/223233

chenrui333 avatar May 26 '25 03:05 chenrui333

@chenrui333 thank you for your patches. Regarding the endianness-related changes, I would like wait what phk thinks, but the vmodtool.py change looks simple and clean, so I cherry-picked it. Related to that, are there any MacOS-specifics on retrieving the version from a shared object? If yes, would you maybe share the respective command to be added here?

nigoroll avatar May 28 '25 18:05 nigoroll

Related to that, are there any MacOS-specifics on retrieving the version from a shared object? If yes, would you maybe share the respective command to be added here?

yeah, you can use otool to extract the version info as below:

 > otool -s __TEXT vmod_vcs lib/varnish/vmods/libvmod_debug.so \
                                                                | awk '/^[0-9a-f]/ {for(i=2;i<=NF;i++) printf "%s",$i}' \
                                                                | xxd -r -p \
                                                                | strings
18e27f081788b5e5d44c480f6d9749c07d53ddb9

chenrui333 avatar May 31 '25 15:05 chenrui333

another thing is looks like there is no CI for macos, maybe we should also add one?

chenrui333 avatar May 31 '25 15:05 chenrui333

another thing is looks like there is no CI for macos, maybe we should also add one?

we would certainly welcome a contribution :) If you would add one, please have a look at https://github.com/varnishcache/varnish-cache/blob/master/tools/vtest.sh. You need to generate an ssh keypair and send your public key to phk (or me, as a backup) to have it accepted for reporting.

nigoroll avatar May 31 '25 17:05 nigoroll

yeah, you can use otool to extract the version info as below:

Thank you, I added your recipe

nigoroll avatar May 31 '25 18:05 nigoroll

np at all, any concern of merging this PR? (we have already applied it on the homebrew side)

chenrui333 avatar Jun 07 '25 18:06 chenrui333

I belive this has been fixed: the Mac-Mini VTester is happy.

bsdphk avatar Jun 30 '25 13:06 bsdphk