macOS installation error

79 views
Skip to first unread message

Nico

unread,
Feb 2, 2023, 6:33:52 AM2/2/23
to Plastimatch
Hi everyone, I'm trying to install Plastimatch on macOS Monterey 12.6. I've cloned the repo from https://gitlab.com/plastimatch/plastimatch, then run cmake (which doesn't report any issue) and then, when I run make, I get the following (after many warnings):

------------------------------------------------------------------------------------------------------------------------
In file included from /Users/nico/plastimatch/src/sys/dlib_threads.cxx:154:

/Users/nico/plastimatch/libs/dlib-19.1/dlib/threads/thread_pool_extension.cpp:262:5: error: out-of-line definition of 'add_task_internal' does not match any declaration in 'dlib::thread_pool_implementation'

    add_task_internal (

    ^~~~~~~~~~~~~~~~~

/Users/nico/plastimatch/libs/dlib-19.1/dlib/threads/thread_pool_extension.h:315:13: note: type of 2nd parameter of member declaration does not match definition ('shared_ptr<dlib::thread_pool_implementation::function_object_copy> &' (aka 'dlib::shared_ptr<dlib::thread_pool_implementation::function_object_copy> &') vs 'std::shared_ptr<function_object_copy> &')

            shared_ptr<function_object_copy>& item

            ^

In file included from /Users/nico/plastimatch/src/sys/dlib_threads.cxx:154:

/Users/nico/plastimatch/libs/dlib-19.1/dlib/threads/thread_pool_extension.cpp:297:39: error: non-const lvalue reference to type 'dlib::shared_ptr<dlib::thread_pool_implementation::function_object_copy>' cannot bind to a value of unrelated type 'std::shared_ptr<function_object_copy>'

        tasks[idx].function_copy.swap(item);

                                      ^~~~

/Users/nico/plastimatch/libs/dlib-19.1/dlib/smart_pointers/shared_ptr.h:428:31: note: passing argument to parameter 'b' here

        void swap(shared_ptr& b)

                              ^

19 warnings and 2 errors generated.

make[2]: *** [src/sys/CMakeFiles/plmsys.dir/dlib_threads.cxx.o] Error 1

make[2]: *** Waiting for unfinished jobs....

193 warnings generated.

[  5%] Linking CXX static library ../../libplmclp.a

[  5%] Built target plmclp

make[1]: *** [src/sys/CMakeFiles/plmsys.dir/all] Error 2

make: *** [all] Error 2

------------------------------------------------------------------------------------------------------------------------

Did anyone get these errors before?
I've tried with the sourceforge version as well and got other errors. I've also tried compiling with 
cmake -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_FLAGS=-std=gnu++11 .. 
or 
cmake -DCMAKE_CXX_FLAGS=-stdlib=libc++ -DCMAKE_CXX_STANDARD=11 ..
, but it didn't make any difference.

Thank you very much in advance for your help

Nico

unread,
Feb 3, 2023, 5:48:22 AM2/3/23
to Plastimatch
EDIT: dlib was installed with homebrew
Message has been deleted

Nicolò Cogno

unread,
Feb 22, 2023, 9:03:18 AM2/22/23
to Plastimatch
SOLVED: dear all, after some trial and error I managed to install Plastimatch. Here are the steps I followed, in case anyone will need it in the future:
  • remove the DCMTK Homebrew (version 3.6.7)
  • install DLIB using Homebrew
  • build ITK from source with the CMake options indicated on the Plastimatch website and install the libraries (make install)
  • git clone Plastimatch from Gitlab
  • cd /Users/my_username/plastimatch/build and ccmake ..
  • configure (c)
  • set the following variables:
    • DLIB_DIR                           /usr/local/Cellar/dlib/19.24_1/lib
    • DLIB_INCLUDE_DIR         /usr/local/include/dlib
    • ITK_DIR                             /usr/local/lib/cmake/ITK-5.4
  • configure (c) and generate (g)
  • make -j8 -> got an error from DCMTK saying that a file could not be found
  • cd /Users/my_username/plastimatch/build/DCMTK-build and make install (this will install the DCTMK libraries previously downloaded and built by Plastimatch, version 3.6.2)
  • cd /Users/my_username/plastimatch/build
  • make -j8
  • DONE
Screenshot 2023-02-22 at 14.55.15.png
Il giorno mercoledì 22 febbraio 2023 alle 14:56:49 UTC+1 Nicolò Cogno ha scritto:
SOLVED: dear all, after some trial and error I managed to install Plastimatch. Here are the steps I followed, in case anyone will need it in the future:
  1. remove the DCMTK Homebrew (version 3.6.7)
  2. install DLIB using Homebrew
  3. build ITK from source with the CMake options indicated on the Plastimatch website and install the libraries (make install)
  4. git clone Plastimatch from Gitlab
  5. cd /Users/my_username/plastimatch/build and ccmake ..
  6. configure (c)
  7. set the following variables:
    • DLIB_DIR                           /usr/local/Cellar/dlib/19.24_1/lib
    • DLIB_INCLUDE_DIR         /usr/local/include/dlib
    • ITK_DIR                             /usr/local/lib/cmake/ITK-5.4
  1. configure (c) and generate (g)
  2. make -j8 -> got an error from DCMTK saying that a file could not be found
  3. cd /Users/my_username/plastimatch/build/DCMTK-build and make install (this will install the DCTMK libraries previously downloaded and built by Plastimatch, version 3.6.2)
  4. cd /Users/my_username/plastimatch/build
  5. make -j8
  6. DONE

Screenshot 2023-02-22 at 14.55.15.png

Sharp, Gregory C.

unread,
Feb 22, 2023, 9:17:07 AM2/22/23
to plast...@googlegroups.com

Wow, great!  Thank you for this.  It's hard for me to test since I don't have a mac.  -Greg

 

From: plast...@googlegroups.com <plast...@googlegroups.com> On Behalf Of Nicolò Cogno
Sent: Wednesday, February 22, 2023 9:03 AM
To: Plastimatch <plast...@googlegroups.com>
Subject: [Plastimatch] Re: macOS installation error

 

        External Email - Use Caution        

SOLVED: dear all, after some trial and error I managed to install Plastimatch. Here are the steps I followed, in case anyone will need it in the future:

  • remove the DCMTK Homebrew (version 3.6.7)
  • install DLIB using Homebrew
  • build ITK from source with the CMake options indicated on the Plastimatch website and install the libraries (make install)
  • git clone Plastimatch from Gitlab
  • cd /Users/my_username/plastimatch/build and ccmake ..
  • configure (c)
  • set the following variables:
    • DLIB_DIR                           /usr/local/Cellar/dlib/19.24_1/lib
    • DLIB_INCLUDE_DIR         /usr/local/include/dlib

·          

    • ITK_DIR                             /usr/local/lib/cmake/ITK-5.4
  • configure (c) and generate (g)
  • make -j8 -> got an error from DCMTK saying that a file could not be found
  • cd /Users/my_username/plastimatch/build/DCMTK-build and make install (this will install the DCTMK libraries previously downloaded and built by Plastimatch, version 3.6.2)
  • cd /Users/my_username/plastimatch/build
  • make -j8
  • DONE

Il giorno mercoledì 22 febbraio 2023 alle 14:56:49 UTC+1 Nicolò Cogno ha scritto:

SOLVED: dear all, after some trial and error I managed to install Plastimatch. Here are the steps I followed, in case anyone will need it in the future:

  1. remove the DCMTK Homebrew (version 3.6.7)
  2. install DLIB using Homebrew
  3. build ITK from source with the CMake options indicated on the Plastimatch website and install the libraries (make install)
  4. git clone Plastimatch from Gitlab
  5. cd /Users/my_username/plastimatch/build and ccmake ..
  6. configure (c)
  7. set the following variables:

·          

    • DLIB_DIR                           /usr/local/Cellar/dlib/19.24_1/lib
    • DLIB_INCLUDE_DIR         /usr/local/include/dlib
    • ITK_DIR                             /usr/local/lib/cmake/ITK-5.4
  1. configure (c) and generate (g)
  2. make -j8 -> got an error from DCMTK saying that a file could not be found
  3. cd /Users/my_username/plastimatch/build/DCMTK-build and make install (this will install the DCTMK libraries previously downloaded and built by Plastimatch, version 3.6.2)
  4. cd /Users/my_username/plastimatch/build
  5. make -j8
  6. DONE

 

 

--
You received this message because you are subscribed to the Google Groups "Plastimatch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to plastimatch...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/plastimatch/6a34c545-912d-44c7-9ef2-a8a6e4800e45n%40googlegroups.com.

The information in this e-mail is intended only for the person to whom it is addressed.  If you believe this e-mail was sent to you in error and the e-mail contains patient information, please contact the Mass General Brigham Compliance HelpLine at https://www.massgeneralbrigham.org/complianceline .


Please note that this e-mail is not secure (encrypted).  If you do not wish to continue communication over unencrypted e-mail, please notify the sender of this message immediately.  Continuing to send or respond to e-mail after receiving this message means you understand and accept this risk and wish to continue to communicate over unencrypted e-mail. 

Reply all
Reply to author
Forward
0 new messages