Bug 263965 - archivers/p5-Compress-Raw-Zlib: 2.104 reports undefined symbol "z_zlibVersion", possibly due to -DZ_PREFIX
Summary: archivers/p5-Compress-Raw-Zlib: 2.104 reports undefined symbol "z_zlibVersion...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
URL:
Keywords: patch-ready
Depends on:
Blocks: 263966
  Show dependency treegraph
 
Reported: 2022-05-14 02:54 UTC by Laurence 'GreenReaper' Parry
Modified: 2022-05-15 01:49 UTC (History)
1 user (show)

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
Patch to remove -DZ_PREFIX (582 bytes, text/plain)
2022-05-14 02:54 UTC, Laurence 'GreenReaper' Parry
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Laurence 'GreenReaper' Parry 2022-05-14 02:54:43 UTC
Created attachment 233905 [details]
Patch to remove -DZ_PREFIX

After doing a portupgrade of this package on FreeBSD 11.4 (I know, we're in the progress of migrating... :-), munin-run apache_accesses gives

/usr/local/lib/perl5/site_perl/mach/5.32/auto/Compress/Raw/Zlib/Zlib.so: Undefined symbol "z_zlibVersion"

The munin plugin in question runs a Perl script using LWP::UserAgent, which may need to handle zlib-compressed streams.

I think the addition of -DZ_PREFIX to DEFINES may have caused the issue; as another developer noted, this is done in this version regardless of whether BUILD_ZLIB is set to false, which is what FreeBSD does as well in a patch:
https://github.com/pmqs/Compress-Raw-Zlib/issues/8
"the system zlib will of course have the regular symbol names and not the renamed versions."

I added the attached patch to end of the port's files/patch-config.in (bearing in mind that the last line of the existing patch is empty) and re-ran the portupgrade, after which the munin plugin ran correctly.

I reported this upstream there, but figured I should mention it here as others may come across it as well. Not sure if it breaks anything, but it worked for me.
Comment 1 Xavier Humbert 2022-05-14 14:01:28 UTC
Amavisd didn't start, with patch applied, it works again
On FreeBSD 13-STABLE amd64
Regards,
Xavier
Comment 2 Laurence 'GreenReaper' Parry 2022-05-14 14:54:58 UTC
Upstream has released 2.105 to address this issue (though in Changes it still says 2.104 again, hopefully nothing triggers off that).
https://github.com/pmqs/Compress-Raw-Zlib/releases/tag/v2.105
Comment 3 Po-Chuan Hsieh freebsd_committer freebsd_triage 2022-05-14 15:12:54 UTC
It is fixed in c0fb55c34187d539ea6faddfe6de16b3e75599ee (2.105). Thanks!