| Author |
Message |
Cornelia Boenigk *nix forums beginner
Joined: 19 Jul 2006
Posts: 4
|
Posted: Wed Jul 19, 2006 9:30 pm Post subject:
Re: Problem creating a function - solved
|
|
|
Hi Tom, Joe
After compiling the C-source files
# gcc -fpic -c bitvg.c
# gcc -shared -o bitvg.so bitvg.o
the pg_restore created the function.
It is Suse 9.x and PG 8.1.4
Thanks
Conni
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster |
|
| Back to top |
|
 |
Tom Lane *nix forums Guru
Joined: 24 Mar 2005
Posts: 2070
|
Posted: Wed Jul 19, 2006 9:14 pm Post subject:
Re: Problem creating a function
|
|
|
Joe Conway <mail@joeconway.com> writes:
| Quote: | Could it be an SELinux issue?
|
I'd really expect the strerror result to be something about 'permission
denied' rather than 'file not found', if that were the problem...
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org |
|
| Back to top |
|
 |
Joe Conway *nix forums beginner
Joined: 10 Mar 2005
Posts: 32
|
Posted: Wed Jul 19, 2006 8:22 pm Post subject:
Re: Problem creating a function
|
|
|
Cornelia Boenigk wrote:
| Quote: | Hi Joe
Try:
su postgres
cd /home/database/pgdata/cobis/bitvg
Succeeds, ls -la shows all files in that directory and can open them
with less.
|
Kind of odd, particularly given your reply to Tom's question in a nearby
post. Could it be an SELinux issue?
Joe
---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql.org so that your
message can get through to the mailing list cleanly |
|
| Back to top |
|
 |
Cornelia Boenigk *nix forums beginner
Joined: 19 Jul 2006
Posts: 4
|
Posted: Wed Jul 19, 2006 7:16 pm Post subject:
Re: Problem creating a function
|
|
|
Hi Tom
| Quote: | You should try "ldd" or local equivalent on bitvg.so to check
whether all its dependencies can be found.
|
output:
ldd /home/database/pgdata/cobis/bitvg/bitvg.so
statically linked
Regards
Conni
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match |
|
| Back to top |
|
 |
Tom Lane *nix forums Guru
Joined: 24 Mar 2005
Posts: 2070
|
Posted: Wed Jul 19, 2006 5:40 pm Post subject:
Re: Problem creating a function
|
|
|
Cornelia Boenigk <c@cornelia-boenigk.de> writes:
| Quote: | in english: /home/database/pgdata/cobis/bitvg/bitvg.so: cannot open
shared object: file not found
The file does exist in the path /home/database/pgdata/cobis/bitvg/:
|
The "file not found" might be coming from the dynamic loader trying to
load some other library that bitvg.so depends upon. You should try "ldd"
or local equivalent on bitvg.so to check whether all its dependencies
can be found. Also, try looking in the postmaster log --- on some
platforms, dynamic loader failures spit additional information to stderr
that can't be reported to you by the backend, but will be captured in
the postmaster log file.
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster |
|
| Back to top |
|
 |
Cornelia Boenigk *nix forums beginner
Joined: 19 Jul 2006
Posts: 4
|
Posted: Wed Jul 19, 2006 5:34 pm Post subject:
Re: Problem creating a function
|
|
|
Hi Joe
| Quote: | Try:
su postgres
cd /home/database/pgdata/cobis/bitvg
|
Succeeds, ls -la shows all files in that directory and can open them
with less.
Regards
Conni
---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?
http://archives.postgresql.org |
|
| Back to top |
|
 |
Joe Conway *nix forums beginner
Joined: 10 Mar 2005
Posts: 32
|
Posted: Wed Jul 19, 2006 5:08 pm Post subject:
Re: Problem creating a function
|
|
|
Cornelia Boenigk wrote:
| Quote: | The file does exist in the path /home/database/pgdata/cobis/bitvg/:
-rwxr-xr-x 1 root root 133 Jul 19 13:13 bitvg.c
-rwxr-xr-x 1 root root 782 Jul 19 13:13 bitvg.o
-rwxr-xr-x 1 root root 3198 Jul 19 13:13 bitvg.so
What do I miss?
|
Does the postgres user have access to /home/database/pgdata/cobis/bitvg?
Try:
su postgres
cd /home/database/pgdata/cobis/bitvg
Joe
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match |
|
| Back to top |
|
 |
Cornelia Boenigk *nix forums beginner
Joined: 19 Jul 2006
Posts: 4
|
Posted: Wed Jul 19, 2006 4:31 pm Post subject:
Problem creating a function
|
|
|
Hi all
Trying to create a function I get the following:
codex=# CREATE FUNCTION "bitvg" (integer,integer) RETURNS integer AS
'/home/database/pgdata/cobis/bitvg/bitvg.so', 'bitvg' LANGUAGE 'C';
ERROR: could not load library
"/home/database/pgdata/cobis/bitvg/bitvg.so":
/home/database/pgdata/cobis/bitvg/bitvg.so: Kann die
Shared-Object-Datei nicht öffnen: Datei oder Verzeichnis nicht gefunden
in english: /home/database/pgdata/cobis/bitvg/bitvg.so: cannot open
shared object: file not found
The file does exist in the path /home/database/pgdata/cobis/bitvg/:
-rwxr-xr-x 1 root root 133 Jul 19 13:13 bitvg.c
-rwxr-xr-x 1 root root 782 Jul 19 13:13 bitvg.o
-rwxr-xr-x 1 root root 3198 Jul 19 13:13 bitvg.so
What do I miss?
Thank's in advance
Conni
--
http://pgsql.info | http://postgresql.de | http://pgfakt.de
Telefon: 07127 80 961
---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
choose an index scan if your joining column's datatypes do not
match |
|
| Back to top |
|
 |
Google
|
|
| Back to top |
|
 |
|