You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I attempt to compile the file file library on 32-bit Linux, I get the following error:
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Ic-ext -Izstd -I/opt/_internal/cpython-3.9.1/include/python3.9 -c zstd.c -o build/temp.linux-i686-3.9/zstd.o -DZSTD_SINGLE_FILE -DZSTDLIB_VISIBILITY= -DZDICTLIB_VISIBILITY= -DZSTDERRORLIB_VISIBILITY= -fvisibility=hidden -Werror
In file included from c-ext/python-zstandard.h:21,
from zstd.c:19:
zstd/zstdlib.c:79852: error: "_LARGEFILE64_SOURCE" redefined [-Werror]
79852 | # define _LARGEFILE64_SOURCE
|
In file included from /usr/include/limits.h:26,
from /opt/rh/devtoolset-9/root/usr/lib/gcc/i686-redhat-linux/9/include/limits.h:194,
from /opt/rh/devtoolset-9/root/usr/lib/gcc/i686-redhat-linux/9/include/syslimits.h:7,
from /opt/rh/devtoolset-9/root/usr/lib/gcc/i686-redhat-linux/9/include/limits.h:34,
from /opt/_internal/cpython-3.9.1/include/python3.9/Python.h:11,
from c-ext/python-zstandard.h:13,
from zstd.c:19:
/usr/include/features.h:174: note: this is the location of the previous definition
174 | # define _LARGEFILE64_SOURCE 1
|
cc1: all warnings being treated as errors
The faulty code in question appears to be in zdict.c:
/**** start inlining dictBuilder/zdict.c ****/
<snip>
/*-**************************************
* Compiler Options
****************************************/
/* Unix Large Files support (>4GB) */
#define _FILE_OFFSET_BITS 64
#if (defined(__sun__) && (!defined(__LP64__))) /* Sun Solaris 32-bits requires specific definitions */
# define _LARGEFILE_SOURCE
#elif ! defined(__LP64__) /* No point defining Large file for 64 bit */
# define _LARGEFILE64_SOURCE
#endif
The text was updated successfully, but these errors were encountered:
indygreg
added a commit
to indygreg/zstd
that referenced
this issue
Dec 26, 2020
This ensures the symbols aren't redefined, which would result in a compiler
error.
I was getting redefined symbols for _LARGEFILE64_SOURCE when building for
32-bit x86 Linux on an older CentOS release in a CI environment. With this
change, I'm able to compile the single file library in this environment.
Closesfacebook#2443.
If I attempt to compile the file file library on 32-bit Linux, I get the following error:
The faulty code in question appears to be in zdict.c:
The text was updated successfully, but these errors were encountered: