waf build of libbsd produces no exe's (for me)
Gene Smith
gds at chartertn.net
Mon Jun 22 06:00:44 UTC 2015
I have tried to build libbsd using the documented methods from
README.waf with no success, although the Makefile method seems to work
fine. Maybe I am doing something obviously wrong in the waf command
lines that is preventing the testsuite exe's files (.e.g.,
ping01/ping01.exe) from being produced.
It was highly recommended that the Makefile build not be "mixed" with
the waf build. Therefore, I started with a pristine git clone of libbsd
before doing steps in README.waf and running waf.
Since I have successfully run the ping and netshell tests using the
Makefile build method using a customized config.inc file, I am also
attempting to use the config.inc file with the waf build. Looking at the
wscript file, it appears that only the items in config.inc that start
with NET_ are read from the file and should get included in a produced
network-config.h file (based on a network-config.in.h template).[1]
Looking at "waf --help" it is unclear how config.inc is made known to
waf (no example is in README.waf). The help says this:
--net-test-config=NET_CONFIG
Network test configuration.
Is the correct command line just like "help" says,
--net-test-config=NET_CONFIG
Or is it the actual config.inc file, .e.g.,
--net-test-config=<path-to>/config.inc ?? [2]
Also, whether this goes with the "waf configure" or the "waf [build]" is
not specified. I have tried all combinations with no different results.
Anyhow, here are the waf commands I using:
waf configure --prefix=${HOME}/rtems/install/4.11/bsps \
--rtems=${HOME}/rtems/install/4.11/bsps \
--rtems-tools=${HOME}/rtems/install/4.11/tools \
--rtems-bsps=arm/realview_pbx_a9_qemu \
--net-test-config=./config.inc <-- same w/ or w/o this
The configure runs successfully like so:
Setting top to : /home/gene/rtems/rtems-libbsd
Setting out to :
/home/gene/rtems/rtems-libbsd/build
Architectures : arm-rtems4.11
Board Support Package :
arm-rtems4.11-realview_pbx_a9_qemu
Checking for program 'arm-rtems4.11-gcc' :
/home/gene/rtems/install/4.11/tools/bin/arm-rtems4.11-gcc
Checking for program 'arm-rtems4.11-g++' :
/home/gene/rtems/install/4.11/tools/bin/arm-rtems4.11-g++
Checking for program 'arm-rtems4.11-gcc' :
/home/gene/rtems/install/4.11/tools/bin/arm-rtems4.11-gcc
Checking for program 'arm-rtems4.11-ld' :
/home/gene/rtems/install/4.11/tools/bin/arm-rtems4.11-ld
Checking for program 'arm-rtems4.11-ar' :
/home/gene/rtems/install/4.11/tools/bin/arm-rtems4.11-ar
Checking for program 'arm-rtems4.11-ar' :
/home/gene/rtems/install/4.11/tools/bin/arm-rtems4.11-ar
Checking for program 'arm-rtems4.11-ld' :
/home/gene/rtems/install/4.11/tools/bin/arm-rtems4.11-ld
Checking for program 'arm-rtems4.11-nm' :
/home/gene/rtems/install/4.11/tools/bin/arm-rtems4.11-nm
Checking for program 'arm-rtems4.11-objdump' :
/home/gene/rtems/install/4.11/tools/bin/arm-rtems4.11-objdump
Checking for program 'arm-rtems4.11-objcopy' :
/home/gene/rtems/install/4.11/tools/bin/arm-rtems4.11-objcopy
Checking for program 'arm-rtems4.11-readelf' :
/home/gene/rtems/install/4.11/tools/bin/arm-rtems4.11-readelf
Checking for program 'arm-rtems4.11-strip' :
/home/gene/rtems/install/4.11/tools/bin/arm-rtems4.11-strip
Checking for program 'rtems-ld' :
/home/gene/rtems/install/4.11/tools/bin/rtems-ld
Checking for program 'rtems-tld' :
/home/gene/rtems/install/4.11/tools/bin/rtems-tld
Checking for program 'rtems-bin2c' :
/home/gene/rtems/install/4.11/bsps/bin/rtems-bin2c
Checking for program 'tar' : /usr/bin/tar
Checking for program 'gcc, cc' :
/home/gene/rtems/install/4.11/tools/bin/arm-rtems4.11-gcc
Checking for program 'ar' :
/home/gene/rtems/install/4.11/tools/bin/arm-rtems4.11-ar
Checking for program 'g++, c++' :
/home/gene/rtems/install/4.11/tools/bin/arm-rtems4.11-g++
Checking for program 'gas, gcc' :
/home/gene/rtems/install/4.11/tools/bin/arm-rtems4.11-gcc
Checking for RTEMS headers : ok
Checking for RTEMS_DEBUG : no
Checking for RTEMS_MULTIPROCESSING : no
Checking for RTEMS_NEWLIB : yes
Checking for RTEMS_POSIX_API : yes
Checking for RTEMS_SMP : no
Checking for RTEMS_NETWORKING : no
Checking for RTEMS_ATOMIC : no
Checking for header dlfcn.h : yes
Checking for header rtems/pci.h : yes
'configure' finished successfully (0.876s)
waf --net-test-config=./config.inc <-- same w/ or w/o this
The build runs seemingly successfully with 842 steps:
Waf: Entering directory
`/home/gene/rtems/rtems-libbsd/build/arm-rtems4.11-realview_pbx_a9_qemu'
[ 1/842] Compiling testsuite/include/rtems/bsd/test/network-config.h.in
[ 2/842] Compiling rtemsbsd/rtems/generate_kvm_symbols
[ 3/842] Compiling
build/arm-rtems4.11-realview_pbx_a9_qemu/rtemsbsd/rtems/rtems-kvm-symbols.c
[ 4/842] Compiling freebsd/lib/libc/net/nslexer.c
[ 5/842] Compiling freebsd/lib/libipsec/policy_token.c
[ 6/842] Compiling freebsd/contrib/libpcap/scanner.c
:
:
[808/842] Compiling testsuite/ping01/test_main.c
[809/842] Compiling testsuite/usb01/init.c
[810/842] Compiling testsuite/usb01/test-file-system.c
[811/842] Compiling testsuite/arphole/test_main.c
[812/842] Compiling testsuite/sleep01/test_main.c
[813/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/libbsd.a
[814/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/netshell01
[816/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/unix01
[819/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/sleep01
[819/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/syscalls01
[819/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/zerocopy01
[820/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/loopback01
[822/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/usb01
[822/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/vlan01
[822/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/dhcpcd01
[823/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/ppp01
[824/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/rwlock01
[825/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/ftpd01
[826/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/swi01
[827/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/dhcpcd02
[828/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/foobarclient
[829/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/telnetd01
[830/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/mutex01
[831/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/arphole
[832/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/media01
[833/842] Linking
build/arm-rtems4.11-realview_pbx_a9_qemu/selectpollkqueue01
[834/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/smp01
[835/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/thread01
[836/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/init01
[837/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/ping01
[838/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/lagg01
[839/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/condvar01
[840/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/foobarserver
[841/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/timeout01
[842/842] Linking build/arm-rtems4.11-realview_pbx_a9_qemu/commands01
Waf: Leaving directory
`/home/gene/rtems/rtems-libbsd/build/arm-rtems4.11-realview_pbx_a9_qemu'
'build-arm-rtems4.11-realview_pbx_a9_qemu' finished successfully (45.967s)
waf install
Install seems to run OK installing lib and many headers into
+ install
/home/gene/rtems/install/4.11/bsps/arm-rtems4.11/realview_pbx_a9_qemu/lib/
So there are no errors flagged in the build processing using waf but
file network-config.h is never produces and no tests are produced in the
testsuite area, e.g., no ping01.exe. Although they seemed to be compiled
and linked, the tests are maybe never installed? Is there another step I
am missing here?
Can someone tell me what I am doing wrong or provide complete example
waf command lines that do a full build that produce the testsuite .exe's.
-gene
[1] I have also edited config.inc to so it *only* contains the network
items with no different result.
[2] When I use NET_CONFIG as the "help" indicates I see the error
"network configuraiton 'NET_CONFIG' not found" when I do the waf build step.
More information about the users
mailing list