Hi,
It doesn't make sense to me that you can compile that code with
'-lbz2' and not cpptraj, unless for some reason during the make
process your LD_LIBRARY_PATH variable is being unset, or set to
something strange. The only other thing I can think of to try is to
locate the libbz2 library yourself:
$ locate libbz2
/usr/lib64/libbz2.so
/usr/lib64/libbz2.so.1
/usr/lib64/libbz2.so.1.0.6
Then add that directory manually to the 'cpptraj$(SFX):' rule in
'$AMBERHOME/AmberTools/src/cpptraj/src/Makefile_at', right before
'$(BZLIB)':
cpptraj$(SFX): $(NETCDF) $(OBJECTS) pub_fft.o $(EXTERNAL_LIBS)
$(CXX) $(LDFLAGS) -o cpptraj$(SFX) $(OBJECTS) pub_fft.o \
-L$(LIBDIR) $(NETCDFLIB) $(ZLIB) -L/usr/lib64 $(BZLIB)
$(FLIBS_PTRAJ) $(READLINE)
-Dan
On Mon, May 6, 2013 at 9:15 AM, Kshatresh Dutta Dubey
<kshatresh.gmail.com> wrote:
> Hi Daniel,
>
> I compiled above test program and it runs fine and successfully giving
> a.out.
>
>
> On Mon, May 6, 2013 at 8:24 PM, Daniel Roe <daniel.r.roe.gmail.com> wrote:
>
>> Hi,
>>
>> I think I may know what's happening now. Try compiling the following
>> test C program using 'gcc test.c -lbz2':
>>
>> #include <stdio.h>
>> #include "bzlib.h"
>> int main(int argc, char** argv)
>> {
>> BZFILE *infile;
>> FILE* fp;
>> int err;
>> if (argc < 2) return 0;
>> fp = fopen(argv[0], "r");
>> infile = BZ2_bzReadOpen( &err, fp, 1, 0, NULL, 0);
>> BZ2_bzReadClose(&err, infile);
>> fclose(fp);
>> return 0;
>> }
>>
>> If you get the same error (/usr/bin/ld: cannot find -lbz2) then for
>> some reason your system has bzip2 header files but not the library
>> itself, indicating either you're still missing a bzip2 package or your
>> bzip2 development package is broken.
>>
>> -Dan
>>
>> On Sun, May 5, 2013 at 11:58 AM, Kshatresh Dutta Dubey
>> <kshatresh.gmail.com> wrote:
>> > Hi Daniel,
>> >
>> > I have attached configure log for serial and parallel versions. For
>> > compilation log for cpptraj in serial version is also attached. Once
>> again
>> > I rechecked for compilation of cpptraj and again runs quite well for
>> > parallel but not for serial.
>> >
>> >
>> >
>> > On Sun, May 5, 2013 at 9:56 PM, Daniel Roe <daniel.r.roe.gmail.com>
>> wrote:
>> >
>> >> Hi,
>> >>
>> >> This is a very strange error. If configure goes well and libbz2 is
>> >> found, that is not consistent with the error message:
>> >>
>> >> */usr/bin/ld: cannot find -lbz2*
>> >>
>> >> On Sun, May 5, 2013 at 10:07 AM, Kshatresh Dutta Dubey
>> >> <kshatresh.gmail.com> wrote:
>> >> > bzip2-devel is also installed. Even I had commented libbz2 in config.h
>> >> for
>> >> > cpptraj configuration but every time I am getting same error. However,
>> >> this
>> >>
>> >> In order to manually disable bzip2 support, setting BZLIB in config.h
>> >> to an empty string, i.e.
>> >>
>> >> BZLIB=
>> >>
>> >> is not enough. You have to also remove the reference to '-DHASBZ2'
>> >> from the CFLAGS variable.
>> >>
>> >> > problem has been resolved using parallel version and cpptraj has been
>> >> > installed but it is still showing error in serial version.
>> >>
>> >> So just to be clear, bzip2 support works with the OpenMP version but
>> >> not the serial version? That doesn't make sense to me. Maybe send me
>> >> off-list your config file and a compile log if you have it?
>> >>
>> >> -Dan
>> >>
>> >> --
>> >> -------------------------
>> >> Daniel R. Roe, PhD
>> >> Department of Medicinal Chemistry
>> >> University of Utah
>> >> 30 South 2000 East, Room 201
>> >> Salt Lake City, UT 84112-5820
>> >> http://home.chpc.utah.edu/~cheatham/
>> >> (801) 587-9652
>> >> (801) 585-9119 (Fax)
>> >>
>> >> _______________________________________________
>> >> AMBER mailing list
>> >> AMBER.ambermd.org
>> >> http://lists.ambermd.org/mailman/listinfo/amber
>> >>
>> >
>> >
>> >
>> > --
>> > With best regards
>> >
>> *******************************************************************************************************************
>> > Kshatresh Dutta Dubey, PhD
>> > Post Doctoral Fellow
>> > Indian Institute of Technology Kanpur
>> > Kanpur, India
>> >
>> > _______________________________________________
>> > AMBER mailing list
>> > AMBER.ambermd.org
>> > http://lists.ambermd.org/mailman/listinfo/amber
>> >
>>
>>
>>
>> --
>> -------------------------
>> Daniel R. Roe, PhD
>> Department of Medicinal Chemistry
>> University of Utah
>> 30 South 2000 East, Room 201
>> Salt Lake City, UT 84112-5820
>> http://home.chpc.utah.edu/~cheatham/
>> (801) 587-9652
>> (801) 585-9119 (Fax)
>>
>> _______________________________________________
>> AMBER mailing list
>> AMBER.ambermd.org
>> http://lists.ambermd.org/mailman/listinfo/amber
>>
>
>
>
> --
> With best regards
> *******************************************************************************************************************
> Kshatresh Dutta Dubey, PhD
> Post Doctoral Fellow
> Indian Institute of Technology Kanpur
> Kanpur, India
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
--
-------------------------
Daniel R. Roe, PhD
Department of Medicinal Chemistry
University of Utah
30 South 2000 East, Room 201
Salt Lake City, UT 84112-5820
http://home.chpc.utah.edu/~cheatham/
(801) 587-9652
(801) 585-9119 (Fax)
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon May 06 2013 - 09:00:02 PDT