From: Gene Selkov, Jr. <selkovjr@mcs.anl.gov>
To: Matthew Hagerty <matthew@venux.net>
To: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] Compiling a function
Date: Tue, 20 Apr 1999 08:58:17 -0400
Message-ID: <199904201358.IAA27205@antares.mcs.anl.gov> (raw)
In-Reply-To: <4.1.19990420041438.00bea910@mail.venux.net>
> ERROR: Can't find function bool2int in file /usr/local/pgsql/procs/bool2int.o
>
That's probably because you are still looking in the object file. If
you did not tweak the filenames, the linker should create a shared
object file with the .so suffix, and it's likely that it did. Use
'file' to find out, like this (real example):
file /home/wit/pgsql/ExtendedTypes/seg/seg.o
/home/wit/pgsql/ExtendedTypes/seg/seg.o: ELF 32-bit LSB relocatable, Intel 80386, version 1, not stripped
file /home/wit/pgsql/ExtendedTypes/seg/seg.so
/home/wit/pgsql/ExtendedTypes/seg/seg.so: ELF 32-bit LSB shared object, Intel 80386, version 1, not stripped
> I have tried every linker flag possible, nothing helps. Seems funny that a
> function cannot be located in a library file?!?!
Object files and shared libraries have different symbol tables, let
alone the code.
I remember building things painlessly in FreeBSD, but that was a
couple years back, so I am not sure now. In any event, I would start
with tutorial examples because these are almost guaranteed to
work. Also, here's a complete code for a user-defined function -- you
will only need to adjust the paths in the Makefile and in the sql
script:
http://wit.mcs.anl.gov/~selkovjr/foldit.tgz
--Gene
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-interfaces@postgresql.org
Cc: selkovjr@mcs.anl.gov, matthew@venux.net
Subject: Re: [INTERFACES] Compiling a function
In-Reply-To: <199904201358.IAA27205@antares.mcs.anl.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox