Re: [AMBER] Compiling CPPTRAJ from GitHub

From: Gustaf Olsson <gustaf.olsson.lnu.se>
Date: Tue, 6 Oct 2020 09:28:30 +0000

This problem seems to remain

Warning: Compilation of sanderlib requires AMBERHOME to be set
Warning: if --with-sanderlib not specified.

Which is not surprising as I just cleared amber home from my path.

So “re-creating” the problem:

./configure -macAccelerate --with-sanderlib=/Users/guolaa/SOFTWARE/amber20 clang

Checking sanderlib: dyld: Library not loaded: @rpath/libsander.dylib
  Referenced from: /Users/guolaa/Git/cpptraj.clone/./testp

Still fails, the file is exactly where clang++ is looking:
    clang++ -Wall -O3 -std=c++11 -I/Users/guolaa/SOFTWARE/amber20/include -o testp testp.cpp /Users/guolaa/SOFTWARE/amber20/lib/libsander.dylib

Though is presented as “not found”, running the command produces no printed warnings or errors other then the previously mentioned.

Best regards
// Gustaf

> On 6 Oct 2020, at 11:22, Gustaf Olsson <gustaf.olsson.lnu.se> wrote:
>
> So I managed to figure out how to solve the problem and I am not sure of this is a “problem” or a result of “TLDR” and me not reading the documentation carefully enough.
>
> I tried a lot of different alternative inputs without success as files (which were obviously present and in the aforementioned location) were not found
>
>
> ########### Before managing to figure out the problem, skip ahead of not interesting ###########
>
> I used CMAKE to configure amber20, still not loving it though I thought it was time to “get with the program” as I suspect this will be the way moving forward.
>
> No, I cannot compile without amberlibs either. There seems to be a problem finding library files regardless of what I try, though the library files differ.
>
> ./configure -macAccelerate clang OR ./configure clang OR ./configure -amberlib --with-netcdf=/usr/local/Cellar/netcdf/4.7.4_1/ clang OR ./configure --with-netcdf=/usr/local/Cellar/netcdf/4.7.4_1/ clang
>
> Checking for sanderlib: dyld: Library not loaded: @rpath/libsander.dylib
> Referenced from: /Users/guolaa/Git/cpptraj.clone/./testp
> Reason: image not found
> ./configure: line 360: 33288 Abort trap: 6 ./testp > prog.out
>
> Error: Run of test program failed, compiled with: clang++ -Wall -O3 -std=c++11 -I/Users/guolaa/SOFTWARE/amber20/include -o testp testp.cpp /Users/guolaa/SOFTWARE/amber20/lib/libsander.dylib
>
> As it seems that the missing libsander.dylib (which is not missing) is located in the amber20 install directory, is there a place/way to include this file which does not require amber to be installed?
>
> ./configure -macAccelerate -amberlib clang OR ./configure -amberlib clang
> Checking NetCDF: dyld: Library not loaded: @rpath/libnetcdf.13.dylib
> Referenced from: /Users/guolaa/Git/cpptraj.clone/./testp
> Reason: image not found
> ./configure: line 360: 33430 Abort trap: 6 ./testp > prog.out
>
> Error: Run of test program failed, compiled with: clang++ -Wall -O3 -std=c++11 -I/Users/guolaa/SOFTWARE/amber20/include -o testp testp.cpp -L/Users/guolaa/SOFTWARE/amber20/lib -lnetcdf
>
> ################################################################################
>
> The solution, make sure that amber20 is not in the path. My guess is that at some stage/level there is a check for “$AMBERHOME” even if the -amberlib flag is not provided. As soon as I removed amber20 from my path and run
> ./configure -macAccelerate clang
>
> The configuration ran and the build finished, producing an executable file which seems to be working. So it seems that building in absence of amber is working without a problem, when building in presence of amber, something messes up paths in a some way.
>
> Best regards
> // Gustaf
>
>
>> On 5 Oct 2020, at 16:07, Daniel Roe <daniel.r.roe.gmail.com> wrote:
>>
>> Hi,
>>
>> Did you compile Amber with configure or cmake? What options did you
>> use for either case?
>>
>> Can GitHub cpptraj compile on its own (i.e. without the '-amberlib' flag)?
>>
>> I'm trying to reproduce on my end at the moment
>>
>> -Dan
>>
>> On Mon, Oct 5, 2020 at 3:09 AM Gustaf Olsson <gustaf.olsson.lnu.se> wrote:
>>>
>>> Currently I am running macOS Mojave (10.14.6). There are some applications I which are still not fully supported so I am holding off of updating the OS.
>>>
>>> Using gnu/clang basically produces the same error:
>>>
>>>
>>>
>>> GNU
>>>
>>> Checking sanderlib: dyld: Library not loaded: @rpath/libsander.dylib
>>> Referenced from: /cpptraj.clone/./testp
>>> Reason: image not found
>>> ./configure: line 360: 3955 Abort trap: 6 ./testp > prog.out
>>>
>>> Error: Run of test program failed, compiled with: mpicxx -Wall -O3 -std=gnu++11 -I/amber20//include -o testp testp.cpp /amber20//lib/libsander.dylib
>>>
>>>
>>>
>>> CLANG
>>>
>>> Checking for sanderlib: dyld: Library not loaded: @rpath/libsander.dylib
>>> Referenced from: /cpptraj.clone/./testp
>>> Reason: image not found
>>> ./configure: line 360: 4332 Abort trap: 6 ./testp > prog.out
>>>
>>> Error: Run of test program failed, compiled with: clang++ -Wall -O3 -std=c++11 -I/amber20/include -o testp testp.cpp /amber20/lib/libsander.dylib
>>>
>>>
>>>
>>> Using -amberlib in combination with clang produces a similar library error, though this time with netcdf:
>>>
>>> Checking NetCDF: dyld: Library not loaded: @rpath/libnetcdf.13.dylib
>>> Referenced from: /cpptraj.clone/./testp
>>> Reason: image not found
>>> ./configure: line 360: 4533 Abort trap: 6 ./testp > prog.out
>>>
>>> Error: Run of test program failed, compiled with: clang++ -Wall -O3 -std=c++11 -I/amber20/include -o testp testp.cpp -L/amber20/lib -lnetcdf
>>>
>>>
>>>
>>> I do seem to have an empty DYLD_LIBRARY_PATH, where should this be pointing to get the correct includes? I have tried using the optional library flag: -sanderlib --with-sanderlib=/amber20/ without success (meaning I still get the sander library not being loaded).
>>>
>>> I have run the “c++” commands as they are as well as verbose though I see no errors or warnings, the only thing I see which could be any indication of a problem are these lines:
>>>
>>> ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1"
>>> ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/local/include"
>>> ignoring nonexistent directory "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/Library/Frameworks"
>>>
>>> Maybe this is a OS version thing? I still think it is strange as commands seemingly executes without any errors when run manually and all the paths presented seems to point to the correct locations where there library files are located.
>>>
>>> Best regards
>>> // Gustaf
>>>
>>>
>>>> On 2 Oct 2020, at 17:41, Daniel Roe <daniel.r.roe.gmail.com> wrote:
>>>>
>>>> Hi,
>>>>
>>>> The error indicates that it was the running of the test program that
>>>> failed, i.e. the compile was successful. Is maybe DYLD_LIBRARY_PATH
>>>> not properly set? I admit I don't really ever run on Macs so this one
>>>> may be tough to debug for me. What OSX version are you using?
>>>>
>>>> -Dan
>>>>
>>>> On Fri, Oct 2, 2020 at 11:34 AM David A Case <david.case.rutgers.edu> wrote:
>>>>>
>>>>> On Fri, Oct 02, 2020, Gustaf Olsson wrote:
>>>>>
>>>>>> Error: Run of test program failed, compiled with: clang++ -Wall
>>>>>> -O3 -std=c++11 -I/Users/xxx/amber20/include -o testp testp.cpp
>>>>>> -L/Users/xxx/amber20/lib -lnetcdf
>>>>>
>>>>> Have you tried to run the command above by hand? Maybe the error message is
>>>>> getting lost somewhere. It would be most helpful to know if the error
>>>>> happens at the compile step or at the ld step.
>>>>>
>>>>> ....dac
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Oct 06 2020 - 02:30:03 PDT
Custom Search