Skip to content

Error while using CREATE EXTENSION command #28

@IshaanAdarsh

Description

@IshaanAdarsh

Running into the error while creating a C-based Postgres Extension

Code for the Extension is present in my Github repo

make command output:

gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -Wno-deprecated-non-prototype -O2  -I. -I./ -I/Users/spartacus/.pgenv/pgsql-15.0/include/server -I/Users/spartacus/.pgenv/pgsql-15.0/include/internal  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk    -c -o pg_cext.o pg_cext.c
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -Wno-deprecated-non-prototype -O2  pg_cext.o -L/Users/spartacus/.pgenv/pgsql-15.0/lib -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX13.3.sdk   -Wl,-dead_strip_dylibs   -bundle -bundle_loader /Users/spartacus/.pgenv/pgsql-15.0/bin/postgres -o pg_cext.so

make install command output:

/opt/homebrew/bin/gmkdir -p '/Users/spartacus/.pgenv/pgsql-15.0/share/extension'
/opt/homebrew/bin/gmkdir -p '/Users/spartacus/.pgenv/pgsql-15.0/share/extension'
/opt/homebrew/bin/gmkdir -p '/Users/spartacus/.pgenv/pgsql-15.0/lib'
/opt/homebrew/bin/ginstall -c -m 644 .//pg_cext.control '/Users/spartacus/.pgenv/pgsql-15.0/share/extension/'
/opt/homebrew/bin/ginstall -c -m 644 .//pg_cext--1.0.0.sql  '/Users/spartacus/.pgenv/pgsql-15.0/share/extension/'
/opt/homebrew/bin/ginstall -c -m 755  pg_cext.so '/Users/spartacus/.pgenv/pgsql-15.0/lib/'

But for some reason while i am executing the CREATE EXTENSIONcommand, it is giving the error:

spartacus=# CREATE EXTENSION pg_cext;
ERROR:  could not load library "/Users/spartacus/Desktop/GSoC/CODE/pg_cext": dlopen(/Users/spartacus/Desktop/GSoC/CODE/pg_cext, 0x000A): tried: '/Users/spartacus/Desktop/GSoC/CODE/pg_cext' (not a file), '/System/Volumes/Preboot/Cryptexes/OS/Users/spartacus/Desktop/GSoC/CODE/pg_cext' (no such file), '/Users/spartacus/Desktop/GSoC/CODE/pg_cext' (not a file)

But the extension files are present at this given location.
enter image description here
How do I tackle this issue?

Metadata

Metadata

Assignees

Labels

help wantedExtra attention is neededquestionFurther information is requested

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions