" /> Status for Andrew DeFaria: April 3, 2005 - April 9, 2005 Archives

« March 27, 2005 - April 2, 2005 | Main | April 10, 2005 - April 16, 2005 »

April 8, 2005

LOS178 3.0.0

  • Merged 2.1.0 -> 2.0.0

Ah, here's the deal, according to CR 491:

Clarification on who removed the C++ libraries: Rockwell Collins distributed the official VMOS 8.4 packages without the libstdc++.a and it is not LW that removed the libstdc++.a.

Since LW doesn't build the toolchain. The C++ libraries will be taken from LynxOS 3.1.0a PPC (12000.devos.tar.gz) and package into ppc.cdksol.tar.gz the prebuilt solaris cdk. This package will get extracted before starting the build.

So then the trick is to get the appropriate ppc.cdksol.tar.gz (revision 1.3.2.1).

So then summarizing what needs to be done:

  1. Resolve the issue with arinc653drv.import (i.e. delete the file since it's marked dead)
  2. Resolve the issue with ENVIRONMENT (see below)
  3. Merge REL_LOS178_2p1p0-branch -> REL_LOS178_2p0p0_ppc_20050228 for bin-image to get the right ppc.cdksol.tar.gz.
  4. Build to insure that it builds
  5. Checkin merges

Regarding ENVIRONMENT: The conflict arise in 3 variables. The first variable, LYNXOS178_RELEASE is 2.0.0 in the old version and 2.1.0 in the new version. The new value will be 3.0.0.

The second variable is LYNXOS178_VERSION. In the old version it's 20050228 and the new version is 20050128. The new value will be today's date (20050408)

The third variable is also one of those time ones, RELEASE_TIMESTAMP. Old = "Mon Feb 28 11:00:00 2005" and New = "Fri Jan 28 11:00:00 2005". The new value will be "Fri Apr 8 11:00:00 2005".

April 7, 2005

Bluecat RH 8.0 port

This status entry is to hold a log of the issues and resolutions for getting the Bluecat build process from the ancient RH 6.1 to the a little less ancient RH 8.0.

  1. Fun with eval, echo and new shell
  2. Bug in rpm configure
  3. Static vs. Shared

Fun with eval, echo and new shell

One of the things that the Bluecat do_it script does is to define the series of "steps" that need to be performed in terms of command lines in variables. Later on the $BUILD_STEP is evaluated to determine which set of commands need to be done as follows:

echo "---- Step $BUILD_STEP started at `date` ----"
su $BUILD_CMD_OWNER -c "mkdir -p $LOGS_PREFIX/step${BUILD_STEP}"
cmd=`eval echo $"STEP${BUILD_STEP}_CMD"`
su $BUILD_CMD_OWNER -c "$cmd $*"

Effectively the name of the environment variable holding the proper command(s) for the step is composed with the echo portion. The eval statement is used to "evaluate" that environment variable thus storing the string of commands into the environment variable cmd. This works well in past versions of the OS but it fails in RH 8.0. First here's the behavior on RH 6.1:

RH6.1:export STEP1_CMD="ls /tmp"
RH6.1:export BUILD_STEP=1
RH6.1:echo $"STEP${BUILD_STEP}_CMD"
$STEP1_CMD

However hears the same commands on RH8.0:

RH8.0:export STEP1_CMD="ls /tmp"
RH8.0:export BUILD_STEP=1
RH8.0:echo $"STEP${BUILD_STEP}_CMD"
STEP1_CMD

As you can see the result is missing a $. Prepending a leading \ before the $ fixes this. Adding in the eval portion also works:

RH8.0:eval echo \$"STEP${BUILD_STEP}_CMD"
ls /tmp

However when this is assigned to another environment variable (i.e. cmd) the result is not correct:

RH8.0:cmd=`eval echo \$"STEP${BUILD_STEP}_CMD"`
RH8.0:echo $cmd
STEP1_CMD

Subsituting the syntax of $() for `

RH8.0:cmd=$(eval echo \$"STEP${BUILD_STEP}_CMD")
RH8.0:echo $cmd
ls /tmp

Note that the shell (bash) has been majorly updated for RH8.0:

RH6.1:bash -version
GNU bash, version 1.14.7(1)

Versus:

RH8.0:bash -version
GNU bash, version 2.05b.0(1)-release (i686-pc-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.

Please note that this new syntax also works flawlessly on the older RH 6.1.

Bug in rpm configure

When trying to build Bluecat on RH 8.0 and running mktools (to build the local gnutools) I get the following:

[int@europa make]$ autoreconf -f -i
autoreconf: `aclocal.m4' is updated
Makefile.am: installing `./depcomp'
WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
WARNING: and `config.h.top', to define templates for `config.h.in'
WARNING: is deprecated and discouraged.

WARNING: Using the third argument of `AC_DEFINE' and
WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
WARNING: `acconfig.h':

WARNING:   AC_DEFINE([NEED_MAIN], 1,
WARNING:             [Define if a function `main' is needed.])

WARNING: More sophisticated templates can also be produced, see the
WARNING: documentation.
autoheader-2.53: `config.h.in' is updated

Further, after running configure I get the following odd file in /usr/local/bluecat/eng/bluecat/make/.deps: remote-$(REMOTE).Po which causes the make to fail:

[int@europa make]$ make
Makefile:329: .deps/remote-stub.Po: No such file or directory
make: *** No rule to make target `.deps/remote-stub.Po'.  Stop.

Renaming .deps/remote-$(REMOTE).Po -> .deps/remote-stub.Po allows the make to proceed.

Static vs. Shared - Cannot find -lnss_dns

During the first real build step, step 2, the build fails when trying to build rpm. ld is unable to find the library nss_dns. Initial investigation shows that there is a nss_dns libs under /usr/lib as .so files but there is no .a file on RH 8.0. There is a .a file on RH 6.1 in /usr/lib. Apparently RH 8.0 no longer offers archive libraries for this. The solution to this problem is to pass -shared to gcc.

The specific gcc command line is:

int@europa tools:pwd
/var/tmp/rpm-4.2/tools
int@europa tools:gcc -Wl,--verbose -O2 -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -o rpmgraph -static rpmgraph.o  ../lib/.libs/librpm.a /var/tmp/rpm-4.2/rpmdb/.libs/librpmdb.a -L/var/tmp/rpm-4.2/zlib -L/usr/local/lib /var/tmp/rpm-4.2/rpmio/.libs/librpmio.a /var/tmp/rpm-4.2/popt/.libs/libpopt.a ../beecrypt/.libs/libbeecrypt.a -lrt -lpthread -lc -lnss_dns -lnss_files -lresolv
...
(/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libc.a)truncate64.o
(/usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libc.a)truncate.o
attempt to open /var/tmp/rpm-4.2/zlib/libnss_dns.a failed
attempt to open /usr/local/lib/libnss_dns.a failed
attempt to open /usr/lib/gcc-lib/i386-redhat-linux/3.2/libnss_dns.a failed
attempt to open /usr/lib/gcc-lib/i386-redhat-linux/3.2/../../../libnss_dns.a failed
attempt to open /usr/i386-redhat-linux/lib/libnss_dns.a failed
attempt to open /usr/lib/libnss_dns.a failed
attempt to open /usr/local/lib/libnss_dns.a failed
attempt to open /lib/libnss_dns.a failed
collect2: ld returned 1 exit status

This is probably due to the -static above. Removing -static fixes this. The question is: Is it OK to remove -static? Second question is how?

April 5, 2005

Hybrid OS

  • Checked in Hybrid OS, bin-image, toolbox and tst suite
  • Build both dev and pdn for HybridOS
  • Create packages for Hybrid OS
  • Updated ChangeSynergy

April 4, 2005

Building Bluecat on RH 8.0

  • Build local GNUTools on RH 8.0
  • Fixed bug in do_it script WRT RH 8.0

Building GNUTools on RH 8.0

When trying to build Bluecat on RH 8.0 and running mktools (to build the local gnutools) I get the following:

[int@europa make]$ autoreconf -f -i
autoreconf: `aclocal.m4' is updated
Makefile.am: installing `./depcomp'
WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
WARNING: and `config.h.top', to define templates for `config.h.in'
WARNING: is deprecated and discouraged.

WARNING: Using the third argument of `AC_DEFINE' and
WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
WARNING: `acconfig.h':

WARNING:   AC_DEFINE([NEED_MAIN], 1,
WARNING:             [Define if a function `main' is needed.])

WARNING: More sophisticated templates can also be produced, see the
WARNING: documentation.
autoheader-2.53: `config.h.in' is updated

Further, after running configure I get the following odd file in /usr/local/bluecat/eng/bluecat/make/.deps: remote-$(REMOTE).Po which causes the make to fail:

[int@europa make]$ make
Makefile:329: .deps/remote-stub.Po: No such file or directory
make: *** No rule to make target `.deps/remote-stub.Po'.  Stop.

Renaming .deps/remote-$(REMOTE).Po -> .deps/remote-stub.Po allows the make to proceed.

Fun with eval, echo and new shell

One of the things that the Bluecat do_it script does is to define the series of "steps" that need to be performed in terms of command lines in variables. Later on the $BUILD_STEP is evaluated to determine which set of commands need to be done as follows:

echo "---- Step $BUILD_STEP started at `date` ----"
su $BUILD_CMD_OWNER -c "mkdir -p $LOGS_PREFIX/step${BUILD_STEP}"
cmd=`eval echo $"STEP${BUILD_STEP}_CMD"`
su $BUILD_CMD_OWNER -c "$cmd $*"

Effectively the name of the environment variable holding the proper command(s) for the step is composed with the echo portion. The eval statement is used to "evaluate" that environment variable thus storing the string of commands into the environment variable cmd. This works well in past versions of the OS but it fails in RH 8.0. First here's the behavior on RH 6.1:

RH6.1:export STEP1_CMD="ls /tmp"
RH6.1:export BUILD_STEP=1
RH6.1:echo $"STEP${BUILD_STEP}_CMD"
$STEP1_CMD

However hears the same commands on RH8.0:

RH8.0:export STEP1_CMD="ls /tmp"
RH8.0:export BUILD_STEP=1
RH8.0:echo $"STEP${BUILD_STEP}_CMD"
STEP1_CMD

As you can see the result is missing a $. Prepending a leading \ before the $ fixes this. Adding in the eval portion also works:

RH8.0:eval echo \$"STEP${BUILD_STEP}_CMD"
ls /tmp

However when this is assigned to another environment variable (i.e. cmd) the result is not correct:

RH8.0:cmd=`eval echo \$"STEP${BUILD_STEP}_CMD"`
RH8.0:echo $cmd
STEP1_CMD

Subsituting the syntax of $() for `

RH8.0:cmd=$(eval echo \$"STEP${BUILD_STEP}_CMD")
RH8.0:echo $cmd
ls /tmp

Note that the shell (bash) has been majorly updated for RH8.0:

RH6.1:bash -version
GNU bash, version 1.14.7(1)

Versus:

RH8.0:bash -version
GNU bash, version 2.05b.0(1)-release (i686-pc-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.

Please note that this new syntax also works flawlessly on the older RH 6.1.