has there been a change in the cmake/devlibs build instructions?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

has there been a change in the cmake/devlibs build instructions?

alvinpenner
previously, according to the instructions at:
https://inkscape.org/en/develop/getting-started/#building-inkscape-windows
I would execute the commands:
md build
cd build
cmake -G "MinGW Makefiles" ..
mingw32-make -j 2
mingw32-make install

Now it appears that the command 'mingw32-make -j 2' is redundant, and all that is needed is the sequence:
md build
cd build
cmake -G "MinGW Makefiles" ..
mingw32-make install

I found this out by accident while trying to compile the 0.92.x branch revision 84f9b04a from July 24 on Windows XP using devlibs and cmake. All the source code got compiled twice using the original set of commands. When I deleted the build directory and removed the redundant make command, it compiled normally. The same appears to be true in trunk as well.

Alvin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: has there been a change in the cmake/devlibs build instructions?

Eduard Braun
Am 25.07.2017 um 12:53 schrieb alvinpenner:
previously, according to the instructions at:
https://inkscape.org/en/develop/getting-started/#building-inkscape-windows
I would execute the commands:
md build
cd build
cmake -G "MinGW Makefiles" ..
mingw32-make -j 2
mingw32-make install

Now it appears that the command 'mingw32-make -j 2' is redundant, and all
that is needed is the sequence:
md build
cd build
cmake -G "MinGW Makefiles" ..
mingw32-make install

I found this out by accident while trying to compile the 0.92.x branch
revision 84f9b04a from July 24 on Windows XP using devlibs and cmake. All
the source code got compiled twice using the original set of commands. When
I deleted the build directory and removed the redundant make command, it
compiled normally. The same appears to be true in trunk as well.

Alvin

Hi Alvin,

the command "mingw32-make -j 2" was always "optional":
  • if you run "mingw32-make" it will default to what cmake calls the "ALL" target (which compiles all Inkscape code)
  • if you run "mingw32-make install" it will execute the "install" target (which installs the compiled code into the inkscape/ directory)
  • as the "install" target depends on the "ALL" target: If you did not run "mingw32-make" before running "mingw32-make install" the build system will detect this and automatically compile the code for you before executing the "install" target.

Two notes:

  • running "mingw32-make" (or "mingw32-make install") any number of times in sequence should *never* compile the code more than once! mingw32-make will output status messages for all compilation stages, but a second run should be significantly faster as most source files are already compiled and the build system will not re-build them. If that's not the case for you, there's something wrong.
  • always add the "-j2" option to the install target if you did not compile your code previously¬† (i.e. "mingw32-make install -j2") otherwise you'll end up with (slow) single-threaded compilation. (The number should be set to at least the number of your CPU cores for efficient usage of resources)

Regards,
Eduard


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: has there been a change in the cmake/devlibs build instructions?

alvinpenner
thanks, I will make sure to use the command "mingw32-make install -j2" next time.

I wonder if it would be possible for someone to update the website to reflect these changes:
https://inkscape.org/en/develop/getting-started/#building-inkscape-windows

tia,
Alvin
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: has there been a change in the cmake/devlibs build instructions?

Eduard Braun
Am 25.07.2017 um 14:36 schrieb alvinpenner:
> I wonder if it would be possible for someone to update the website to
> reflect these changes:
> https://inkscape.org/en/develop/getting-started/#building-inkscape-windows

As I said (or at least meant to say) before: There were no changes. The
instructions are still valid.

Running those two commands separately is usually the right thing to do
(especially on Linux where "install" would actually install Inkscape
into system locations and you'd also need to run "uninstall" to undo
your changes). But even on Windows (and especially for new developers)
it helps to distinguish between the two steps (compiling and installing)
for clarity.

Once I find the time I'll likely update that page with instructions on
how to compile with MSYS2 which already make this clearer:
http://wiki.inkscape.org/wiki/index.php/Compiling_Inkscape_on_Windows_with_MSYS2#Building_Inkscape_with_MSYS2

Regards,
Eduard

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Inkscape-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/inkscape-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: has there been a change in the cmake/devlibs build instructions?

alvinpenner
well, it appears that the problem is unique to my old XP machine, so I apologize for the noise. This morning I tried to reproduce the duplicate compile problem on Windows 10 using the latest trunk produced the normal way using git clone and git pull, and it behaved as it should, no duplicate compile.
   on Windows XP using 0.92.x branch there was a definite duplication of compile effort, but there were a lot of unique things about that: first of all 'XP', secondly devlibs 32, thirdly the source code came from a zip file downloaded from https://gitlab.com/inkscape/inkscape/tree/0.92.x, it did not come from a git clone command (the XP machine is off-line). In any event the strange behavior was unique to only that machine and only that branch so I will not lose any sleep over it.

thanks for your hard work in this area,
Alvin
Loading...