Jump to content
UltiMaker Community of 3D Printing Experts

Running Cura from source on Windows


Protopia

Recommended Posts

Posted (edited) · Running Cura from source on Windows

I am trying to set up to run Cura from source on Windows prior to submitting code changes for Cura, however I am having quite a lot of difficulty making the Wiki instructions work.

 

1. Compiled Libraries Arcus, Savitar and Charon - CMake gives a "not able to compile a simple test program" error.


Fixed by adding ` -DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_CXX_COMPILER_WORKS=1 to the CMake line:

cmake -DCMAKE_INSTALL_PREFIX=../install_dir -DPROTOBUF_SRC_ROOT_FOLDER=%PROTOBUF_SRC% -DPROTOBUF_LIBRARY=%PROTOBUF_INSTALL%/lib/libprotobuf.lib  -DPROTOBUF_INCLUDE_DIR=%PROTOBUF_INSTALL%/include -DPROTOBUF_PROTOC_EXECUTABLE=%PROTOBUF_INSTALL%/bin/protoc.exe -DBUILD_EXAMPLES=OFF -DBUILD_STATIC=ON -DMSVC_STATIC_RUNTIME=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_CXX_COMPILER_WORKS=1 -G "NMake Makefiles" ..

2. Compiled Libraries Arcus and Savitar - Having fixed the above, I get the following error in CMake:

Unable to determine default CMAKE_INSTALL_LIBDIR directory because no  target architecture is known. Please enable at least one language before including GNUInstallDirs.

I have tried adding -DCMAKE_INSTALL_LIBDIR=../install_dir/lib to the CMake command and that makes the error message go away, but I am not sure whether this was the correct fix because either way I get the following error:

 

3. Compiled Libraries Arcus, Savitar and Charon - NMake doesn't work:

NMAKE : fatal error U1064: MAKEFILE not found and no target specified
Stop.

I am now completely stuck - as I have not been able to determine how to fix these.

 

P.S. I would have updated the Wiki for point 1. if I had access to do so.

 

Note: Edited to correct that libCharon CMake works in step 2, though the others don't.

Edited by Protopia
  • Link to post
    Share on other sites

    Posted (edited) · Running Cura from source on Windows

    In case it helps here is the CMake output:

    d:\GitClones\Github\Cura\libArcus\build>cmake -DCMAKE_INSTALL_PREFIX=../install_dir -DPROTOBUF_SRC_ROOT_FOLDER=%PROTOBUF_SRC% -DPROTOBUF_LIBRARY=%PROTOBUF_INSTALL%/lib/libprotobuf.lib  -DPROTOBUF_INCLUDE_DIR=%PROTOBUF_INSTALL%/include -DPROTOBUF_PROTOC_EXECUTABLE=%PROTOBUF_INSTALL%/bin/protoc.exe -DBUILD_EXAMPLES=OFF -DBUILD_STATIC=ON -DMSVC_STATIC_RUNTIME=ON -DCMAKE_C_COMPILER_WORKS=1 -DCMAKE_CXX_COMPILER_WORKS=1 -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles" ..
    -- The C compiler identification is MSVC 19.0.24215.1
    -- The CXX compiler identification is MSVC 19.0.24215.1
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - failed
    -- Detecting C compile features
    -- Detecting C compile features - done
    -- Detecting CXX compiler ABI info
    -- Detecting CXX compiler ABI info - failed
    -- Detecting CXX compile features
    -- Detecting CXX compile features - failed
    CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.17/Modules/GNUInstallDirs.cmake:225 (message):
      Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
      target architecture is known.  Please enable at least one language before
      including GNUInstallDirs.
    Call Stack (most recent call first):
      CMakeLists.txt:4 (include)
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    CMake Warning (dev) at CMakeLists.txt:19 (set):
      implicitly converting '' to 'STRING' type.
    This warning is for project developers.  Use -Wno-dev to suppress it.
    
    -- Found Protobuf: E:\Software\Dev\Cura\protobuf-3.0.0\install_dir\/lib/libprotobuf.lib (found suitable version "3.0.0", minimum required is "3.0.0")
    -- Found Python3: C:/Program Files (x86)/Python3/python.exe (found suitable version "3.6.4", minimum required is "3.4") found components: Interpreter Development
    -- Found SIP: C:/Program Files (x86)/Python3/sip.exe (found version "4.19.22")
    -- Performing Test COMPILER_HAS_DEPRECATED_ATTR
    -- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Failed
    -- Performing Test COMPILER_HAS_DEPRECATED
    -- Performing Test COMPILER_HAS_DEPRECATED - Failed
    -- Configuring done
    -- Generating done
    -- Build files have been written to: D:/GitClones/Github/Cura/libArcus/build
    

     

    Edited by Protopia
  • Link to post
    Share on other sites

    Posted · Running Cura from source on Windows

    Hi, when I build Cura on Windows, I run this script first

    
    call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64 8.1
    
    set INSTALL_DIR=%HOMEDRIVE%%HOMEPATH%\cura\inst
    set INSTALL_DIR_UNIX=%HOMEDRIVE%/Users/%USERNAME%/cura/inst
    
    set PATH=%INSTALL_DIR%\bin;%PATH%
    set PATH=%INSTALL_DIR%\scripts;%PATH%
    set PATH=%INSTALL_DIR%;%PATH%
    
    set PYTHONPATH=%cd%\inst\lib\python3.5\site-packages
    set PATH=%cd%\inst\bin;%PATH%
    
    set CURA_BRANCH_OR_TAG=mb-master
    set CURAENGINE_BRANCH_OR_TAG=mb-master
    set URANIUM_BRANCH_OR_TAG=mb-master
    
    cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=%INSTALL_DIR_UNIX% -DCMAKE_INSTALL_PREFIX=%INSTALL_DIR_UNIX% -DBUILD_OS_WIN64=ON -DCPACK_GENERATOR=NSIS -G "NMake Makefiles" -DCURA_VERSION=mb-master ..

    Some of that is specific to my builds (mb-master branches) but the initial call to vcvarsall.bat could be useful to you?

  • Link to post
    Share on other sites

    Posted · Running Cura from source on Windows
    9 minutes ago, burtoogle said:

    Hi, when I build Cura on Windows, I run this script first

    ...

    Some of that is specific to my builds (mb-master branches) but the initial call to vcvarsall.bat could be useful to you?

     

    Thanks. I had already run that with AMD64 but not 8.1, so I tried your version and it made no difference.

     

    I am adding a Visual Studio optional component for UWA (which adds a Windows SDK and rc.exe) in case that helps. But VS setup takes hours.

  • Link to post
    Share on other sites

    Posted · Running Cura from source on Windows

    Adding the SDK didn't make any difference.

  • Link to post
    Share on other sites

    Posted · Running Cura from source on Windows

    Also now wondering whether it is an issue of 32 / 64 bit versions.

     

    I have python 32 installed (for another project) so which versions of CMAKE etc. should I install on Windows 64? 

  • Link to post
    Share on other sites

    Posted · Running Cura from source on Windows

    Otherwise having spent c. 6 hours trying to find a solution online, I am now completely stuck.

  • Link to post
    Share on other sites

    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now
    • Our picks

      • UltiMaker Cura 5.3 stable released
        In this stable release, Cura 5.3 achieves yet another huge leap forward in 3D printing thanks to material interlocking! As well as introducing an expanded recommended print settings menu and lots of print quality improvements. Not to mention, a whole bunch of new printer profiles for non-UltiMaker printers!
          • Thanks
          • Like
        • 22 replies
      • Here it is. The new UltiMaker S7
        The UltiMaker S7 is built on the success of the UltiMaker S5 and its design decisions were heavily based on feedback from customers.
         
         
        So what’s new?
        The obvious change is the S7’s height. It now includes an integrated Air Manager. This filters the exhaust air of every print and also improves build temperature stability. To further enclose the build chamber the S7 only has one magnetically latched door.
         
        The build stack has also been completely redesigned. A PEI-coated flexible steel build plate makes a big difference to productivity. Not only do you not need tools to pop a printed part off. But we also don’t recommend using or adhesion structures for UltiMaker materials (except PC, because...it’s PC). Along with that, 4 pins and 25 magnets make it easy to replace the flex plate perfectly – even with one hand.
         
        The re-engineered print head has an inductive sensor which reduces noise when probing the build plate. This effectively makes it much harder to not achieve a perfect first layer, improving overall print success. We also reversed the front fan direction (fewer plastic hairs, less maintenance), made the print core door magnets stronger, and add a sensor that helps avoid flooding.
         

         
        The UltiMaker S7 also includes quality of life improvements:
        Reliable bed tilt compensation (no more thumbscrews) 2.4 and 5 GHz Wi-Fi A 1080p camera (mounted higher for a better view) Compatibility with 280+ Marketplace materials Compatibility with S5 project files (no reslicing needed) And a whole lot more  
        Curious to see the S7 in action?
        We’re hosting a free tech demo on February 7.
        It will be live and you can ask any questions to our CTO, Miguel Calvo.
        Register here for the Webinar
          • Like
        • 18 replies
      • UltiMaker Cura Alpha 🎄 Tree Support Spotlight 🎄
        Are you a fan of tree support, but dislike the removal process and the amount of filament it uses? Then we would like to invite you to try this special release of UltiMaker Cura. Brought to you by our special community contributor @thomasrahm
         
        We generated a special version of Cura 5.2 called 5.3.0 Alpha + Xmas. The only changes we introduced compared to UltiMaker Cura 5.2.1 are those which are needed for the new supports. So keep in mind, this is not a sneak peek for Cura 5.3 (there are some really cool new features coming up) but a spotlight release highlighting this new version of tree supports.  
          • Like
        • 22 replies
    ×
    ×
    • Create New...