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

Re: Bug#815247: kicad: FTBFS on kfreebsd, hurd: common/single_top.cpp:70:26: error: 'LIB_ENV_VAR' was not declared in this scope


Georges Khaznadar wrote:
> /usr/lib/python*/distutils/sysconfig.py files are part of the packages
> libpython*-stdlib; a build-dependency on libpython-stdlib should not
> harm.

I have that package already installed, so maybe something in my chroot
was out-of-date.  It is probably not kicad's fault.

> > It could be that some dependency on my system is outdated but I don't
> > know what exactly.  Maybe it won't be a problem on the buildds with
> > up-to-date sid.
> > 
> > Complicating this, the error was silently ignored until it fails later
> > with:
> Any "silent" error during the run of cmake results in inconsistencies in
> Makefiles. So it must be taken in account.

CMake returns an error code, but the build continues.  Actually, I found
this is due to using 'tee':
    cmake $(CMAKE_OPTS) ../ | tee --append buildlog-$(DATE)

'make' sees the (success) exit status of 'tee' but not the exit status
of 'cmake'.  If you remove 'tee' it will abort the build at this point,
which will save time, and make the build log easier to read.

> I agree. I had added the "tee" commands to make additional buildlogs
> when I compiled the package with not yet good enough options. It made it
> easier to find errors.
> As now the build system is almost usable, I shall remove those commands.

Thanks!  Please do that.

> > The build system also enables -j4 in places without asking, 
> Which test would you ask? Can -j4 be harmful when there are less than 4
> cores? I thought that in such a case the number of threads was
> automatically reduced, isn't it?

It will still try to run 4 jobs in parallel with only one core.  But
regardless how many cores there are, a person may want to build with -j1
or set DEB_BUILD_OPTIONS='parallel=1' for a specific reason.

For example, if there is a failure, the build log is more readable with
-j1.  If kicad overrides that with -j4, the output lines can be mixed
together.  Some architectures build with -j1 so that too many processes
don't run at the same time and use excessive memory.  Other
architectures may set a much higher -j for faster package builds if they
have many cores.

Actually, I just tested that if you don't set -j4, it will respect the
-j setting of the top-level make, which comes from dpkg-buildpackage or
DEB_BUILD_OPTIONS.  The GNU make documentation recommends using $(MAKE)
instead of just 'make', so you will probably end up with just:

        mkdir -p build
        cd build
        cmake $(CMAKE_OPTS) ../
        # no parallel build for doc: some intermediary files must be
        # built in order
        $(MAKE) -C doc -j1   $@
        # parallel build does not harm with libraries
        $(MAKE) -C library   $@
        # parallel build does not harm with i18n
        $(MAKE) -C i18n   $@

(You can still force -j1 in places where you need to, I see no problem
with that.  I'm not sure if $@ makes sense, maybe that is not needed).

Steven Chamberlain

Attachment: signature.asc
Description: Digital signature

Reply to: