markokr / pghashlib Goto Github PK
View Code? Open in Web Editor NEWStable hash functions for Postgres
License: Other
Stable hash functions for Postgres
License: Other
Hi, when trying to compile pghashlib on an Apple M1 Silicon chip with the newer arm64 architecture, I get the following error:
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -bundle -multiply_defined suppress -o hashlib.so src/pghashlib.o src/crc32.o src/lookup2.o src/lookup3.o src/inthash.o src/murmur3.o src/pgsql84.o src/city.o src/spooky.o src/md5.o src/siphash.o -L/usr/local/lib -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -L/usr/local/opt/[email protected]/lib -L/usr/local/opt/readline/lib -Wl,-dead_strip_dylibs -bundle_loader /usr/local/Cellar/postgresql/13.4/bin/postgres ld: can't link with a main executable file '/usr/local/Cellar/postgresql/13.4/bin/postgres' for architecture arm64
Is there any workaround for this issue? Or could we update pghashlib to work on arm64 architecture?
This now fails to build against PostgreSQL 9.5, because a conflicting definition of uint128
has been added:
src/city.c:58:29: error: conflicting types for 'uint128'
typedef struct city_uint128 uint128;
^
In file included from .../include/server/postgres.h:47:0,
from src/pghashlib.h:4,
from src/city.c:48:
.../include/server/c.h:345:33: note: previous declaration of 'uint128' was here
typedef unsigned PG_INT128_TYPE uint128;
^
Maybe typedef struct city_uint128 uint128
should be removed and city_uint128
used explicitly throughout?
$ make
…
src/siphash.c:19:10: fatal error: 'endian.h' file not found
^
1 error generated.
make: *** [src/siphash.o] Error 1
$ make distclean
…
$ git reset --hard 9cb0040
$ make
And it works
Postgres version 10.1 generates an error when trying to create extension library
ERROR: incompatible library "/usr/local/pgsql/lib/hashlib.so": version mismatch DETAIL: Server is version 11, library is version 10.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.