If you skip the static library builds, then it doesn't matter one way or
the other because the makefile will add the -fpic even if you don't...
so it's more of a question of personal preference on your part.
(It doesn't matter to me)
Skipping the static library builds will speed the compilation of amber
(well, not by very much), and I, further, can't imagine how you'd be
able to make use of the static libraries (considering that the rest of
your code is built with -fPIC) even if you DID make them, so I'm not
seeing a real downside by eliminating them.
Sure. I'll send it to the list, but if anyone reads it, then let me add
a disclaimer: I use the terms "make use", "use", and "using" very
loosely so I can get the general idea across while not drowning in a
technical argument about proper verbiage.
On 10/21/2015 12:07 PM, Ross Walker wrote:
> Thanks Tim. This is very useful info. So should we modify Amber configure to not pass fpic going forward?
> Also can you send your message to the developers list? I think others would be interested to read this.
> -------- Original message --------From: Timothy J Giese <timothyjgiese.gmail.com> Date: 10/21/2015 08:28 (GMT-08:00) To: Ross Walker <ross.rosswalker.co.uk> Subject: Re: [AMBER-Developers] Problems with AmberTools 15 and netcdf-fortran-4.2
> compile
> Just a side note:
>
> The problem here, ultimately, stems from having passed -fPIC as a
> cflag/fcflag to netcdf's configure.
> The makefile wants to use "-fPIC" for the shared library (.so) and
> "nothing" for the archive (.a), but you force it to use -fPIC for both.
>
> By convention (ie, gnu autoconf/automake defaults), library archives are
> position dependent code (pdc) and shared object files are position
> independent code (pic).
> pic libraries cannot make use of pdc libraries (although pdc libraries
> can make use of pic libraries).
> Having said that, there is no guarantee whether a library archive
> contains pic of pdc code, so one usually just presumes it contains pdc,
> as per social norm.
>
> If netcdf is pic-compiled, then all required libraries must also be pic.
>
> Your error message was telling you that libgfortran.a contained pdc
> code, so it couldn't use it in the pic compilation (it was effectively
> asking you for libgfortran.so)
>
> I believe that most distributions make some of the low-level library
> archives as pic (against the norm), simply so they don't receive 1000
> emails each year from users with compilation errors. (because pic
> libraries can still be used in pdc compilations)
> Therefore, you must be working with something where someone actually
> compiled gfortran from source using the standard/expected convention.
>
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Wed Oct 21 2015 - 11:30:03 PDT