Re: [Wireshark-dev] Finding zlib-ng on MacOS?
On Jun 6, 2024, at 8:36 AM, Anders Broman wrote: > The only reason for not going for zlib-ng only if it's available was starting > out with a partial implementation and being able to build during development. > Now it builds with zlib-ng only > but there is some problem with the updated dependency libraries on Windows > still. C:\Development\wireshark-x64-libs\vcpkg-export-20240524-1-x64-windows-ws\installed\x64-windows\include\libxml2\libxml\encoding.h(28,1): error C1083: Cannot open include file: 'iconv.h': No such file or directory [C:\builds\wireshark\wireshark\build\epan\dissectors\dissectors.vcxproj] #include ^ (compiling source file '../../epan/dissectors/packet-epl-profile-parser.c') Doesn't look related to zlib-ng. ___ Sent via:Wireshark-dev mailing list Archives:https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
Re: [Wireshark-dev] Finding zlib-ng on MacOS?
Den tors 6 juni 2024 kl 01:41 skrev Guy Harris : > On Jun 5, 2024, at 11:07 AM, Anders Broman wrote: > > > Th MR https://gitlab.com/wireshark/wireshark/-/merge_requests/15869 > > is failing to build. I'm guessing the FindZLIBNG.cmake is not finding > the library(?) > > Nope: > > -- Checking for one of the modules 'zlib' > -- Found ZLIB: /Applications/ > Xcode-14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libz.tbd > -- Looking for inflate > -- Looking for inflate - found > -- Looking for inflatePrime > -- Looking for inflatePrime - found > -- Checking for one of the modules 'zlib-ng' > -- Found ZLIBNG: /opt/homebrew/Cellar/zlib-ng/2.1.6/lib/libz-ng.dylib > -- Looking for zng_gzopen > -- Looking for zng_gzopen - found > > It's finding both zlib (as shipped with the system) *and* zlib-ng (as > installed by Homebrew). > > What appears to be happening is that it's including both the zlib and > zlib-ng headers, and getting a collision because they're defining the same > typedef and redefining the same structure: > > In file included from > /Users/gitlab/builds/wireshark/wireshark/wsutil/version_info.c:36: > /opt/homebrew/include/zlib-ng.h:1079:20: error: typedef redefinition with > different types ('uint32_t (*)(void *, const uint8_t **)' (aka 'unsigned > int (*)(void *, const unsigned char **)') vs 'unsigned int (*)(void *, > unsigned char **)') > typedef uint32_t (*in_func) (void *, const uint8_t * *); > ^ > /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/zlib.h:1102:20: > note: previous definition is here > typedef unsigned (*in_func) OF((void FAR *, > ^ > In file included from > /Users/gitlab/builds/wireshark/wireshark/wsutil/version_info.c:36: > /opt/homebrew/include/zlib-ng.h:1792:8: error: redefinition of 'gzFile_s' > struct gzFile_s { > ^ > /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/zlib.h:1839:8: > note: previous definition is here > struct gzFile_s { > ^ > 2 errors generated. > > Is there some particular reason why we search for zlib *and* zlib-ng, > rather than, for example, searching for zlib-ng and, if we don't find it, > searching for zlib, with some -D option to tell it not to look for zlib-ng? > The only reason for not going for zlib-ng only if it's available was starting out with a partial implementation and being able to build during development. Now it builds with zlib-ng only but there is some problem with the updated dependency libraries on Windows still. Best regards Anders > ___ > Sent via:Wireshark-dev mailing list > Archives:https://www.wireshark.org/lists/wireshark-dev > Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev > mailto:wireshark-dev-requ...@wireshark.org > ?subject=unsubscribe > ___ Sent via:Wireshark-dev mailing list Archives:https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe
Re: [Wireshark-dev] Finding zlib-ng on MacOS?
On Jun 5, 2024, at 11:07 AM, Anders Broman wrote: > Th MR https://gitlab.com/wireshark/wireshark/-/merge_requests/15869 > is failing to build. I'm guessing the FindZLIBNG.cmake is not finding the > library(?) Nope: -- Checking for one of the modules 'zlib' -- Found ZLIB: /Applications/Xcode-14.3.1.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk/usr/lib/libz.tbd -- Looking for inflate -- Looking for inflate - found -- Looking for inflatePrime -- Looking for inflatePrime - found -- Checking for one of the modules 'zlib-ng' -- Found ZLIBNG: /opt/homebrew/Cellar/zlib-ng/2.1.6/lib/libz-ng.dylib -- Looking for zng_gzopen -- Looking for zng_gzopen - found It's finding both zlib (as shipped with the system) *and* zlib-ng (as installed by Homebrew). What appears to be happening is that it's including both the zlib and zlib-ng headers, and getting a collision because they're defining the same typedef and redefining the same structure: In file included from /Users/gitlab/builds/wireshark/wireshark/wsutil/version_info.c:36: /opt/homebrew/include/zlib-ng.h:1079:20: error: typedef redefinition with different types ('uint32_t (*)(void *, const uint8_t **)' (aka 'unsigned int (*)(void *, const unsigned char **)') vs 'unsigned int (*)(void *, unsigned char **)') typedef uint32_t (*in_func) (void *, const uint8_t * *); ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/zlib.h:1102:20: note: previous definition is here typedef unsigned (*in_func) OF((void FAR *, ^ In file included from /Users/gitlab/builds/wireshark/wireshark/wsutil/version_info.c:36: /opt/homebrew/include/zlib-ng.h:1792:8: error: redefinition of 'gzFile_s' struct gzFile_s { ^ /Library/Developer/CommandLineTools/SDKs/MacOSX13.sdk/usr/include/zlib.h:1839:8: note: previous definition is here struct gzFile_s { ^ 2 errors generated. Is there some particular reason why we search for zlib *and* zlib-ng, rather than, for example, searching for zlib-ng and, if we don't find it, searching for zlib, with some -D option to tell it not to look for zlib-ng? ___ Sent via:Wireshark-dev mailing list Archives:https://www.wireshark.org/lists/wireshark-dev Unsubscribe: https://www.wireshark.org/mailman/options/wireshark-dev mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe