Обсуждение: [pgsql-pkg-yum] RPMs for ppc64/ppc64le

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

[pgsql-pkg-yum] RPMs for ppc64/ppc64le

От
Bernd Helmle
Дата:
Folks

POWER support is finally there, that's great and thanks for all the
guys involved to make that happen!

However, i found the way how the SPEC file define the build parameters
for POWER not very usable at the moment. Currently, we build per
default with the IBM Advanced Toolchain (AT) if ppc64 and ppc64le
architecture is defined and use those definitions in all SPEC files.
I've got complaints from some people building from upstream source
packages on their ppc64/ppc64le infrastructure, that the current
behavior is suboptimal if you don't want to rely on IBM AT (not
everyone is convinced that it is better to build with higher
optimization levels) or even power8 CPU instructions. E.g. there are
still users out there running PostgreSQL on dozens of POWER7 machines
and the current behavior of the SPEC files breaks their build
environments. The latter makes it currently hard on those older POWER
CPUs to build packages based on current upstream source rpms, cause
they install but can't be executed without patching all the SPEC files.

There are several solutions to this situation which come to my mind
which i want to discuss. Maybe there are some others, better ones, but
let's start with this:

The current behavior forces you to use the IBM Advanced Toolchain, so
what i would like to see is to turn that feature easily off. We could
make the procedure to choose the IBM AT conditional with the default to
on , like i've done in the attached patch. Though this requires to
specialize all SPEC files currently supported on ppc64/ppc64le. It
basically moves all tests for ppc64/ppc64le into a single conditional
and summarizes them with a new macro %ibmpower. That's used afterwards
for checking if IBM AT or special flags are required. This allows
rpmbuild to deselect the default IBM AT based build with --define
"ibmpower 0", enabling the default compiler to be used.

Another solution that come to my mind: use a single centralized rpmrc
passed to rpmbuild (via --rcfile) during the build process. This file
defines all necessary macros to build the packages like now, but in a
single place. This would make it better maintainable in the future,
say, when POWER9 comes along and would allow to easily override default
settings with custom ones. We could make that a special setting to make
(e.g RPMRC=<yourfile> make rpm96), but i haven't dug too deep into that
approach yet.

I'm willing to work on that, if we agree that we want to improve in
that area.

Opinions?

Thanks,
    Bernd

Вложения

Re: [pgsql-pkg-yum] RPMs for ppc64/ppc64le

От
Devrim Gündüz
Дата:
Hi Bernd,

Apologies for the *very* late response.

I am really interested in this, but we need to find a solution which we can
apply to all of the packages that include Power support.

Are you coming to PGConf.EU? If so, we can discuss this there.

Regards, Devrim

On Mon, 2017-09-04 at 18:00 +0200, Bernd Helmle wrote:
> Folks
>
> POWER support is finally there, that's great and thanks for all the
> guys involved to make that happen!
>
> However, i found the way how the SPEC file define the build parameters
> for POWER not very usable at the moment. Currently, we build per
> default with the IBM Advanced Toolchain (AT) if ppc64 and ppc64le
> architecture is defined and use those definitions in all SPEC files.
> I've got complaints from some people building from upstream source
> packages on their ppc64/ppc64le infrastructure, that the current
> behavior is suboptimal if you don't want to rely on IBM AT (not
> everyone is convinced that it is better to build with higher
> optimization levels) or even power8 CPU instructions. E.g. there are
> still users out there running PostgreSQL on dozens of POWER7 machines
> and the current behavior of the SPEC files breaks their build
> environments. The latter makes it currently hard on those older POWER
> CPUs to build packages based on current upstream source rpms, cause
> they install but can't be executed without patching all the SPEC files.
>
> There are several solutions to this situation which come to my mind
> which i want to discuss. Maybe there are some others, better ones, but
> let's start with this:
>
> The current behavior forces you to use the IBM Advanced Toolchain, so
> what i would like to see is to turn that feature easily off. We could
> make the procedure to choose the IBM AT conditional with the default to
> on , like i've done in the attached patch. Though this requires to
> specialize all SPEC files currently supported on ppc64/ppc64le. It
> basically moves all tests for ppc64/ppc64le into a single conditional
> and summarizes them with a new macro %ibmpower. That's used afterwards
> for checking if IBM AT or special flags are required. This allows
> rpmbuild to deselect the default IBM AT based build with --define
> "ibmpower 0", enabling the default compiler to be used.
>
> Another solution that come to my mind: use a single centralized rpmrc
> passed to rpmbuild (via --rcfile) during the build process. This file
> defines all necessary macros to build the packages like now, but in a
> single place. This would make it better maintainable in the future,
> say, when POWER9 comes along and would allow to easily override default
> settings with custom ones. We could make that a special setting to make
> (e.g RPMRC=<yourfile> make rpm96), but i haven't dug too deep into that
> approach yet.
>
> I'm willing to work on that, if we agree that we want to improve in
> that area.
>
> Opinions?
>
> Thanks,
>     Bernd

--
Devrim Gündüz
EnterpriseDB: https://www.enterprisedb.com
PostgreSQL Consultant, Red Hat Certified Engineer
Twitter: @DevrimGunduz , @DevrimGunduzTR

Re: [pgsql-pkg-yum] RPMs for ppc64/ppc64le

От
Bernd Helmle
Дата:
Am Donnerstag, den 05.10.2017, 02:00 +0100 schrieb Devrim Gündüz:
> Apologies for the *very* late response.
> 
> I am really interested in this, but we need to find a solution which
> we can
> apply to all of the packages that include Power support.
> 
> Are you coming to PGConf.EU? If so, we can discuss this there.

Great, see you there then!
Bernd



-- 
Sent via pgsql-pkg-yum mailing list (pgsql-pkg-yum@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-pkg-yum