Re: [AMBER-Developers] AmberTools15 + gcc-4.8.4

From: Gerald Monard <Gerald.Monard.univ-lorraine.fr>
Date: Sun, 31 May 2015 09:45:18 +0200

On 05/31/2015 04:18 AM, Jason Swails wrote:
> On Sat, May 30, 2015 at 2:19 PM, Gerald Monard <
> Gerald.Monard.univ-lorraine.fr> wrote:
>
>> As a follow-up and after some internet digging:
>> I have:
>> $ cat /etc/redhat-release
>> CentOS Linux release 7.1.1503 (Core)
>> $ gcc --version
>> gcc (GCC) 4.8.4
>> $ python
>> Python 2.7.5 (default, Jun 17 2014, 18:11:42)
>> [GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux2
>>
>> But it seems that the gcc -fstack-protector-strong option has been
>> available only since gcc-4.9!
>> I guess that it is a CentOS or RHEL7.1 related problem, but I'm not sure
>> how to fix it.
>>
>
> ​This is indeed strange. What Python does when it builds extensions is to
> use the same compiler flags that were used to build Python itself.
>
> You should be able to override this with the CFLAGS environment variable.
> Or perhaps that is set on your system for some reason?​ It's really rather
> perplexing that the system Python for Red Hat would fail to build
> extensions with the standard compiler released with it. That would
> represent a significant flaw in their product.
>
> ​And the Python signature suggests that it was built with GCC 4.8.2-16, so
> something must be going on in your system's environment that I can't
> discern from the available information.
>

I found and fix the problem:
$ which -a gcc
/cm/shared/apps/gcc/4.8.4/bin/gcc
/usr/bin/gcc
$ /cm/shared/apps/gcc/4.8.4/bin/gcc --version
gcc (GCC) 4.8.4
$ /usr/bin/gcc --version
gcc (GCC) 4.8.3 20140911 (Red Hat 4.8.3-9)
$ which -a python
/usr/bin/python
$ python
Python 2.7.5 (default, Jun 17 2014, 18:11:42)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-16)] on linux2
$ module rm gcc/4.8.4
$ which -a gcc
/usr/bin/gcc

If I compile Amber(Tools) using /usr/bin/gcc, it works.

The problem is that there is not much of an automatic solution for that
(i.e., to include in the configure script): python was build with a Red
Hat version of gcc (gcc-4.8.2) that contains extensions that are in the
Red Hat gcc-4.8.3 version that is bundled with CentOS 7.1
(/usr/bin/gcc), but not in the 4.8.4 GNU release. Would there be a way
in the configure script to make sure that the gcc that is used is the
gcc that was used to build python?

Gerald.



-- 
____________________________________________________________________________
  Prof. Gerald MONARD
  SRSMC, Université de Lorraine, CNRS
  Boulevard des Aiguillettes B.P. 70239
  F-54506 Vandoeuvre-les-Nancy, FRANCE
  e-mail : Gerald.Monard.univ-lorraine.fr
  tel.   : +33 (0)383.684.381
  fax    : +33 (0)383.684.371
  web    : http://www.monard.info
____________________________________________________________________________
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Sun May 31 2015 - 01:00:02 PDT
Custom Search