Does anybody understand waf's linking libraries?

Hal Murray hmurray at
Wed Sep 4 06:42:28 UTC 2019

I think I have figured out the big picture.  PLATFORM_INCLUDES and 
PLATFORM_LIBPATH are our variables rather than something waf knows about.  (I 
downloaded both source and book for waf, no hits.)

PLATFORM_LIBPATH is write only.

-bash-5.0$ grep PLATFORM_LIBPATH . -r
./bob2/c4che/ = ['/usr/lib']
./wscript:        ctx.env.PLATFORM_LIBPATH = ["/usr/local/lib"]
./wscript:        ctx.env.PLATFORM_LIBPATH = ["/usr/lib", "/usr/pkg/lib"]
./wscript:        ctx.env.PLATFORM_LIBPATH = ["/usr/lib"]
./wscript:            ctx.env.PLATFORM_LIBPATH = ["/opt/local/lib"]

PLATFORM_INCLUDES is used occasionally in places like this in ntpd/wscript:
        includes=[ctx.bldnode.parent.abspath(), "../include", "../libaes_siv"] 

I think all we have to do is fill in the places where PLATFORM_LIBPATH should 
get used.


Ahh...  I found some documentation for things like INCLUDES_NTPD
I'm guessing that PLATFORM_xxx is leftover from previous versions of waf.

In the waf book:
  10.3.3. Foreign libraries and flags

After removing the PLATFORM_ current problem is:
        -lcrypto.1.0.0 => not found
        -lssl.1.0.0 => not found
        -lm.0 => /usr/lib/

What flags do I have to add to the link step to get it to remember where it 
found the library files?


ctx.env.LINKFLAGS_NTPD looks unused.
same for ctx.env.CFLAGS_bin

These are my opinions.  I hate spam.

More information about the devel mailing list