Jump to content

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.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 18 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...