Re: [AMBER] Problem with g++ compiler with boost (AmberTools18)

From: Matias Machado <mmachado.pasteur.edu.uy>
Date: Wed, 30 May 2018 23:12:28 -0300 (UYT)

Dear Amber experts,

I've just downloaded and installed AmberTools18.

During the configuration I run into the same issue of "Could not link to boost" as referred before in [http://archive.ambermd.org/201804/0235.html], using Ubuntu 18.04 and the latest libboost-all-dev (1.65.1).

I guess there may be a (harmless) bug in $AMBERHOME/AmberTools/src/configure2 when testing for compiler settings, because the actual packmol_memgen compilation runs OK and the executable is generated.

I'm not a c++ expert but according to StackOverflow the order of arguments given to g++ do matters:
[https://stackoverflow.com/questions/15280882/why-undefined-reference-to-boostsystemgeneric-category-even-if-i-do-link]

Indeed, changing the following line (30001) in $AMBERHOME/AmberTools/src/configure2:

    $cplusplus $cxxflags -lboost_thread -lboost_system -o testp$suffix testp.cpp 2> boost.compile.err

to:
    $cplusplus testp.cpp -o testp$suffix $cxxflags -lboost_thread -lboost_system 2> boost.compile.err

overcomes the error messages

Best,

Matías

------------------------------------
PhD.
Researcher at Biomolecular Simulations Lab.
Institut Pasteur de Montevideo | Uruguay
[http://www.pasteur.uy]
[http://www.sirahff.com]

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Wed May 30 2018 - 19:30:02 PDT
Custom Search