[Bug 263965] archivers/p5-Compress-Raw-Zlib: 2.104 reports undefined symbol "z_zlibVersion", possibly due to -DZ_PREFIX

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 14 May 2022 02:54:43 UTC

            Bug ID: 263965
           Summary: archivers/p5-Compress-Raw-Zlib: 2.104 reports
                    undefined symbol "z_zlibVersion", possibly due to
           Product: Ports & Packages
           Version: Latest
          Hardware: amd64
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: sunpoet@FreeBSD.org
          Reporter: greenreaper@hotmail.com
             Flags: maintainer-feedback?(sunpoet@FreeBSD.org)
          Assignee: sunpoet@FreeBSD.org

Created attachment 233905
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=233905&action=edit
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

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:
"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

You are receiving this mail because:
You are the assignee for the bug.