Questions tagged [waf]

Waf is a Python-based framework for configuring, compiling and installing applications. It derives from the concepts of other build tools such as Scons, Autotools, CMake or Ant. If your question is about AWS WAF, use [amazon-waf] instead. If your question is about web application firewall, use [web-application-firewall] instead.

More information about the Waf project can be found at the following locations.

Help is also available:

  • on the waf-users mailing list
  • on IRC (#waf on freenode, with searchable, archived logs here).
309 questions
4
votes
3 answers

Build automation by using platform specific project files or by using project generators?

There are some build systems that are able to generate platform specific project files like Visual Studio sln,vcproj,vcxproj files or XCode xcodeproj projects under OS X. One of them is CMake but I found out that the support for this is quite…
sorin
  • 161,544
  • 178
  • 535
  • 806
4
votes
1 answer

How do you link opengl and glut using waf on osx?

I'm trying to build a C++ opengl program on osx using waf and can't to get it to work. Normally when I compile an opengl program I use this in terminal: g++ main.cpp -framework GLUT -framework OpenGL I use the following wscript: top = '.' out =…
n7down
  • 43
  • 4
4
votes
1 answer

How to determine tools chosen by waf?

How can I determine which specific tool waf chose as 'cxx_compiler' etc? Exempli gratia: def configure(ctx): print('Running ' + ctx.cmd + ' in ' + ctx.path.abspath() ) ctx.load('compiler_c') ctx.load('compiler_cxx') def build(ctx): …
nolandda
  • 2,254
  • 3
  • 17
  • 19
4
votes
3 answers

How to search for libraries/headers in custom paths using waf?

I try to search for a library and headers in a waf wscript file. Generally, that's possible with: def configure( conf ): conf.load( "compiler_cxx" ) conf.check_cxx( lib = "thelib" ) conf.check_cxx( header_name "header.hpp" ) That works fine…
stschindler
  • 937
  • 7
  • 28
4
votes
1 answer

C++ header-only library with waf

Good day, before fully migrating to waf (1.7.5), I have tried to create a simple project of this structure: wafproject ├── application │ ├── main.cpp │ └── wscript ├── library1 │ ├── foo1.hpp │ ├── foo2.hpp │ └── wscript └── wscript This…
user21919
  • 41
  • 3
4
votes
1 answer

Is there any node-waf for Node.js on windows?

I am trying to install the 'png' module from Node.js using the following command: npm install png however I am getting the following error: node-waf configure build 'node-waf' is not recognized as an internal or external command My question is: Is…
Diego
  • 327
  • 1
  • 5
  • 13
4
votes
1 answer

How to debug filesystem "access denied" errors on win32?

I'm having a hell of a time with our build scripts right now: I'm using Waf to drive our build process, and everything works great, except on Windows, where I am getting intermitent errors during builds. The errors are always basically "access…
jkp
  • 78,960
  • 28
  • 103
  • 104
3
votes
1 answer

waf cannot find an existing library

I'm trying to program a C++ module for node.js. Node is using waf as builder. I want to check on configure, if the library "sigar" exists. What I'm trying to do so: def configure(conf): conf.check_cxx(lib='sigar') When I run "node-waf…
reeaal
  • 347
  • 3
  • 14
3
votes
1 answer

How to make node-waf build binaries with debug symbols?

Running node-waf with --verbose shows it uses g++ with -g. It seems to be default. I can't find an obvious way to tell node-waf to build node.js extensions without debug symbols. Is there a straight forward way? Edit: I know how to add compiler…
Jan Deinhard
  • 19,645
  • 24
  • 81
  • 137
3
votes
1 answer

why there a .lock-wscript file after I run node-waf build

after I run node-waf configure and node-waf build, a .lock-wscript show in my folder, what's this? even I run node-waf clean, it still there. shall I keep it or remove it?
guilin 桂林
  • 17,050
  • 29
  • 92
  • 146
3
votes
1 answer

Waf: How to output a generated file?

I have a file I want to send to the build directory after it's been pushed through a python script. How would I do this in waf? For example, if I had a file like this: VERSION=%%VERSION%% DATADIR=%%DATADIR%% And wanted to replace %%VERSION%% and…
Jeff
  • 5,746
  • 4
  • 33
  • 40
3
votes
1 answer

Building fortran library with waf, installing .mod file

I use waf (http://code.google.com/p/waf/) to build a fortran library (which also uses some c-code). The corresponding wscript looks like this: def build(bld): bld( features = 'fc', source = 'fortran_interface.f90', …
imbaer
  • 554
  • 3
  • 21
3
votes
2 answers

how to install a library with a different name in waf build system?

I want to build a library with waf, but install it under a different name than the target name. It seems you can do bld.shlib(..., install_path='${PREFIX}/lib') but I need to be able to do something like: bld.shlib(...,…
Brian
  • 313
  • 2
  • 12
3
votes
1 answer

How to generate a typelib for gir file with waf

I use the following wscript_build snippet to build a vala library with its gir file: lib = bld.shlib ( features = 'c cshlib', target = 'sample', name = 'libsample', vnum = '0.0.0', vapi_dirs = '../vapi', uselib = 'GTK', cflags =…
Oliver Sauder
  • 1,124
  • 12
  • 29
3
votes
0 answers

How do I force Waf to build only for "-arch i386" target on OSX and not "-arch x86_64 -arch i386"?

Waf is adding "-arch x86_64 -arch i386" and trying to create universal binaries. Linking is failing because I only have 32 bit runtimes and Waf is trying to create a universal binary. How do I get Waf to remove "-arch x86_64 -arch i386" flags and…
HaltingState
  • 1,810
  • 1
  • 20
  • 22