Re: Build issue with Advance Toolchain

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Devrim Gündüz <devrim(at)gunduz(dot)org>
Cc: "psycopg(at)postgresql(dot)org" <psycopg(at)postgresql(dot)org>
Subject: Re: Build issue with Advance Toolchain
Date: 2017-05-26 16:23:03
Message-ID: CA+mi_8YTPPn_V4-Uz1ix=8UH16TYn=N7HtWoE+hwVUHDa0jq=Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: psycopg

On Fri, May 26, 2017 at 3:22 PM, Devrim Gündüz <devrim(at)gunduz(dot)org> wrote:

> FWIW, here is what I export in the spec file for all Power packages (atpath: /opt/at10.0)
>
> CFLAGS="${CFLAGS} $(echo %{__global_cflags} | sed 's/-O2/-O3/g') -m64 -mcpu=power8 -mtune=power8 -I%{atpath}/include"
> CXXFLAGS="${CXXFLAGS} $(echo %{__global_cflags} | sed 's/-O2/-O3/g') -m64 -mcpu=power8 -mtune=power8 -I%{atpath}/include"
> LDFLAGS="-L%{atpath}/%{_lib}"
> CC=%{atpath}/bin/gcc; export CC

So it looks these settings affect the compile phase but not the built
phase, right? In particular CC...

Could it be a problem with either setuptools or distutils? At the top
of setup.py there is a stanza like:

try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup, Extension

Could you try forcing one of the two, and see if it a bug in one of
these build tool?

Also see some answers here, I think they point towards some sort of
solution: <https://stackoverflow.com/questions/5967065/python-distutils-not-using-correct-version-of-gcc>.
Looking at that it seems "compiler_so" gets chosen wrongly. You could
take a look at 'distutils/ccompiler.py' adding some prints and some
breakpoints to see what it ends up being. Also notice that 'python
setup.py build takes a --compiler parameter: I don't know if it can be
used (but I think it only accepts a subset of what you can override
using $CC)

I'm afraid I'm a bit shotgunning a solution: I'm not extremely
experienced with these tools either...

-- Daniele

In response to

Browse psycopg by date

  From Date Subject
Next Message Adrian Klaver 2017-05-26 16:39:56 Re: Build issue with Advance Toolchain
Previous Message Adrian Klaver 2017-05-26 14:30:39 Re: Build issue with Advance Toolchain