Trouble linking with Xcode/clang 5.1

Member Site Forums Rosetta 3 Rosetta 3 – Build/Install Trouble linking with Xcode/clang 5.1

Viewing 1 reply thread
  • Author
    Posts
    • #1849
      akhmelin
      Participant

        Hi all,
        Just a heads up. There’s a problem linking with the new OSX Command Line Tools and clang version 5.1.
        This is with the most recent weekly release 2014 week 04
        Any suggestions would be appreciated

        Clang version:
        clang –version
        Apple LLVM version 5.1 (clang-503.0.38) (based on LLVM 3.4svn)
        Target: x86_64-apple-darwin13.1.0
        Thread model: posix

        Error message

        Undefined symbols for architecture x86_64:
        “core::io::silent::ProteinSilentStruct_Template::fill_struct(core::pose::Pose const&, std::string)”, referenced from:
        vtable for core::io::silent::ProteinSilentStruct_Template
        in SilentFileOutputter.os
        “core::io::silent::ProteinSilentStruct_Template
        ::get_debug_rmsd()”, referenced from:
        vtable for core::io::silent::ProteinSilentStruct_Template
        in SilentFileOutputter.os
        “core::io::silent::ProteinSilentStruct_Template
        ::init_from_lines(utility::vector1 > const&, core::io::silent::SilentFileData&)”, referenced from:
        vtable for core::io::silent::ProteinSilentStruct_Template in SilentFileOutputter.os
        “core::io::silent::ProteinSilentStruct_Template
        ::CA_rmsd(core::io::silent::ProteinSilentStruct_Template)”, referenced from:
        vtable for core::io::silent::ProteinSilentStruct_Template
        in SilentFileOutputter.os
        “core::io::silent::ProteinSilentStruct_Template
        ::get_CA_xyz() const”, referenced from:
        vtable for core::io::silent::ProteinSilentStruct_Template
        in SilentFileOutputter.os
        “core::io::silent::ProteinSilentStruct_Template
        ::mem_footprint() const”, referenced from:
        vtable for core::io::silent::ProteinSilentStruct_Template
        in SilentFileOutputter.os
        “core::io::silent::ProteinSilentStruct_Template
        ::print_conformation(std::ostream&) const”, referenced from:
        vtable for core::io::silent::ProteinSilentStruct_Template
        in SilentFileOutputter.os
        “core::io::silent::ProteinSilentStruct_Template
        ::fill_pose(core::pose::Pose&) const”, referenced from:
        vtable for core::io::silent::ProteinSilentStruct_Template
        in SilentFileOutputter.os
        “core::io::silent::ProteinSilentStruct_Template
        ::fill_pose(core::pose::Pose&, core::chemical::ResidueTypeSet const&) const”, referenced from:
        vtable for core::io::silent::ProteinSilentStruct_Template
        in SilentFileOutputter.os
        ld: symbol(s) not found for architecture x86_64
        clang: error: linker command failed with exit code 1 (use -v to see invocation)

      • #9901
        Anonymous

          Sorry for the delay in addressing this. It should be fixed for upcoming releases, but the quick fix for currently available weeklies is to add the following line to main/source/src/protocols/outputter/SilentFileOutputter.cc near the top, just after the “#include <core/io/silent/ProteinSilentStruct.hh>” line:

          #include <core/io/silent/ProteinSilentStruct.tmpl.hh>

        • #9972
          Anonymous

            I tried implementing this, and it gave me another error when trying to build/link libmini.dylib, again tied to the clang version. Specifically, when executing

            Linking mini lib…
            cd /Users/juliaudell/Downloads/rosetta_2014wk05_bundle/main/source && cd build/src/pyrosetta/macos/10.9/64/x86/clang/5.0/default/ && gcc -dynamiclib -Xlinker -headerpad_max_install_names
            … [long list of .os files]
            -lz -lstdc++ -o /Users/juliaudell/Downloads/rosetta_2014wk05_bundle/main/source/src/python/bindings/rosetta/libmini.dylib

            it gives the error

            /bin/sh: line 0: cd: build/src/pyrosetta/macos/10.9/64/x86/clang/5.0/default/: No such file or directory

            Any suggestions for another quick fix?

          • #9979
            Anonymous

              I take it you’re trying to build PyRosetta, instead of just the commandline Rosetta applications?

              It looks like it’s getting confused about which complier and which version of the complier are being used to build Rosetta. (Specifically with respect to the directory which it’s building in.) You can typically control those with flags to the build commands. (Running the builder with just the -h flag typically will tell you the syntax.) You may need to be explicit about which one you’re using.

              Take a look at what the directory tree you *do* have in /Users/juliaudell/Downloads/rosetta_2014wk05_bundle/main/source/build/src/ looks like. That should tell you what (Py)Rosetta originally thought your settings were. When you restart your compile, explicitly use those settings and see if things work. If not, you may need to restart the build process from the beginning, explicitly telling Rosetta what your compiler and version numbers actually are.

            • #9991
              Anonymous

                Actually it looks like while you can include a flag for the compiler name you can’t do it for the version. Furthermore the directory tree is build/src/pyrosetta/macos/10.9/64/x86/clang/5.1/default/, so it’s really just looking for the wrong version. The clang version that is used to generate the directory tree is actually hardcoded in BuildBindings.py (line 684).

                I’ve started a different thread in what seems to be the appropriate subforum so as to not clutter this thread with off-topic discussion: https://www.rosettacommons.org/node/3637

            Viewing 1 reply thread
            • You must be logged in to reply to this topic.