pushy
pushy

Reputation: 9635

Waf throwing errors on c++ builds

Our project contains a lot of c++ sources, up until now we were sing make to build everything, however this takes ages. So I stumbled upon waf, which works quite well and speeds up the build a lot. However everytime I do a full build I end up with a couple of build errors that make no sense. If I do an incremental build now, most of the time some of the sources that could not be build the first time around are build now, some others still fail. On another incremental build I will finally get a successful build.

I have tried building the separate libraries in separate steps, just in case any dependent libraries are attempted to build in parallel, but the errors still appear.

EDIT: The errors I keep getting do not seem to have anything to do with my code, e.g.

Build failed
 -> task failed (exit status -1):
        {task 10777520: c constr_SET.c -> constr_SET.c.1.o}

After another "waf build" I do not get this error anymore.

EDIT2: The build step for my libraries looks like this:

def build(bld):
  bld.shlib(source="foo.cpp bar.cpp foobar.cpp constr_SET.c",
  target="foobar",
  includes= "../ifinc",
  name="foobar",
  use="MAIN RW HEADERS",
  install_path = "lib/")

MAIN, RW, HEADERS are just some flags and external libraries we use.

Has anyone seen similar behaviour on their system? Or even a solution?

Upvotes: 0

Views: 878

Answers (1)

sehe
sehe

Reputation: 392833

I'm suspecting multiple targets are building the same required object in parallel. Try

export JOBS=1

or

 waf --jobs 1

Upvotes: 1

Related Questions