Closed godfreymark closed 1 year ago
This seems like a compiler issue. gcc 4.3.3 is really old, so it isn't terribly surprising that the compiler is buggy.
It looks like you have a workaround, so I am closing the issue for now. If we see other reports of this issue, then we can re-evaluate working around it upstream.
When I compile the ZSTD code under a VxWorks 6.9 environment, using the gnu compiler version 4.3.3 I see the following error reported when it attempts to compile the zstd_lazy.c file.
I was previously compiling the exact same zstd source code under VxWorks 6.8 environment, using the gnu compiler version 4.1.2 without any issues. So on the face of it, it looks to me like the compiler's handling of the inline code has changed between 4.1.2 and 4.3.3
As a quick/easy work-around I have modfied the actual code in zstd_lazy.c to prevent this function getting "inlined" as follows:
Would like to ask if there is some bug in the ZSTD code itself - related to how it defines the inline qualifier? Or could it be that it needs a particular optimisation flag (or set of flags) specified on the command line to gcc during compilation? I am currently using flag -O2