Обсуждение: Re: [GENERAL] pgxs problem...

Поиск
Список
Период
Сортировка

Re: [GENERAL] pgxs problem...

От
Tom Lane
Дата:
John R Pierce <pierce@hogranch.com> writes:
> Further, it appears the link command pljava is using for the AIX case is
> given in its makefile as...

>          $(COMPILER) $(LDFLAGS_NO_L) $(LDFLAGS_SL) -o $(plugin) $<
> -Wl,-bE:$(NAME)$(EXPSUFF) $(SHLIB_LINK)

> I can't find anywhere LDFLAGS_NO_L is defined.   however, SHLIB_LINK is
> defined to concatenate PLJAVA_LDFLAGS, so I set that to -lm and POOF,
> its built.   scary!

Well, the reason I mentioned contrib/cube is that it's known to need
libm.  I see in its makefile

SHLIB_LINK += $(filter -lm, $(LIBS))

so apparently that's the de rigueur way to add libm when you need it.
I'd suggest pestering the pljava people to do likewise.  They might be
getting away without this on more-forgiving platforms, but that doesn't
make it good practice to omit.


So if I've not lost track, the scorecard is:

1. We need to install mkldexport.sh when on AIX, so that pgxs builds can
use it.

2. Makefile.aix has the wrong idea about where to find postgres.imp when
in pgxs mode.

3. pljava needs -lm and isn't explicitly asking for it.

I will see about fixing the first two, but the third is on pljava to
fix.

(These aren't new bugs BTW --- it looks to me like this has been wrong
since the pgxs code was created, in 8.1.  I guess we don't have many
AIX users :-()

            regards, tom lane


Re: [GENERAL] pgxs problem...

От
Tom Lane
Дата:
I wrote:
> So if I've not lost track, the scorecard is:

> 1. We need to install mkldexport.sh when on AIX, so that pgxs builds can
> use it.

> 2. Makefile.aix has the wrong idea about where to find postgres.imp when
> in pgxs mode.

> 3. pljava needs -lm and isn't explicitly asking for it.

> I will see about fixing the first two, but the third is on pljava to
> fix.

I've committed a patch for the first two things:
http://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=bd0ef304f8a306522983f3b4b06274fdc45beed8
... but not having an AIX machine, I can't actually test it.  Would
you verify it works?

            regards, tom lane