Menu

#45 macOS M2 compilation OBABELIFACE

Future
open
nobody
None
5
2025-10-11
2025-02-08
No

I was apple to compile MolSketch under macOS (Apple SIlicon M2) but only with the -DMSK_OBABELIFACE=false option.

If I try tu implement the OBABELIFACE, I systematically encounter errors in cmake (cf joined file).
I do have OpenBabel 3.1 installed with Homebrew.
Any help ?

1 Attachments

Related

Bugs: #45

Discussion

  • Hendrik Vennekate

    Hi Xavier!
    Thank you for reporting.
    Looking at the very first error message:

    EXPORT_PREFIX QStringList outputFormats();

    it complains about the QStringList type here not being compatible with C.
    Now I recently replaced this with a std::vector<std::string> (not entirely sure if that would meet this compiler's standards either), so I assume you are building from a slightly outdated version.
    Could you please try to use a more recent version of the source files and let me know what the result is? (And also: which version were you using?)

    Hope this helps and best of luck!

     
    • Xavier Brazzolotto

      Hi Hendrik

      I’ve compiled 0.8.1 Fluorine-13
      Could it be an issue with Apple Clang version ?

      Maybe I could have a check if I find a way to compile with gcc-14 ?

      Thank you for your help and your support

      Xavier

      Le 9 févr. 2025 à 10:45, Hendrik Vennekate hvennek@users.sourceforge.net a écrit :

      Hi Xavier!
      Thank you for reporting.
      Looking at the very first error message:

      EXPORT_PREFIX QStringList outputFormats();

      it complains about the QStringList type here not being compatible with C.
      Now I recently replaced this with a std::vector<std::string> (not entirely sure if that would meet this compiler's standards either), so I assume you are building from a slightly outdated version.
      Could you please try to use a more recent version of the source files and let me know what the result is? (And also: which version were you using?)</std::string>

      Hope this helps and best of luck!

      [bugs:#45] https://sourceforge.net/p/molsketch/bugs/45/ macOS M2 compilation OBABELIFACE

      Status: open
      Group: Future
      Created: Sat Feb 08, 2025 06:50 PM UTC by Xavier Brazzolotto
      Last Updated: Sat Feb 08, 2025 06:50 PM UTC
      Owner: nobody
      Attachments:

      Sans titre 2.rtf https://sourceforge.net/p/molsketch/bugs/45/attachment/Sans%20titre%202.rtf (9.5 kB; text/rtf)
      I was apple to compile MolSketch under macOS (Apple SIlicon M2) but only with the -DMSK_OBABELIFACE=false option.

      If I try tu implement the OBABELIFACE, I systematically encounter errors in cmake (cf joined file).
      I do have OpenBabel 3.1 installed with Homebrew.
      Any help ?

      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/molsketch/bugs/45/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

      Related

      Bugs: #45

  • Xavier Brazzolotto

    The "Main" does not compile anymore with or without OBABELIFACE.

     
    • Hendrik Vennekate

      Hold on, which "main"? The "main.cpp"? Do you have some output? Normally, there are the modules molsketch, libmolsketch, mskcore lib, obabeliface (that should be about it...)

       
      • Xavier Brazzolotto

        Hi Hendrik

        By « main » I intended to mean the last version in your GitHub entitled « Molsketch-main »

        Please find both outputs attached, one when compiling with OBABELIFACE and the second one without OBABELIFACE

        

        Xavier

        Le 13 févr. 2025 à 20:19, Hendrik Vennekate hvennek@users.sourceforge.net a écrit :

        Hold on, which "main"? The "main.cpp"? Do you have some output? Normally, there are the modules molsketch, libmolsketch, mskcore lib, obabeliface (that should be about it...)

        [bugs:#45] https://sourceforge.net/p/molsketch/bugs/45/ macOS M2 compilation OBABELIFACE

        Status: open
        Group: Future
        Created: Sat Feb 08, 2025 06:50 PM UTC by Xavier Brazzolotto
        Last Updated: Wed Feb 12, 2025 08:34 PM UTC
        Owner: nobody
        Attachments:

        Sans titre 2.rtf https://sourceforge.net/p/molsketch/bugs/45/attachment/Sans%20titre%202.rtf (9.5 kB; text/rtf)
        I was apple to compile MolSketch under macOS (Apple SIlicon M2) but only with the -DMSK_OBABELIFACE=false option.

        If I try tu implement the OBABELIFACE, I systematically encounter errors in cmake (cf joined file).
        I do have OpenBabel 3.1 installed with Homebrew.
        Any help ?

        Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/molsketch/bugs/45/

        To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

         

        Related

        Bugs: #45

        • Hendrik Vennekate

          Ok, thank you -- ah, the "main" branch of the git repo ;)

          So, for the project with OpenBabel, it fails because of the issue you had earlier that Clang is somehow not happy with the C linkage (well, a fair complaint, but it would probably take me some time to fix that and include Clang in my build pipeline as another compiler to test). Did you manage to switch to gcc/g++ instead for that build?

          For the build without OpenBabel, the interesting lines for me are:

          ...
          [ 4%] Linking CXX shared library libmskcore.dylib
          ...
          [ 75%] Linking CXX shared library liblibmolsketch.dylib
          ld: warning: search path '/Users/xbrazzolotto/Downloads/chem/Molsketch-main/build/lib' not found
          ...

          There are several libraries involved here: it starts with building the mskcore library, which is a really small lib, mainly for transferring data to the OpenBabel interface (and is still used, even if you do not actually use OpenBabel).
          The libmolsketch is built, which is the main library (and finally, molsketch itself, the executable would be built, but we are failing earlier here). It seems that in the final build step, linking the library, it cannot find the core library. My guess is that I did not properly account for some specifics of the Apple build system (sorry, don't have access to a Mac).
          So my question to you: can you check where libmskcore.dylib ended up? Probably we need to change the search path, so that the linker can find it.

           
          • Xavier Brazzolotto

            To answer your questions

            gcc/g++-14 doesn’t work either. There is some incompatibility with QT6, as it asks me for QT5…

            About libmskcore.dylib, it seems to be in a folder named « libmskcore » into the « build » directory.

            Sorry, the Apple system seems very tricky, especially now with the switch to the new ARM/Silicon architecture and my computing/coding knowledge is limited.

            BEst
            Xavier

            Le 13 févr. 2025 à 21:11, Hendrik Vennekate hvennek@users.sourceforge.net a écrit :

            Ok, thank you -- ah, the "main" branch of the git repo ;)

            So, for the project with OpenBabel, it fails because of the issue you had earlier that Clang is somehow not happy with the C linkage (well, a fair complaint, but it would probably take me some time to fix that and include Clang in my build pipeline as another compiler to test). Did you manage to switch to gcc/g++ instead for that build?

            For the build without OpenBabel, the interesting lines for me are:

            ...
            [ 4%] Linking CXX shared library libmskcore.dylib
            ...
            [ 75%] Linking CXX shared library liblibmolsketch.dylib
            ld: warning: search path '/Users/xbrazzolotto/Downloads/chem/Molsketch-main/build/lib' not found
            ...

            There are several libraries involved here: it starts with building the mskcore library, which is a really small lib, mainly for transferring data to the OpenBabel interface (and is still used, even if you do not actually use OpenBabel).
            The libmolsketch is built, which is the main library (and finally, molsketch itself, the executable would be built, but we are failing earlier here). It seems that in the final build step, linking the library, it cannot find the core library. My guess is that I did not properly account for some specifics of the Apple build system (sorry, don't have access to a Mac).
            So my question to you: can you check where libmskcore.dylib ended up? Probably we need to change the search path, so that the linker can find it.

            [bugs:#45] https://sourceforge.net/p/molsketch/bugs/45/ macOS M2 compilation OBABELIFACE

            Status: open
            Group: Future
            Created: Sat Feb 08, 2025 06:50 PM UTC by Xavier Brazzolotto
            Last Updated: Thu Feb 13, 2025 07:19 PM UTC
            Owner: nobody
            Attachments:

            Sans titre 2.rtf https://sourceforge.net/p/molsketch/bugs/45/attachment/Sans%20titre%202.rtf (9.5 kB; text/rtf)
            I was apple to compile MolSketch under macOS (Apple SIlicon M2) but only with the -DMSK_OBABELIFACE=false option.

            If I try tu implement the OBABELIFACE, I systematically encounter errors in cmake (cf joined file).
            I do have OpenBabel 3.1 installed with Homebrew.
            Any help ?

            Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/molsketch/bugs/45/

            To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

             

            Related

            Bugs: #45

  • Hendrik Vennekate

    Hi Xavier, sorry to have dropped the ball a bit on this -- could you please check with the latest version 0.8.4?

     

Log in to post a comment.

MongoDB Logo MongoDB