Re: RPMs and symlinks (was Re: [NOVICE] C++ library probs)

Lists: Postg윈 토토SQL :pgsql-novice
From: Leandro Fanzone <leandro(at)hasar(dot)com>
To: pgsql-novice(at)postgresql(dot)org
Subject: C++ library probs
Date: 2000-09-05 14:41:23
Message-ID: 39B50613.2901BBFD@hasar.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-novice

I have installed the libraries from RPM
(postgresql-devel-7.0.2-2.i386.rpm). I couldn't compile a project using
the C++ library because in some config.h there's a line saying

#include "os.h"

that points to a link to a non-existent linux.h. Any ideas? I just
commented the line and worked fine so far, but I don't like it a bit.

Leandro Fanzone
Compañía HASAR
Buenos Aires
Argentina


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Leandro Fanzone <leandro(at)hasar(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: RPMs and symlinks (was Re: [NOVICE] C++ library probs)
Date: 2000-09-05 15:40:41
Message-ID: 1295.968168441@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-novice

Leandro Fanzone <leandro(at)hasar(dot)com> writes:
> --------------158FC9AA6F4DB960E871948D
> I have installed the libraries from RPM
> (postgresql-devel-7.0.2-2.i386.rpm). I couldn't compile a project using
> the C++ library because in some config.h there's a line saying
> #include "os.h"
> that points to a link to a non-existent linux.h. Any ideas? I just
> commented the line and worked fine so far, but I don't like it a bit.

Hmm. Are you speaking of installed headers (stored in something like
/usr/local/include/pgsql/) or are you looking at a full Postgres
source-code tree?

In the source tree, os.h is a symlink made during the configure process,
but in the installed tree it ought to be a copy of the linked-to file.
At least that's how it's always worked for me.

I wonder whether this RPM was made with an "install" script that tries
to copy symlinks as symlinks rather than copying the underlying file.
If so, we need to change the install process to prevent that from
happening.

Lamar, Peter, any thoughts here?

regards, tom lane


From: Leandro Fanzone <leandro(at)hasar(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: RPMs and symlinks (was Re: [NOVICE] C++ library probs)
Date: 2000-09-05 15:47:48
Message-ID: 39B515A4.B22D2F2B@hasar.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: Postg윈 토토SQL : pgsql-novice

Tom Lane wrote:

> Hmm. Are you speaking of installed headers (stored in something like
> /usr/local/include/pgsql/) or are you looking at a full Postgres
> source-code tree?

Installed headers on /usr/include/pgsql. Didn't installed the source. The
link actually points to .././include/port/linux.h which doesn't exist. On the
other hand I have some "port" directory /usr/include/pgsql (it's not the
directory where the link is pointing, needless to say) but has no linux.h
inside, anyway.

Leandro Fanzone
Compañía HASAR
Buenos Aires
Argentina


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Leandro Fanzone <leandro(at)hasar(dot)com>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: RPMs and symlinks (was Re: [NOVICE] C++ library probs)
Date: 2000-09-05 15:52:36
Message-ID: 1384.968169156@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers pgsql-novice

Leandro Fanzone <leandro(at)hasar(dot)com> writes:
> Installed headers on /usr/include/pgsql. Didn't installed the source. The
> link actually points to .././include/port/linux.h which doesn't exist.

I figured as much --- that's what the symlink should look like, in the
source tree, but it ought not get installed that way. Looks like we
have a bug in the RPM build process. (Fairly recent bug too, I bet,
or it would've been noticed before.)

I've attached a copy of 7.0.2's port/linux.h, which you can use to
replace the os.h symlink so you can get some work done meanwhile.

regards, tom lane

/* __USE_POSIX, __USE_BSD, and __USE_BSD_SIGNAL used to be defined either
here or with -D compile options, but __ macros should be set and used by C
library macros, not Postgres code. __USE_POSIX is set by features.h,
__USE_BSD is set by bsd/signal.h, and __USE_BSD_SIGNAL appears not to
be used.
*/
#define JMP_BUF
#define USE_POSIX_TIME

#if defined(__i386__)
typedef unsigned char slock_t;

#define HAS_TEST_AND_SET

#elif defined(__sparc__)
typedef unsigned char slock_t;

#define HAS_TEST_AND_SET

#elif defined(__powerpc__)
typedef unsigned int slock_t;

#define HAS_TEST_AND_SET

#elif defined(__alpha__)
typedef long int slock_t;

#define HAS_TEST_AND_SET

#elif defined(__mips__)
typedef unsigned int slock_t;

#define HAS_TEST_AND_SET

#elif defined(__arm__)
typedef unsigned char slock_t

#define HAS_TEST_AND_SET

#endif

#if defined(__GLIBC__) && (__GLIBC__ >= 2)
#ifdef HAVE_INT_TIMEZONE
#undef HAVE_INT_TIMEZONE
#endif
#endif

#if defined(__powerpc__)
#undef HAVE_INT_TIMEZONE
#endif