libbsd Makefile issues
Gene Smith
gds at chartertn.net
Tue Jun 23 18:09:16 UTC 2015
On 06/23/2015 11:28 AM, Joel Sherrill wrote:
> Hi
>
> I decided to take a look at this and spotted what I think are at least
> two mistakes but when I fixed them, I got a build error.
>
> Help appreciated:
>
> Makefile.diff attached. But it then fails like this:
>
> $ make
> i386-rtems4.11-gcc --pipe
> -B/home/joel/rtems-4.11-work/bsp-install/i386-rtems4.11/pc386/lib/
> -specs bsp_specs -qrtems -mtune=i386 -Wall -O2 -g
> -fno-strict-aliasing -ffreestanding -fno-common -Irtemsbsd/include
> -Irtemsbsd/i386/include -Ifreebsd/sys -Ifreebsd/sys/i386/include
> -Ifreebsd/sys/contrib/altq -Ifreebsd/sys/contrib/pf -Ifreebsd/include
> -Ifreebsd/lib/libc/include -Ifreebsd/lib/libc/isc/include
> -Ifreebsd/lib/libc/resolv -Ifreebsd/lib/libutil -Ifreebsd/lib/libkvm
> -Ifreebsd/lib/libmemstat -Ifreebsd/lib/libipsec -Irtemsbsd/sys
> -ImDNSResponder/mDNSCore -ImDNSResponder/mDNSShared
> -ImDNSResponder/mDNSPosix -Itestsuite/include -DHAVE_RTEMS_PCI_H=1 -Wall
> -Wno-format -MT freebsd/contrib/libpcap/scanner.o -MD -MP -MF
> freebsd/contrib/libpcap/scanner.d -std=gnu11 -D__FreeBSD__=1 -DBSD=1
> -DINET6 -D_U_="__attribute__((unused))" -DHAVE_LIMITS_H=1
> -DHAVE_INTTYPES=1 -DHAVE_STDINT=1 -DHAVE_STRERROR=1 -DHAVE_STRLCPY=1
> -DHAVE_SNPRINTF=1 -DHAVE_VSNPRINTF=1 -DHAVE_SOCKADDR_SA_LEN=1 -DHAVE
> _NET_IF_MEDIA_H=1 -DHAVE_SYS_IOCCOM_H=1 -DNEED_YYPARSE_WRAPPER=1
> -Dyylval=pcap_lval -c freebsd/contrib/libpcap/scanner.c -o
> freebsd/contrib/libpcap/scanner.o
> In file included from ../../freebsd/contrib/libpcap/scanner.l:51:0:
> freebsd/contrib/libpcap/pcap-int.h:39:23: fatal error: pcap/pcap.h: No
> such file or directory
> #include <pcap/pcap.h>
>
Here's the things I did to fix the Makefile. I think you added the
quotes (item 1) and maybe item 2. I think the error you are seeing is
due to item 3 since it can't find pcap.h.
1) Everywhere the string "-D_U_=__attribute__((unused))" appears in the
rules it needs to be quoted. It appears in almost every rule so there
are maybe 100s of them. (I used single quotes, FWIW.)
2) Everywhere sting "freebsd/usr.sbin/tcpdump/tcpdump-D__FreeBSD__=1"
appears it needs have a space inserted:
"freebsd/usr.sbin/tcpdump/tcpdump -D__FreeBSD__=1"
Quotes aren't required. Again, there a many of these.
3) Several include paths need to be added:
COMMON_FLAGS += -Ifreebsd/contrib/libpcap
COMMON_FLAGS += -Irtemsbsd/sys
COMMON_FLAGS += -Ifreebsd/usr.sbin/tcpdump/tcpdump
COMMON_FLAGS += -Ifreebsd/contrib/tcpdump
COMMON_FLAGS += -Ibuild/arm-rtems4.11-realview_pbx_a9_qemu/testsuite/include
(The last one contains the bsp name so probably needs to be more
general, but seems to work ok as an ad hoc fix.)
More information about the devel
mailing list