-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trouble Creating Extension on M1 Mac #24
Comments
What process are you using to install? |
Hi, I used a bash script based on the example script in the README. My machine doesn't have sha256sum installed, so I added the line below to the script: Here's the full script just in case. #! /bin/bash
cd "$(mktemp -d)"
curl -LO "https://github.com/fboulnois/pg_uuidv7/releases/download/v1.4.1/{pg_uuidv7.tar.gz,SHA256SUMS}"
tar xf pg_uuidv7.tar.gz
function sha256sum() { openssl sha256 "$@" | awk '{print $2}'; }
sha256sum -c SHA256SUMS
PG_MAJOR=$(pg_config --version | sed 's/^.* \([0-9]\{1,\}\).*$/\1/')
cp "$PG_MAJOR/pg_uuidv7.so" "$(pg_config --pkglibdir)"
cp pg_uuidv7--1.4.sql pg_uuidv7.control "$(pg_config --sharedir)/extension"
# the CREATE EXTENSION command will be run in a (Rails) migration with `enable_extension` Thanks. |
Similar error here on M3, but not sure if that's the root cause.
even though the file exists:
I'm using pg_uuidv7 at version 1.0.0. |
@matthiasbayer I hope we find a neat solution, cos I think it's a nice implementation. Oh, being relatively new to all this, I found out today that we can define a function in the database and use that as the default value for a column. Here's a cool one for UUIDv7 generation: |
I was able to solve this by building the extension from source using the Makefile. |
@matthiasbayer oh wow! That's great news. Is this something I can do in a script too? I'd like to make our application fairly straightforward. |
Yes, to clarify the issue, the releases are built for x86_64 and not for ARM (like the M1, M2, and M3 Macs), hence the error with loading the library if you download the release directly from GitHub. The correct solution for other architectures is indeed to build the extension from source. You'll want to follow the local build process outlined in the README.md:
I'll add a note in the docs about installing on other architectures. |
Thank you so much @fboulnois Thank you for the help. I'll let you know how it goes. |
I added a note in #25 , hopefully that should help future developers. |
I'm new to docker & found the process to download and build the
|
Thank you so much for sharing. It doesn't seem like the most elegant solution, but it works my situation right now. |
@Samuelodan It's always most important to get something working and iterate on that solution. It looks like UUIDv7 feature is targeted at PostgreSQL 17: |
Thanks @conradwt |
Thread summary w/ a solutionI got this working today. I'll summarize the info in this thread.
|
Hi there,
I'm trying to install this extension on my Apple Silicon Mac, but I get this error on the CREATE EXTENSION step:
I'd appreciate it if I got some help on the install.
Thanks.
The text was updated successfully, but these errors were encountered: