"Entry point crc32_z not found in gvc.dll"

I am getting the error “The procedure entry point crc32_z could not be located in dynamic library gvc.dll” when attempting to run my program.

I am running Windows 10, linking to Graphviz 12.2.1 lib’s, 64-bit. Compiling with MSVC 2017. I am using the pre-compiled files, I don’t have the source and I did not compile it myself.

Attached is a screen shot of the GVC.DLL dependencies. “crc32_z” is defined in ZLIB1.DLL, not GVC.DLL. Why is it looking for crc32_z in the wrong place?

Can anyone suggest what’s happening? How do I remedy this?

crc32_z sounds like it should be from zlib, not graphviz?

https://github.com/zlib-ng/zlib-ng/blob/a0fa24710c8faa1a746a20cfd5c7c24571e15ca4/crc32.c#L21

What’s the stack trace, where did you get precompiled gvc.dll from? Graphviz’s code is open source so you can see it if you want.

I don’t know much about Windows linking, but my guess as to what is happening is that your Zlib is < 1.2.9. The pre-built binaries are probably built against a recent Zlib, taking the first branch of the following during compilation:

#if ZLIB_VERNUM >= 0x1290
	crc = crc32_z(crc, (const unsigned char*)s, len);
#else
	crc = crc32(crc, (const unsigned char*)s, len);
#endif

When you try to use this at runtime, it tries to dynamically load crc32_z but can’t find this symbol in your Zlib. The dynamic linker that’s responsible for connecting these things has no idea where the crc32_z symbol is supposed to come from. It just knows it’s undefined and it needs to find a definition of it somewhere.

(As I said, this is all just guesswork and may be totally wrong.)

I got gvc.dll and zlib1.dll from downloading ver. 12.2.1 from the Graphviz website. The entry point expansion is from a program called Dependency Walker (Microsoft).

The zlib1.dll I am using was included from the installation of Graphviz 12.2.1, which was downloaded from the Graphviz website. It is ver. 1.3.1.
It appears that “crc32_z” is not defined in the zlib1.dll.

I wish this were simple :o) I would like to avoid having to re-compile the source.

Thank you for your reply.

I just downloaded the zip files for all permutations of Debug/Release and 32/64 bit from 12.2.1 · graphviz / graphviz · GitLab and analyzed them with dumpbin¹. crc32_z seems to be defined in all of them:

magjac@LAPTOP-BT0S5M2L MINGW64 ~/Downloads $ my-dumpbin -exports Debug/Graphviz-12.2.1-win32/bin/zlib1.dll | grep crc
          7    6 00001500 crc32
          8    7 00001510 crc32_combine
          9    8 00001540 crc32_combine_gen
         10    9 00001560 crc32_combine_op
         11    A 00001580 crc32_z
         27   1A 000019A0 get_crc_table
magjac@LAPTOP-BT0S5M2L MINGW64 ~/Downloads $ my-dumpbin -exports Debug/Graphviz-12.2.1-win64/bin/zlib1.dll | grep crc
          7    6 00001520 crc32
          8    7 00001530 crc32_combine
          9    8 000015A0 crc32_combine_gen
         10    9 000015B0 crc32_combine_op
         11    A 000015F0 crc32_z
         27   1A 00001AA0 get_crc_table
magjac@LAPTOP-BT0S5M2L MINGW64 ~/Downloads $ my-dumpbin -exports Release/Graphviz-12.2.1-win32/bin/zlib1.dll | grep crc
          7    6 00001500 crc32
          8    7 00001510 crc32_combine
          9    8 00001540 crc32_combine_gen
         10    9 00001560 crc32_combine_op
         11    A 00001580 crc32_z
         27   1A 000019A0 get_crc_table
magjac@LAPTOP-BT0S5M2L MINGW64 ~/Downloads $ my-dumpbin -exports Release/Graphviz-12.2.1-win64/bin/zlib1.dll | grep crc
          7    6 00001520 crc32
          8    7 00001530 crc32_combine
          9    8 000015A0 crc32_combine_gen
         10    9 000015B0 crc32_combine_op
         11    A 000015F0 crc32_z
         27   1A 00001AA0 get_crc_table

¹ my-dumpbin just points to the installed dumpbin at C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.42.34433\bin\Hostx64\x64\dumpbin.exe

My guess is that you have an older version of zlib1.dll somewhere in your PATH, before your Graphviz install directory.

Good news: DUMPBIN does show that the entry point “crc32_z” is indeed present in zlib1.dll (the version that was included in the Graphviz 12.2.1 installer package):

Dump of file F:\Program Files\Graphviz\bin\zlib1.dll
File Type: DLL
      7    6 00001520 crc32
      8    7 00001530 crc32_combine
      9    8 000015A0 crc32_combine_gen
     10    9 000015B0 crc32_combine_op
     11    A 000015F0 **crc32_z**

I guess the Dependency Walker program is flawed.

So why is gvc.dll not finding it?

> you have an older version of zlib1.dll somewhere in your PATH

Excellent suggestion. However, I ran a batch job that looks for “zlib1.dll” in all directories in the PATH. Alas there aren’t any instances of zlib1.dll in any of these directories.

As a matter of fact, if I delete or rename the version of zlib1.dll that is in the same directory as my program, then the program complains it can’t find zlib1.dll. So I am indeed calling on the right one.

For those who have the source, who is calling the function “crc32_z”? Is it gvc.dll or someone else? Because the error message implies that whoever is calling it, is looking for it in gvc.dll.

Then I guess you need to add F:\Program Files\Graphviz\bin to your PATH.

For those who have the source, who is calling the function “crc32_z”? Is it gvc.dll or someone else?

As Mark already pointed out, Graphviz is open source. You can find it at graphviz / graphviz · GitLab.

As Matthew already pointed out, the call to crc32_z is in gvc at lib/gvc/gvdevice.c · 026cd8d3feda7cbb541c7f13e96c42a905b73e4a · graphviz / graphviz · GitLab.

The error message is quite ambiguous, but it most certainly means that the entry point crc32_z which is referred to from gvc.dll is not found, i.e., the dynamic linker is resolving symbols “in gvc.dll” when it ascertains “Entry point crc32_z not found".

> Then I guess you need to add F:\Program Files\Graphviz\bin to your PATH

Somehow it looks like the version of zlib1.dll that I thought I had copied from Graphviz, was in fact different. The Graphviz one is ver. 1.3.1. The one in my program library was 1.2.8. I don’t know where that one came from. I re-copied the Graphiz one, and now I’m getting a different error that might not be related to Graphviz.

Thank you all for your help in walking through this.

OK, I finally got it going after using the correct zlib1.dll.

It;s really neat the way Graphviz can just drop into an existing app and make a whole new presentation. Here’s an ancestor chart that I produce:

http://findyourfamilytree.com/images/test4.pdf
Download the PDF and view it with Adobe Reader, the browser PDF viewer doesn’t do it justice.

http://findyourfamilytree.com/images/test.svg

The source can be seen here:
http://findyourfamilytree.com/images/test.gv.

At 197KB, I suspect it’s too big to be posted inline.

The crossed lines are due to pedigree collapse (implexus): when distant cousins inter-marry.

I can’t display it inline because the rendering engine can’t handle escaped quotes in labels.