multiscale / muscle3

The third major version of the MUltiScale Coupling Library and Environment
Apache License 2.0
25 stars 13 forks source link

Compilation issue with msgpack #231

Closed rnouail closed 1 year ago

rnouail commented 1 year ago

Dear muscle3 team, I have got an issue to compile the code in c++ following the instructions of the website. I attach the log result to the post. Could you help me ? Thank you in advance.

Regards

Rémy

make.log

LourensVeen commented 1 year ago

Bonjour Rémy,

Interesting, I haven't seen this one before.

I see you've overridden CXX to point to g++, which compiler are you using? Is this on an HPC machine or locally, and if the latter, which OS?

LourensVeen commented 1 year ago

Looking at the log again, it looks like you're on a Mac? MUSCLE3 0.6.0 doesn't support that yet, although I haven't seen this particular problem before.

I've recently added Mac support, but it hasn't been released yet. If you're on a Mac, would you be willing to try to compile the develop branch from git?

Instructions are here, except that you need to do

git clone https://github.com/multiscale/muscle3.git
cd muscle3
git checkout develop

to get the sources, rather than the wget command shown there.

I'm planning to make a new release in the coming weeks, so if that doesn't work for you then there's still time to fix it.

rnouail commented 1 year ago

Thank you for this first answer. I work on a server with CentOS 7.9 and I try to compile with gcc 8.5.0. Nevertheless, I will try the develop branch.

rnouail commented 1 year ago

I try with the develop branch, I got the same issue. Thank you in advance for the help.

make.log

LourensVeen commented 1 year ago

Okay, that's interesting, thank you for testing. I'm going to try to reproduce this locally in a CentOS 7.9 image and see if I can figure it out, and whether I can fix it by passing more information to the MsgPack build system or if I need to submit a patch to them.

I have another project to work on today, so I'll be back on this after the weekend.

LourensVeen commented 1 year ago

I've been doing some experimenting in a CentOS 7.9.2009 Docker image, and I have MUSCLE3 compiling and running there. So the good news is that it's possible, the bad news that I still don't know what exactly is causing the error you're getting.

Since the problem occurs when building the MessagePack tests however, I'm thinking that this might just be the same problem Peter had in #199. I tried installing an old GTest, and MessagePack found it and it did break the build, but with a different error message. Replacing it with a newer GTest then fixed that. Nevertheless, simply skipping the MessagePack tests (which we don't need anyway) may help.

I've added the proposed fix for #199 to the develop branch, could you git pull and test?

If that fixes compilation, then we should be good on the C++ and Fortran side, but there's another issue, which is that you still have Python 3.6 on this machine. We're going to drop support for Python 3.6 in the coming release, because it's becoming almost impossible to pip install anything on it: too many packages have dropped support for Python 3.6 but come with incorrect metadata, which causes pip to install the latest version anyway even on 3.6, which then breaks everything.

So you will need a newer Python. I've tried compiling Python 3.7 on CentOS 7, and that works, but it links against the ten year old SQLite library on CentOS 7, which didn't support one feature I was using. There was a very easy work-around for that though, which I've also applied to develop, after which the test suite passes and the examples run.

I also tried compiling Python 3.10 but found that it didn't like the ancient OpenSSL library on CentOS 7 and compiled without SSL support, creating a useless pip that cannot install anything. So you should try something older if you go that route. That said, Miniconda is probably a better solution for getting a newer Python, but I haven't tested that.

rnouail commented 1 year ago

Dear Lourens, I try to compile the develop branch with sucess ! For python, I can easily switch to python 3. (or later). Thank you for your help ! Regards

LourensVeen commented 1 year ago

Ah, excellent, and thanks to @peter-t-fox for reporting this earlier.

If you run the develop version of the C++/Fortran library, then you will also need to install the Python side from the develop branch, because they talk to each other over the network and need to speak the same version of the language.

pip install . from within the muscle3 directory should do it.

MUSCLE3 0.7.0 should be out in a week or two with these fixes included, so you can then upgrade to that and run a normal version again.

LourensVeen commented 1 year ago

This was released with MUSCLE3 0.7.0, which should work out of the box now. If it doesn't, please let me know, otherwise could you close this issue if it's solved for you?

rnouail commented 1 year ago

It works ! Thank you. I close the issue.