multiscale / muscle3

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

Installation on Cartesius #70

Closed DongweiYe closed 4 years ago

DongweiYe commented 4 years ago

The installation of python version of MUSCLE3 is perfectly done. The C++ version returns some errors in protobuf library saying:

./.libs/libprotoc.so: error: undefined reference to scc_info_FileDescriptorProto_google_2fprotobuf_2fdescriptor_2eproto'
./.libs/libprotoc.so: error: undefined reference to 'descriptor_table_google_2fprotobuf_2fdescriptor_2eproto'

The problem is probably caused by a bug in the GOLD linker. We have tried to compile protobuf separately with CMake (With additional changing fold name lib64 to lib, and version 3.10.0.0 to 3.10.0). It works. However new error comes out when compiling gRPC, saying:

protobuf can't be find

This error comes even when a system-default protobuf 3.6.1 is loaded.

LourensVeen commented 4 years ago

It looks like we're hitting https://github.com/protocolbuffers/protobuf/issues/5144. https://github.com/protocolbuffers/protobuf/issues/5902 suggests that this is a bug in the GOLD linker, but Cartesius uses GNU LD 2.30, and has the same issue. Oddly, my laptop uses the same linker version and doesn't have the problem.

At any rate, the issue seems to be that the symbols mentioned are not declared extern "C++", while they are in the extern "C++" section of the protobuf version scripts. Apparently, on some linkers they'll match anyway, while on others they don't. The file format for version scripts isn't very well standardised, and matching symbols on a variety of tool chains is a bit of a black art.

Anyway, I've modified the MUSCLE3 build system to patch the protobuf version files before compiling to fix this issue, and with that it compiles and links on Cartesius now.

LourensVeen commented 4 years ago

Released with 0.3.2.