Hi David
Thank you for your feedback regarding this matter.
> Wow: homebrew seems weird to me. It looks like it is following Apple’s strange (to me) policy of having gcc (in spite of its name) point to the clang compiler and not to the GNU compiler.
I do agree, switching from MacPorts to Homebrew has not been an easy ride (though I am starting to get accustomed). However, one should not forget the time before “gcc_select" and later “port select —set gcc”. MacPorts used to have the same issues unless you tweaked the PATH or simply unlinked a bunch of files in /usr/bin/.
> It looks like it is following Apple’s strange (to me) policy of having gcc (in spite of its name) point to the clang compiler and not to the GNU compiler.
You are also correct here, apple refers gnu gcc to clang though unfortunately I did make an incorrect post in the frenzy of irritation, I am using clang not gnu compilers. Running
./configure -macAccelerate clang
produces the issue:
>> Testing the clang++ compiler with boost:
>> clang++ -fPIC -lboost_thread -lboost_system -o testp testp.cpp
>>
>> Warning: Could not link to boost. Ensure boost-thread, boost-system and boost headers are installed.
I could do the old workaround and modify my PATH/links to use a Homebrew GCC version 7, though I thought that I would try to use as many system defaults as possible this time and avoid monkeying around to much, hence clang.
It seems that -lboost_system is defined by default though -lboost_thread is not. It remains undefined even after installing boost through homebrew. Either there is conflict of compiler used (gcc/clang) that affects boost, or this might be the same issue as with MacPorts GCC from way-back, just a linking/priority issue that needs solving to get the newly installed BOOST libraries priority.
> if the "gcc" in your PATH is really clang, you should use the clang option for configure, not the gnu option.
I have not tried this with the amber18 & AT18 yet though I have a brief walkthrough of installing amber16 & AmberTools17 on Mac OS X 10.13.X using MacPorts without errors.
https://www.ovetande.se/okategoriserade-en/installing-ambertools17-amber16-on-mac-os-x-10-13-3-using-macports/
If I have time I’ll try the v18 package this weekend (I cannot have Homebrew and MacPorts on the same system and have not got a virtual machine set up for OS X).
> I'm sure some smart Mac user can figure out how to get the boost libraries either by compiling from source, or from macports.
Compiling BOOST is as easy as extracting a download archive according to the webpage, unless you need any of e select few particular libraries. Full versions has already been built from source on mac as well though if this is a linking/priority issue, this will unfortunately not solve the problem.
I’ll see what happens when trying this using MacPorts instad and update the info I have online at some point. Meanwhile, I’ll try to solve this issue when I have a time to spare, which unfortunately seems to happen less and less, and update the webpage with Homebrew instructions for installing Amber as well. If anyone else has any ideas regarding this issue, please chime in.
Tank you again and best regards
// Gustaf
> On 25 Apr 2018, at 14:53, David A Case <david.case.rutgers.edu> wrote:
>
> On Wed, Apr 25, 2018, Gustaf Olsson wrote:
>
>> So I switched from MacPorts to Homebrew when switching computers. This
>> meant going from GNU compilers to using CLANG which worked without a
>> hitch on AmberTools17, though this time I’m getting an error.
>>
>> ./configure -macAccelerate gnu
>>
>> Testing the clang++ compiler with boost:
>> clang++ -fPIC -lboost_thread -lboost_system -o testp testp.cpp
>>
>> Warning: Could not link to boost. Ensure boost-thread, boost-system and boost headers are installed.
>
> Wow: homebrew seems weird to me. It looks like it is following Apple's
> strange (to me) policy of having gcc (in spite of its name)
> point to the clang compiler and not to the GNU compiler. If things work
> without a hitch for you, that is great. But most users, and
> certainly those using macports, should follow this rule:
>
> if the "gcc" in your PATH is really clang, you should use the
> clang option for configure, not the gnu option.
>
> Concerning packmol_memgen: as far as I can tell, for now, this option
> only works for Linux. I'm sure some smart Mac user can figure out how
> to get the boost libraries either by compiling from source, or from
> macports. If someone provides detailed instructions, we'll create an
> update patch. We apologize for the inconvenience.
>
> ...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
Received on Wed Apr 25 2018 - 06:30:02 PDT