Re: [AMBER] AmberTools 1.5 build fails due to undefined symbols in libnetcdf.a

From: Daniel Roe <daniel.r.roe.gmail.com>
Date: Thu, 3 Nov 2011 10:43:55 -0400

Hi,

I've been troubleshooting your issue over the past few days, and I
have not been able to reproduce your error. Here is the exact
procedure I followed:

1) Extract AmberTools 1.5
2) Set AMBERHOME
3) Apply all AmberTools 1.5 bugfixes (1-21) using patch -p0 -N < bugfix.all
4) Extract Amber11 into the same directory
5) Apply all Amber11 patches (1-16 and 17) using apply_bugfix.x script
from http://ambermd.org/bugfixes11.html and bugfix.1to17.tar.bz2
6) ./configure gnu ; make serial in $AMBERHOME/AmberTools/src/

Compilation proceeds with no issues. From this point if I run
$AMBERHOME/AT15_Amber11.py and make serial in $AMBERHOME/src to
compile Amber11 that succeeds as well. I'm attaching a log of the
exact commands I ran for steps 1-6 as well as the associated compile
log.

It is not clear why compilation failed for you. Maybe the problem is
in how patches were applied. Did you apply the exact same patches
using the exact same procedure that I did?

-Dan

On Thu, Nov 3, 2011 at 9:59 AM, Jan-Philip Gehrcke
<jgehrcke.googlemail.com> wrote:
> Huhu,
>
> there are questions left:
>
> - was it "expected" that AmberTools/netcdf build failed with Amber
> already being in the same directory tree?
>
> - if it was expected: is that documented somewhere or should some
> installation manual be updated?
>
> - if it was not expected: why did it fail for me / should I further
> investigate?
>
> Thanks,
>
> Jan-Philip
>
>
> On 11/02/2011 11:48 AM, Jan-Philip Gehrcke wrote:
>> Thanks for your answer, Dan. It looks like extracting Amber11 and
>> AmberTools 1.5 into the same directory tree before building AmberTools
>> triggered the problem. Detailed comments below.
>>
>> On 11/02/2011 03:41 AM, Daniel Roe wrote:
>>> Hi,
>>>
>>> Just a quick question; were you configuring/building AmberTools from a
>>> clean directory? If not, did you do a 'make clean' before 'make
>>> install'?
>>
>> I was "playing around" a lot, but always invoked `make clean` before
>> `make serial` (which is the suggested make command by the configure
>> script).
>>
>> In fact -- and this paragraph is a totally different topic now --
>> inbetween I ran into some trouble with a "wrong"
>> AmberTools/src/sff/lex.mm_options.c file as described here:
>> http://archive.ambermd.org/201110/0165.html. That happened after the
>> first successful build of netcdf and I am pretty sure that I cleaned
>> before. Renaming the file solved the problem.
>>
>> The wrong libnetcdf build definitely had something to do with the
>> extraction of AmberTools 1.5 and Amber 11 in the same directory tree
>> *before* building AmberTools. I just did a fresh AmberTools directory:
>>
>> 1) extract AmberTools
>> 2) set AMBERHOME
>> 3) bugfix.all
>> 4) configure gnu
>> 5) make serial
>>
>> This builds libnetcdf correctly.
>>
>> During this build using GNU compilers, I experienced the safemem.f issue
>> described here: http://archive.ambermd.org/201110/0418.html. To answer
>> Jason's question in this mail: In my opinion this is worth a bugfix.
>> Including that fix, AmberTools 1.5 was built properly.
>>
>>
>>
>>> It seems that (as you say) the library is not being generated
>>> correctly on your system. I've been able to successfully build the
>>> netcdf version that comes with AmberTools using both gnu 4.6 and intel
>>> 12 compilers. It may be that the issue has to do with the tools used
>>> to generate the library itself. What versions of 'ar' and 'ranlib' do
>>> you have?
>>
>> Although this shouldn't matter anymore now:
>> GNU ar (GNU Binutils for Ubuntu) 2.20.1-system.20100303
>> GNU ranlib (GNU Binutils for Ubuntu) 2.20.1-system.20100303
>>
>>
>>> Other than that, would you mind sending me the
>>> $AMBERHOME/AmberTools/src/netcdf_config.log that is generated after
>>> you run './configure' on your system with the original AmberTools
>>> netcdf (i.e. not the one you downloaded and installed manually).
>>> Thanks!
>>
>> To get this configuration log for the build of libnetcdf that does *not*
>> work, I've used the "old" sources of libnetcdf again, `make clean`ed,
>> `./configure gnu`ed and `make serial`ed in $AMBERHOME/AmberTools/src,
>> while $AMBERHOME was the directory tree containing both AmberTools 1.5
>> and Amber 11 (both bugfixed). `make serial` failed again due to an
>> invalid libnetcdf.a.
>>
>> You find the corresponding failed_netcdf_makelog and
>> failed_netcdf_config.log attached to this mail. I had checked the
>> configure log before and it looked good to me.
>>
>> It looks like I've done things in the "wrong" order, although I was
>> reading (not understanding?) the PDF manuals while setting things up.
>> What is the canonical way of building AmberTools and Amber 11? I have
>> the feeling that the PDF manual did not tell me that I must not extract
>> Amber11 into the AMBERHOME directory tree before building AmberTools.
>>
>> I did it this way:
>>
>> 1) extract AT1.5
>> 2) set AMBERHOME
>> 3) bugfixes to AT1.5
>> 4) extract Amber11 to same directory tree
>> 5) applied bugfixes to Amber11
>> 6) configure/make in $AMBERHOME/AmberTools/src
>>
>> In step 6, libnetcdf build failed.
>>
>> Currently, I'm compiling a lonely AmberTools 1.5 with Intel compilers.
>> Then, I will add Amber 11 to that directory tree, patch it and proceed..
>>
>> Jan-Philip
>>
>>>
>>> -Dan
>>>
>>> On Tue, Nov 1, 2011 at 4:45 PM, Jan-Philip Gehrcke
>>> <jgehrcke.googlemail.com> wrote:
>>>> Hey,
>>>>
>>>> on Ubuntu 10.04, I have the same problem building ptraj with NetCDF
>>>> support as described in these threads:
>>>>
>>>> http://archive.ambermd.org/201004/0680.html
>>>> http://archive.ambermd.org/201106/0731.html
>>>>
>>>> The error for me looks like:
>>>>
>>>> icc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -o ncgen main.o load.o
>>>> ncgentab.o escapes.o getfill.o init.o genlib.o
>>>> ../libsrc/.libs/libnetcdf.a
>>>> ../libsrc/.libs/libnetcdf.a(attr.o): In function `nc_put_att_text':
>>>> attr.c:(.text+0x179a): undefined reference to `ncx_pad_putn_text'
>>>>
>>>> and many more of "undefined references".
>>>>
>>>> > nm libnetcdf.a | grep ncx_pad_putn_text
>>>> > U ncx_pad_putn_text
>>>> > U ncx_pad_putn_text
>>>>
>>>> This shows that libnetcdf.a has been built with undefined symbols like
>>>> `ncx_pad_putn_text`. I've reproduced this by running configure/make in
>>>> the AmberTools/src/netcdf/src directory. `configure --disable-utils`
>>>> deactivates the `ncgen` compilation which works around the problem.
>>>> However, during make of AmberTools, libnetcdf.a is used in different
>>>> contexts and therefore `--disable-utils`` does not help for building
>>>> AmberTools.
>>>>
>>>> I think that libnetcdf.a is somehow built wrong on "newer" systems. What
>>>> do you suggest? Could you even switch to a newer version of the NetCDF
>>>> library in AmberTools? I will try building a newer version of
>>>> libnetcdf.a and see if AmberTools builds against it...
>>>>
>>>> Any hint is appreciated!
>>>>
>>>> Jan-Philip
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> AMBER mailing list
>>>> AMBER.ambermd.org
>>>> http://lists.ambermd.org/mailman/listinfo/amber
>>>>
>>>
>>>
>>>
>>
>
>
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>



-- 
-------------------------
Daniel R. Roe, PhD
Postdoctoral Associate
BioMaPS Institute, Rutgers University
610 Taylor Road
Piscataway, NJ   08854




_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber

Received on Thu Nov 03 2011 - 08:00:05 PDT
Custom Search