Subject: ADT with Linux

From: [email-masked] (J.Plewe)
Date: Tue, 10 May 94 09:30:02 +0200

Hello!

This is a very technical question from a newcomer:

How do I have to compile user's data types with gcc under Linux?

I tried circle.c and got circle.o, but Postgres denies usage
with a ld-error. I did not give any option except -c to cc.

Thanks,

Joerg Plewe, Max-Planck-Institut Dortmund, Germany

===============================================================================
    To add/remove yourself from the POSTGRES mailing list: send mail with 
    the subject line ADD or DEL to "[email-masked]"

    If this fails, send mail to "[email-masked]" and
    a human will deal with it.  DO NOT post to the "postgres" mailing list.
===============================================================================

---

From: [email-masked] (Kai Petzke)
Date: Tue, 10 May 1994 14:10:00 +0200 (MET DST)

> How do I have to compile user's data types with gcc under Linux?

In general you cannot do much wrong.  Use:

	cc -c <your-program>

If loading of that program fails later, very likely, it has one of
the following reasons:

1) User "postgres" has no access to your object file.  Note, that
   the postgres backend does a "cd" into the database directory,
   so that it needs the full pathname to access your files.  Any
   intervening directories must be executable.

2) You "strip"ped the postgres backend.  In that case, it will
   not be able to link in the new file.

3) You reference functions, which are neither defined in the
   backend nor in the standard C and math library.

In general, when you do a report about a bug or problem, it is
very important, that you include exact information about what you
did, and what the (wrong) result was.  Under Linux, you can use
the program "script" for this purpose.  For example, type:

	script
	cc -I ~postgres/include -c <your-program>
	monitor
	load <your-program-object-file>
	exit

And then include the output, which was saved in "scriptfile".
Don't forget to state important version numbers as well.  This
makes helping *much* easier!

Kai