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

From: Jan-Philip Gehrcke <jgehrcke.googlemail.com>
Date: Fri, 04 Nov 2011 13:47:46 +0100

Dan,

thanks for your efforts. I also tried to reproduce it again:

$ mkdir reproduction
$ tar xjf AmberTools-1.5.tar.bz2 -C reproduction/
$ cd reproduction/amber11/
$ export AMBERHOME=$(pwd)
$ patch -p0 -N < ../../bugfix.all &> at_bugfix.log
$ cd ../../
$ mkdir Amber11extracted
$ tar xf Amber11.tar -C Amber11extracted/
$ cp -r Amber11extracted/amber11/* $AMBERHOME
cp: overwrite
`/home/bioinfp/jang/sumpf/Amber11/reproduction/amber11/test/ndiff.awk'? y
$ ./apply_bugfix.x $(pwd)/bugfix.1to17.tar.bz2 &> amber_bugfix.log
$ cd $AMBERHOME/AmberTools/src
$ ./configure gnu &> at_configure_gnu.log
$ make serial &> at_make_serial.log

This time, it built properly up to the safemem.f problem. Hence,
building libnetcdf was successful. Now, I am really trying hard to
reconstruct what was different in my procedure before. From
.bash_history, I cannot reproduce the order of commands with 100 %
certainty. However, during the installation procedure that failed, I've
manually written a log in real-time while doing the things. This log
says exactly:

  - extracted AT15
  - set AMBERHOME
  - applied bugfixes to AT15
  - extracted Amber11 to same AMBERHOME
  - applied bugfixes to Amber11
  - configure gnu

I've also logged the patch commands and the output from the patches as
well as the configure command and the output of configure. I've applied
the patches exactly as you did and as I did above. Everything looks
fine. The only difference is: I've `./configure gnu`ed two times. In the
first run, configure could not find libbz2 headers. I've then invoked

$ sudo apt-get install libbz2-dev

and configured again. But I do not see how this can be related to the
problem. Could it have an influence? Now, the whole thing wouldn't worry
me so much anymore, if there weren't two other people in the past
experiencing the same:

http://archive.ambermd.org/201004/0680.html
http://archive.ambermd.org/201106/0731.html

Maybe I'll try again to reproduce including the libbz2 part..


Jan-Philip





On 11/03/2011 03:43 PM, Daniel Roe wrote:
> 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
>>
>
>
>
>
>
> _______________________________________________
> 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
Received on Fri Nov 04 2011 - 06:00:05 PDT
Custom Search