GD Packaging
- Updated package script for GD to include new functionality
" />
« March 2005 | Main | May 2005 »
Performed the following functions:
Question: Should this tag be added to TagsLog or are DEV tags not to be documented in TagsLog.
There were a few problems with this port:
An outstanding issue is that if /usr/local/ssl exists on the build machine, openssl attempts to build itself. It should be using $ENV_PREFIX but it isn't. This problem was not detected in LOS178 because nothing in openssl was being used (and, again, if /usr/local/ssl is not there the the build process doesn't even attempt to build openssl).
Building BC 5.3 on RH 8.0 failed in step 3 with the following in build_ncurses.log:
+ zcat /build/bluecat/build/20050319/cdt/src/bluecat/SOURCES/patch-5.3-20021231.sh.gz + sh sh: line 2196: uudecode: command not found gzip: ncurses-5.3-20021231.patch.gz: No such file or directory + echo 'Patch #2 (ncurses-5.3-20030105.patch.gz):' + /bin/gzip -dc /build/bluecat/build/20050319/cdt/src/bluecat/SOURCES/ncurses-5.3-20030105.patch.gz + patch -p1 -s patch: **** aborted error: Bad exit status from /build/bluecat/build/20050319/var/tmp/rpm-tmp.56417 (%prep) Bad exit status from /build/bluecat/build/20050319/var/tmp/rpm-tmp.56417 (%prep)
Turns out uudecode is part of sharutils-4.2.1-12 which I downloaded and installed. This should be added to the required package list.
Sasha's only advice was to uncomment a line in the glibc_cdt.spec file that gunzip's these info files. I had seen that before. I did this and restarted a stepwise build @ step 3. I suspect, however, that were I to backtrack to step 1 or so this hack would be overwritten
Meantime BC development goes on to BC 5.3. Sasha sent a PDF file with instructions for building. Looks like they've incorporated some of the changes I suggested (fixing mktools to be part of step one as well as the patch spec). Unfortunately they have not incorporated the fix for RH 8.0 to the do_it script.
Still the build is progressing fairly nicely and it looks as if they've also reduced the number of steps from 17 -> 13 (though do_it still described steps > 13).
I had made a change or two to do_it essentially removing the su $BUILD_CMD_USER as that causes me problems and utilizing sudo around the mount commands in steps 7 and 11. I have configured Europa such that int has passwordless sudo privileges.
According to Sasha I downloaded a copy of glibc-2.2.93.5.src.rpm. Next I modified the spec file to include --enable-static-nss=yes. In attempting to rebuild using rpmbuild -bb I received notice that I had to get and install gd-devel-1.8.4-9.i386.rpm and libpng-devel-1.2.2-8.i386.rpm. After that the rpmbuild worked OK and I copied the libraries like so:
$ cp /usr/src/redhat/BUILD/glibc-2.2.93/build-i386-linux/resolv/libnss_dns.a /usr/lib/libnss_dns.a $ cp /usr/src/redhat/BUILD/glibc-2.2.93/build-i385-linux/nss/libnss_files.a /usr/lib/libnss_files.a
The build is still failing in step3. Specifically I see lines like the following at the end of build_glibc.log:
rpm-tmp.51419 line 27:cp -pr documentation/ChangeLog.1.gz documentation/ChangeLog.10.gz documentation/ChangeLog.11.gz documentation/ChangeLog.12.gz documentation/ChangeLog.13.gz documentation/ChangeLog.2.gz documentation/ChangeLog.3.gz documentation/ChangeLog.4.gz documentation/ChangeLog.5.gz documentation/ChangeLog.6.gz documentation/ChangeLog.7.gz documentation/ChangeLog.8.gz documentation/ChangeLog.9.gz documentation/ChangeLog.gz documentation/ChangeLog.threads.gz documentation/Changes.threads documentation/FAQ-threads.html documentation/README.threads documentation/README.timezone documentation/README.ufc-crypt documentation/examples.threads /build/bluecat/build/20050319/var/tmp/glibc-2.3.2-root/usr/share/doc/glibc_cdt-common-2.3.2 rpm-tmp.51419 line 28:exit 0 File not found: /build/bluecat/build/20050319/var/tmp/glibc-2.3.2-root/cdt/share/info/libc.info File not found: /build/bluecat/build/20050319/var/tmp/glibc-2.3.2-root/cdt/share/info/libc.info-1 File not found: /build/bluecat/build/20050319/var/tmp/glibc-2.3.2-root/cdt/share/info/libc.info-10 File not found: /build/bluecat/build/20050319/var/tmp/glibc-2.3.2-root/cdt/share/info/libc.info-11 File not found: /build/bluecat/build/20050319/var/tmp/glibc-2.3.2-root/cdt/share/info/libc.info-12 ...
When I look to see what's in that path I do see libc.info files (libc.info, libc.info-1, libc.info-10, etc.) but they are all gzipped (i.e. libc.info -> libc.info.gz, libc.info-10 -> libc.info-10.gz). My only suspicion is that something in this process changed to use gzip files and some other portion of this process is looking for the unzipped files.
As this appears to be dynamically created, I cannot simply unzip these files and continue on from this point. What should I do?
I have also been trying to perform the rpmbuild in steps (-bp, -bc, etc) to no avail. I've even tried to keep these .gz files around and place them in place so that the build/install can continue but then down the line I get problems like:
+ install -m 644 /build/bluecat/build/20050319/cdt/src/bluecat/SOURCES/nsswitch.conf /build/bluecat/build/20050319/var/tmp/glibc-2.3.2-root/cdt/etc/nsswitch.conf install: cannot stat `/build/bluecat/build/20050319/cdt/src/bluecat/SOURCES/nsswitch.conf': No such file or directory error: Bad exit status from /build/bluecat/build/20050319/var/tmp/rpm-tmp.44405 (%install)
This is obviously not the right way to do this. I should wait from word from Moscow before preceeding.
Received a response from Alexander. Seems Bluecat relies on autoconf-2.13. Found a package on the web and installed it.
Sasha also speaks of rebuilding glibc in order to get an archive version of libnss_dns and libnss_files. I've already copied these from Jaguar (RH 6.1).
Restarted Bluecat build in a non stepwise fashion. This should be interesting.
In step 3 of the build process a build of glibc continues to fail. In debugging this I got down to:
/build/bluecat/build/20050319/cdt/bin/rpmbuild -ba --rmsource --clean /usr/src/bluecat/packages/glibc/SPECS/glibc_cdt.spec --bluecat_cdt=i386-bluecat-linux
This rpmbuild command is building both source and binary rpms and effectively goes through a building process. After a long time it eventually fails with:
RPM build errors: File not found: /build/bluecat/build/20050319/var/tmp/glibc-2.3.2-root/cdt/\ share/info/libc.info File not found: /build/bluecat/build/20050319/var/tmp/glibc-2.3.2-root/cdt/\ share/info/libc.info-1 File not found: /build/bluecat/build/20050319/var/tmp/glibc-2.3.2-root/cdt/\ share/info/libc.info-10 ...
Looking in /build/bluecat/build/20050319/var/tmp/glibc-2.3.2-root/cdt/share/info I do see those files but they are gzipped (end in .gz). The rpmbuild command therefore returns a non zero status and due to bad error handling it looks as if the failure is somewhere else, but no it's here.
Also it seems like this directory, or at least the "var/tmp" portion of the path seems to indicate that this is a temporary directory, perhaps created by the rpmbuild itself so I'm not sure if simply unzipping the files will make this rpmbuild succeed or not.
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:
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".
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.
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 $( Note that the shell (bash) has been majorly updated for RH8.0: Versus: Please note that this new syntax also works flawlessly on the older RH 6.1. When trying to build Bluecat on RH 8.0 and running mktools (to build the local gnutools) I get the following: 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: Renaming .deps/remote-$(REMOTE).Po -> .deps/remote-stub.Po allows the make to proceed. 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: 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?
RH8.0:cmd=$(eval echo \$"STEP${BUILD_STEP}_CMD")
RH8.0:echo $cmd
ls /tmp
RH6.1:bash -version
GNU bash, version 1.14.7(1)
RH8.0:bash -version
GNU bash, version 2.05b.0(1)-release (i686-pc-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.
Bug in rpm configure
[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
[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.
Static vs. Shared - Cannot find -lnss_dns
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
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.
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 $( Note that the shell (bash) has been majorly updated for RH8.0: Versus: Please note that this new syntax also works flawlessly on the older RH 6.1.
RH8.0:cmd=$(eval echo \$"STEP${BUILD_STEP}_CMD")
RH8.0:echo $cmd
ls /tmp
RH6.1:bash -version
GNU bash, version 1.14.7(1)
RH8.0:bash -version
GNU bash, version 2.05b.0(1)-release (i686-pc-linux-gnu)
Copyright (C) 2002 Free Software Foundation, Inc.
Some setup issues. Had to get int to be able to rsh without a password to t3. Additionally cvs was not being found once the rsh to t3 was working. This was because the PATH was merely /usr/bin. Tried for a long time to get rsh to execute int's ~/.bashrc but it wouldn't. Turns out the problem was the int's shell on t3 was not set to bash in /etc/passwd.
Additionally make sure you set CVSROOT=:ext:int@t3:/cm/CVS! I think I'll put this in int@europa's ~/.bashrc!