pg_sendmail function compile problem

Started by Josephabout 25 years ago4 messagesgeneral
Jump to latest
#1Joseph
lters@mrtc.com

I am trying to compile the pg_sendmail function from
ftp://ftp.trurl.anything3d.com/pub/Linux/our/pgsendmail-1.0.tar.gz and I get
the following error message.
I am using 7.1beta3-2 from rpm install.

Here is the error...

# make
/bin/sh ./libtool --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -I/usr/local/pgsql/include -I/usr
/include/pgsql -c mail.c
rm -f .libs/mail.lo
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -I/usr/local/pgsql/include -I/usr/inc
lude/pgsql -c -fPIC -DPIC mail.c -o .libs/mail.lo
In file included from mail.c:29:
/usr/include/pgsql/utils/elog.h:37: parse error before `CritSectionCount'
/usr/include/pgsql/utils/elog.h:37: warning: data definition has no type or
storage class
make: *** [mail.lo] Error 1

Do I need some other elog.h file?

Thanks for any suggestions. Keep up the good work.
I like postgresql and am always amazed at the steady stream of email! And am
looking forward to the 7.x series :-)
Joseph Showalter

#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: Joseph (#1)
Re: pg_sendmail function compile problem

"Joseph" <lters@mrtc.com> writes:

In file included from mail.c:29:
/usr/include/pgsql/utils/elog.h:37: parse error before `CritSectionCount'
/usr/include/pgsql/utils/elog.h:37: warning: data definition has no type or
storage class

At a guess, this code is neglecting to include postgres.h first. All
of the internal headers in PG assume that you included postgres.h
beforehand.

regards, tom lane

#3Joseph
lters@mrtc.com
In reply to: Joseph (#1)

I added an include line but now it gives me the following error...

make
/bin/sh ./libtool --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -I/usr/local/pgsql/include -I/usr
/include/pgsql -c mail.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -I/usr/local/pgsql/include -I/usr/inc
lude/pgsql -c -fPIC -DPIC mail.c -o .libs/mail.lo
In file included from /usr/include/pgsql/c.h:47,
from /usr/include/pgsql/postgres.h:40,
from mail.c:29:
/usr/include/pgsql/config.h:662: os.h: No such file or directory
make: *** [mail.lo] Error 1

The os.h file points to ../.././src/include/port/linux.h which does not
exist? :-(
I am showing my ignorance here I guess.

"Joseph" <lters@mrtc.com> writes:

In file included from mail.c:29:
/usr/include/pgsql/utils/elog.h:37: parse error before

`CritSectionCount'

/usr/include/pgsql/utils/elog.h:37: warning: data definition has no type

or

Show quoted text

storage class

At a guess, this code is neglecting to include postgres.h first. All
of the internal headers in PG assume that you included postgres.h
beforehand.

regards, tom lane

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Joseph (#3)
Re: pg_sendmail function compile problem

"Joseph" <lters@mrtc.com> writes:

I am using 7.1beta3-2 from rpm install.
I added an include line but now it gives me the following error...
make
/bin/sh ./libtool --mode=compile
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -I/usr/local/pgsql/include -I/usr
/include/pgsql -c mail.c
mkdir .libs
gcc -DHAVE_CONFIG_H -I. -I. -I. -g -O2 -I/usr/local/pgsql/include -I/usr/inc
lude/pgsql -c -fPIC -DPIC mail.c -o .libs/mail.lo
In file included from /usr/include/pgsql/c.h:47,
from /usr/include/pgsql/postgres.h:40,
from mail.c:29:
/usr/include/pgsql/config.h:662: os.h: No such file or directory
make: *** [mail.lo] Error 1

The os.h file points to ../.././src/include/port/linux.h which does not
exist? :-(

That's a known RPM packaging error, which I thought we'd fixed for 7.1.
I can confirm it's not fixed, however. Lamar, what's up with this?

Joseph, you can grab that file from the source distribution and replace
the os.h link with it, until we get our act together ...

regards, tom lane