[Xorp-users] Build difficulties

Weaver John-JWEAVER1 John.Weaver@motorola.com
Wed, 27 Jul 2005 08:44:20 -0500


ClearCase is just a fancy CVS.  My problem is that I am new to most of the
make world, our own tool chains, and Linux (I am a VxWorks guru).  I was
defining the CXX, CC, host, and openssl parameters correctly I believe but I
think the standard includes for Linux in the XORP files are looking to
/usr/include instead of our /vobs/os/linux/include.  I need to get this
corrected and verify it is picking up the right files.  I will include the
configure below.  It appears that we are not picking up quite a few headers.
By the way we a using Monta Vista's tool chain for Linux 2.4.20 right now on
these builds.  Don't ask me why we pay so much money for Monta Vista (LOL).

Thanks,
John

 ./configure --prefix $PWD/install CC=powerpc-unk
nown-linux-gnuspe-gcc CXX=powerpc-unknown-linux-gnuspe-g++
--host=powerpc-unknown-linux-gnuspe --with-openssl=/home/imo
unce1/openssl

configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking build system type... sparc-sun-solaris2.8
checking host system type... powerpc-unknown-linux-gnuspe
checking target system type... powerpc-unknown-linux-gnuspe
checking for a BSD-compatible install... /apps/public/bin/ginstall -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets ${MAKE}... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for powerpc-unknown-linux-gnuspe-ranlib...
powerpc-unknown-linux-gnuspe-ranlib
checking for style of include used by make... GNU
checking for powerpc-unknown-linux-gnuspe-gcc...
powerpc-unknown-linux-gnuspe-gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether powerpc-unknown-linux-gnuspe-gcc accepts -g... yes
checking dependency style of powerpc-unknown-linux-gnuspe-gcc... gcc3
checking for ld used by GCC...
/vobs/vendor/os/linux/tools/solaris2.8/ppc-mot/powerpc-unknown-linux-gnuspe/
bin/ld
checking if the linker
(/vobs/vendor/os/linux/tools/solaris2.8/ppc-mot/powerpc-unknown-linux-gnuspe
/bin/ld) is GNU ld..
. yes
checking for BSD-compatible nm...
/vobs/vendor/os/linux/tools/solaris2.8/ppc-mot/powerpc-unknown-linux-gnuspe/
bin/nm -B
checking whether ln -s works... yes
loading cache /dev/null within ltconfig
config/ltconfig: .: /dev/null: not a regular file
checking for object suffix... o
checking for executable suffix... no
checking for powerpc-unknown-linux-gnuspe-gcc option to produce PIC... -fPIC
checking if powerpc-unknown-linux-gnuspe-gcc PIC flag -fPIC works... yes
checking if powerpc-unknown-linux-gnuspe-gcc supports -c -o file.o... yes
checking if powerpc-unknown-linux-gnuspe-gcc supports -c -o file.lo... yes
checking if powerpc-unknown-linux-gnuspe-gcc supports -fno-rtti
-fno-exceptions ... no
checking if powerpc-unknown-linux-gnuspe-gcc static flag -static works...
-static
checking if the linker
(/vobs/vendor/os/linux/tools/solaris2.8/ppc-mot/powerpc-unknown-linux-gnuspe
/bin/ld) is GNU ld..
. yes
checking whether the linker
(/vobs/vendor/os/linux/tools/solaris2.8/ppc-mot/powerpc-unknown-linux-gnuspe
/bin/ld) suppor
ts shared libraries... yes
checking command to parse
/vobs/vendor/os/linux/tools/solaris2.8/ppc-mot/powerpc-unknown-linux-gnuspe/
bin/nm -B output.
.. ok
checking how to hardcode library paths into programs... immediate
checking for
/vobs/vendor/os/linux/tools/solaris2.8/ppc-mot/powerpc-unknown-linux-gnuspe/
bin/ld option to reload object
 files... -r
checking dynamic linker characteristics... GNU ld.so
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... no
checking whether to build static libraries... yes
checking for objdir... .libs
creating libtool
updating cache /dev/null
checking for powerpc-unknown-linux-gnuspe-gcc... (cached)
powerpc-unknown-linux-gnuspe-gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether powerpc-unknown-linux-gnuspe-gcc accepts -g... (cached) yes
checking dependency style of powerpc-unknown-linux-gnuspe-gcc... (cached)
gcc3
checking for powerpc-unknown-linux-gnuspe-g++...
powerpc-unknown-linux-gnuspe-g++
checking whether we are using the GNU C++ compiler... yes
checking whether powerpc-unknown-linux-gnuspe-g++ accepts -g... yes
checking dependency style of powerpc-unknown-linux-gnuspe-g++... gcc3
checking how to run the C++ preprocessor... powerpc-unknown-linux-gnuspe-g++
-E
checking whether preprocessor supports GNU style variable argument macros...
yes
checking for a BSD-compatible install... /apps/public/bin/ginstall -c
checking whether ln -s works... yes
checking for powerpc-unknown-linux-gnuspe-ar...
powerpc-unknown-linux-gnuspe-ar
checking if GNU make is installed... make
checking for python2.2... python2.2
checking python version 2.0 or above... yes
checking OpenSSL installation prefix... /home/imounce1/openssl
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking openssl/md5.h usability... yes
checking openssl/md5.h presence... yes
checking for openssl/md5.h... yes
checking for MD5_Init in -lcrypto... yes
checking for library containing socket... none required
checking for library containing inet_addr... none required
checking for library containing dlopen... none required
checking for library containing hstrerror... none required
checking for tigetstr in -lcurses... no
checking for tigetstr in -lncurses... no
checking for tgetstr in -lcurses... no
checking if malloc debugging is wanted... no
checking for ANSI C header files... (cached) yes
checking sys/cdefs.h usability... yes
checking sys/cdefs.h presence... yes
checking for sys/cdefs.h... yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/linker.h usability... no
checking sys/linker.h presence... no
checking for sys/linker.h... no
checking sys/sockio.h usability... no
checking sys/sockio.h presence... no
checking for sys/sockio.h... no
checking sys/sysctl.h usability... yes
checking sys/sysctl.h presence... yes
checking for sys/sysctl.h... yes
checking sys/filio.h usability... no
checking sys/filio.h presence... no
checking for sys/filio.h... no
checking net/if_types.h usability... no
checking net/if_types.h presence... no
checking for net/if_types.h... no
checking net/if_var.h usability... no
checking net/if_var.h presence... no
checking for net/if_var.h... no
checking net/if_dl.h usability... no
checking net/if_dl.h presence... no
checking for net/if_dl.h... no
checking netinet/in_var.h usability... no
checking netinet/in_var.h presence... no
checking for netinet/in_var.h... no
checking ifaddrs.h usability... yes
checking ifaddrs.h presence... yes
checking for ifaddrs.h... yes
checking netinet/pim.h usability... no
checking netinet/pim.h presence... no
checking for netinet/pim.h... no
checking linux/rtnetlink.h usability... no
checking linux/rtnetlink.h presence... yes
configure: WARNING: linux/rtnetlink.h: present but cannot be compiled
configure: WARNING: linux/rtnetlink.h: check for missing prerequisite
headers?
configure: WARNING: linux/rtnetlink.h: proceeding with the preprocessor's
result
checking for linux/rtnetlink.h... yes
checking sys/ethernet.h usability... no
checking sys/ethernet.h presence... no
checking for sys/ethernet.h... no
checking net/ethernet.h usability... yes
checking net/ethernet.h presence... yes
checking for net/ethernet.h... yes
checking net/if_ether.h usability... no
checking net/if_ether.h presence... no
checking for net/if_ether.h... no
checking netinet/if_ether.h usability... yes
checking netinet/if_ether.h presence... yes
checking for netinet/if_ether.h... yes
checking for ether_ntoa in netinet/if_ether.h... no
checking for ether_aton in netinet/if_ether.h... no
checking for stdint.h... (cached) yes
checking for inttypes.h... (cached) yes
checking for uint8_t in <stdint.h>... yes
checking for uint16_t in <stdint.h>... yes
checking for uint32_t in <stdint.h>... yes
checking whether byte ordering is bigendian... yes
checking whether char is unsigned... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for sig_t... yes
checking for pid_t... yes
checking for size_t... yes
checking return type of signal handlers... void
checking whether socklen_t is defined... yes
checking whether struct sockaddr has field sa_len... no
checking whether struct sockaddr_in has field sin_len... no
checking whether struct sockaddr_un has field sun_len... no
checking whether struct ifreq has field ifr_ifindex... yes
checking whether struct ip_mreqn is defined... yes
checking whether struct mfcctl2 is defined... no
checking whether struct mfcctl2 has field mfcc_flags... no
checking whether struct mfcctl2 has field mfcc_rp... no
checking whether struct mf6cctl2 is defined... no
checking whether struct mf6cctl2 has field mf6cc_flags... no
checking whether struct mf6cctl2 has field mf6cc_rp... no
checking for strerror... yes
checking for getifaddrs... yes
checking for if_nametoindex... yes
checking for if_indextoname... yes
checking whether the system has IPv6 stack... no
checking whether the build environment has routing sockets (AF_ROUTE)... no
checking whether the system has key sockets (PF_KEY_V2)... no
checking for IPF support in the host's build environment... no
checking for IPFW2 support with atomic sets in the host's build
environment... no
checking for IPTABLES support in the host's build environment... no
checking for a PF firewall build environment... no
checking for /proc filesystem on Linux... yes
checking whether the build environment has netlink sockets (AF_NETLINK)...
yes
checking whether the system has ioctl(SIOCGIFCONF) interface read... no
checking whether the system has sysctl(NET_RT_IFLIST) interface read... no
checking whether the system has sysctl(NET_RT_DUMP) routing table read... no
checking ospfd platform... unsupported
OSPFD will not be built.
checking whether C compiler supports flag "-g"... yes
checking whether C++ compiler supports flag "-g"... yes
checking whether C compiler supports flag "-W"... yes
checking whether C compiler supports flag "-Wall"... yes
checking whether C compiler supports flag "-Wwrite-strings"... yes
checking whether C compiler supports flag "-Wbad-function-cast"... yes
checking whether C compiler supports flag "-Wmissing-prototypes"... yes
checking whether C compiler supports flag "-Wcast-qual"... yes
checking whether C compiler supports flag "-Wmissing-declarations"... yes
checking whether C compiler supports flag "-Werror"... yes
checking whether C compiler supports flag "-Wpointer-arith"... yes
checking whether C compiler supports flag "-Wcast-align"... yes
checking whether C compiler supports flag "-Wstrict-prototypes"... no
checking whether C compiler supports flag "-Wnested-externs"... yes
checking whether C++ compiler supports flag "-W"... yes
checking whether C++ compiler supports flag "-Wall"... yes
checking whether C++ compiler supports flag "-Wwrite-strings"... yes
checking whether C++ compiler supports flag "-Wcast-qual"... yes
checking whether C++ compiler supports flag "-Werror"... yes
checking whether C++ compiler supports flag "-Wpointer-arith"... yes
checking whether C++ compiler supports flag "-Wcast-align"... yes
checking whether C++ compiler supports flag "-Wstrict-prototypes"... yes
checking whether C++ compiler supports flag "-Woverloaded-virtual"... yes
checking whether C++ compiler supports flag "-Wtraditional"... no
checking whether C++ compiler supports flag "-ftemplate-depth-22"... yes
checking whether C compiler supports flag "-pipe"... yes
checking whether C++ compiler supports flag "-pipe"... yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating MakefileRootCheck
config.status: creating bgp/Makefile
config.status: creating bgp/harness/Makefile
config.status: creating bgp/tools/Makefile
config.status: creating cli/Makefile
config.status: creating cli/tools/Makefile
config.status: creating contrib/Makefile
config.status: creating contrib/ospfd/Makefile
config.status: creating contrib/ospfd/src/Makefile
config.status: creating contrib/ospfd/xorp/Makefile
config.status: creating docs/Makefile
config.status: creating docs/bgp/Makefile
config.status: creating docs/design_arch/Makefile
config.status: creating docs/fea/Makefile
config.status: creating docs/libxipc/Makefile
config.status: creating docs/libxorp/Makefile
config.status: creating docs/mfea/Makefile
config.status: creating docs/mld6igmp/Makefile
config.status: creating docs/multicast/Makefile
config.status: creating docs/pim/Makefile
config.status: creating docs/pim_testsuite/Makefile
config.status: creating docs/rib/Makefile
config.status: creating docs/rtrmgr/Makefile
config.status: creating docs/slides/Makefile
config.status: creating docs/slides/status_2004_02/Makefile
config.status: creating docs/snmp/Makefile
config.status: creating docs/test_harness/Makefile
config.status: creating docs/user_manual/Makefile
config.status: creating docs/xorpdev_101/Makefile
config.status: creating etc/Makefile
config.status: creating etc/templates/Makefile
config.status: creating fea/Makefile
config.status: creating fea/MakefileRootCheck
config.status: creating fea/tools/Makefile
config.status: creating fib2mrib/Makefile
config.status: creating libcomm/Makefile
config.status: creating libfeaclient/Makefile
config.status: creating libproto/Makefile
config.status: creating libxipc/Makefile
config.status: creating libxorp/Makefile
config.status: creating mld6igmp/Makefile
config.status: creating mrt/Makefile
config.status: creating pim/Makefile
config.status: creating policy/Makefile
config.status: creating policy/backend/Makefile
config.status: creating policy/common/Makefile
config.status: creating policy/test/Makefile
config.status: creating rib/Makefile
config.status: creating rib/tools/Makefile
config.status: creating rip/Makefile
config.status: creating rip/tools/Makefile
config.status: creating rtrmgr/Makefile
config.status: creating static_routes/Makefile
config.status: creating utils/Makefile
config.status: creating utils/flower_malloc/Makefile
config.status: creating xrl/Makefile
config.status: creating xrl/interfaces/Makefile
config.status: creating xrl/targets/Makefile
config.status: creating xrl/tests/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default-1 commands
config.status: executing default commands
configure: configuring in cli/libtecla
configure: running /bin/bash './configure'
--prefix=/vobs/ubs_phy_sw/ctrl/sproc/protocols/xorp/1.1/install  '--prefix' 
'/vobs/ubs_phy_sw/ctrl/sproc/protocols/xorp/1.1/install'
'CC=powerpc-unknown-linux-gnuspe-gcc' 'CXX=powerpc-unknown-lin
ux-gnuspe-g++' '--host=powerpc-unknown-linux-gnuspe'
'--with-openssl=/home/imounce1/openssl' 'host_alias=powerpc-unknow
n-linux-gnuspe' --cache-file=/dev/null --srcdir=.
configure: WARNING: If you wanted to set the --build type, don't use --host.
    If a cross compiler is detected then cross compile mode will be used.
checking for powerpc-unknown-linux-gnuspe-gcc...
powerpc-unknown-linux-gnuspe-gcc
checking for C compiler default output... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... yes
checking for suffix of executables... 
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether powerpc-unknown-linux-gnuspe-gcc accepts -g... yes
checking whether make sets ${MAKE}... yes
checking whether ln -s works... yes
checking for gawk... gawk
checking build system type... sparc-sun-solaris2.8
checking host system type... powerpc-unknown-linux-gnuspe
checking target system type... powerpc-unknown-linux-gnuspe
checking how to run the C preprocessor... powerpc-unknown-linux-gnuspe-gcc
-E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for tigetstr in -lcurses... no
checking for tigetstr in -lncurses... no
checking for tgetstr in -lcurses... no
checking for reentrant functions... yes
checking for select system call... yes
checking for SysV pseudo-terminals... yes
checking for --version-script in GNU ld... yes
configure: creating ./config.status
config.status: creating Makefile
Compiler C flags =  -g -W -Wall -Wwrite-strings -Wbad-function-cast
-Wmissing-prototypes -Wcast-qual -Wmissing-declarat
ions -Werror -Wpointer-arith -Wcast-align -Wnested-externs -pipe
Compiler C++ flags =  -g -W -Wall -Wwrite-strings -Wcast-qual -Werror
-Wpointer-arith -Wcast-align -Wstrict-prototypes 
-Woverloaded-virtual -ftemplate-depth-22 -pipe


-----Original Message-----
From: Bruce M Simpson [mailto:bms@spc.org] 
Sent: Wednesday, July 27, 2005 6:07 AM
To: Weaver John-JWEAVER1
Cc: Pavlin Radoslavov; xorp-users@xorp.org
Subject: Re: [Xorp-users] Build difficulties

On Tue, Jul 26, 2005 at 05:27:17PM -0500, Weaver John-JWEAVER1 wrote:
> I am looking into my build options again.  We are using ClearCase on 
> Sun machines so I am not sure that we are picking up the right include
files.
> Problem is compiling on SunOS for Linux on a PowerPC.  If I need to 
> have HAVE_IOCTL_SIOCGIFCONF defined then it must not be looking into 
> the correct directories.  I will have to do some looking and get back to
you.

We may be able to help you more if we know about how your cross-compiler
works; I was under the impression that ClearCase was just a CASE and SCM
suite, having narrowly avoided it whilst working for a US investment bank
here in London in another life.

The way our configure scripts are structured, if you wish to cross-compile,
you'd have to use wrappers for the toolchain which are aware of cross
compilation and get the base include directory paths right.

For example, doing a cross-compile for Win32 from FreeBSD should just be a
matter of installing the MinGW cross toolchain, setting the relevant
environment variables to point at the tools (e.g. CC, CXX, LD, CPP and so
on) and then running configure.

Getting the configure script story in order for wider cross-compilation is
something I'd like to look at eventually, but regrettably don't have time to
do so right now.

What I've done in the Windows branch (which is not yet in CVS), is to only
include config.h conditionally. This means that any preprocessor macros
which would otherwise be defined by the configure mechanism may be defined
on the compiler command line or in the environment. One reason behind this
is to accomodate the use of alternative build tools (i.e. not automake or
GNU make) at some future date.

Regards,
BMS