octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: pkg() in 4.0.0-rc1 breaks building of some packages


From: Mike Miller
Subject: Re: pkg() in 4.0.0-rc1 breaks building of some packages
Date: Tue, 10 Mar 2015 09:37:54 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

On Tue, Mar 10, 2015 at 08:30:34 +0100, Olaf Till wrote:
> Thought I mention it here before making a regular bug report, since it
> might be release-critical.
> 
> Private function configure_make() of pkg() now calls 'make' with the
> '--jobs' option, enabling parallel builds. This should only be done in
> cases in which certain design rules are followed in package
> Makefiles. Currently it breaks at least building the parallel package:
> 
> I've  the following lazy, stupid, and inefficient rule in this
> Makefile, which of course should be changed, but which is nevertheless
> legal:
> 
> %.oct: %.cc
>       @MKOCTFILE@ -s -v $< sock-stream.cc
> 
> This causes sock-stream.cc to be compiled to sock-stream.o for each
> built oct-file. make --jobs .. builds the oct-files in parallel, so it
> happens that one job is just about to (over-)write sock-stream.o when
> another job uses it for linking, causing the linking to fail.
> 
> Before I supply a (trivial) patch, it should probably be decided
> whether the --jobs option should be just removed or made an option of
> pkg(), defaulting to non-parallel building.

There should be a couple of other ways to address this without changing
pkg.

As the end user, you can call `setenv OMP_NUM_THREADS 1` in the Octave
shell before doing the pkg install, that should translate to --jobs=1.
So in this sense it is already an option that the end user has control
over.

In the package Makefile, you should be able to use the .NOTPARALLEL
special target to have your build ignore the --jobs setting.

HTH,

-- 
mike



reply via email to

[Prev in Thread] Current Thread [Next in Thread]