[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Problems Building Test Suite in LSB Development Environment

While doing some tests on the LSB development environment (lsbdev) and the
LSB test suites, I thought I would try building and executing the test
suites within lsbdev. It seems like this would be a good check of lsbdev to
see if it has everything necessary to build a large application. In doing
this I ran into a few problems. Here are some of the things I saw. All of
these occurred when running /home/tet/setup.sh while in the lsbdev chroot
environment as the vsx0 user.

1. Cannot find some commands from the /sbin directory

The following error messages were generated when trying to create and
configure the loopback device in the
/home/tet/test_sets/scripts/common/loopback_setup.sh script:

     bash : mke2fs: command not found
     bash : tune2fs: command not found
     bash : losetup: command not found

These command could not be found because the /sbin directory is not bind
mounted by lsbdev. To work around this problem I simply mounted /sbin
within the chroot environment with the following commands:

     mkdir /var/lib/lsbdev/root/sbin
     mount -o ro --bind /sbin /var/lib/lsbdev/root/sbin

2. Could not install pseudo languages

The following error messages were generated when trying to install
pseudolanguages in the /home/tet/test_sets/scripts/common/psl_setup.sh:

     localedef -c -f lang0.ascii -i lang0.src VSX4L0
     cannot open locale definition file `POSIX' : No such file or directory
     make: *** [VSX4L0] Error 4

The localedef command fails because the POSIX locale cannot be located. The
locale is in the /usr/share/i18n/locale directory, which is not bind
mounted by lsbdev. Also, when the pseudolanguages get created, they need to
be written into the /usr/lib/locale directory, so lsbdev needs to mount
this directory in read-write mode. The work around the pseudolanguage
problems I used the following commands:

     mkdir -p /var/lib/lsbdev/root/usr/share/i18n/locale
     mkdir -p /var/lib/lsbdev/root/usr/lib/locale
     mount -o ro --bind /usr/share/i18n/locales
     mount --bind /usr/lib/locale /var/lib/lsbdev/root/usr/lib/locale

3. Cannot make the chmog command from the vtools directory

The following error messages were generated when trying to make all the
commands in the /home/tet/test_sets/SRC/common/vtools directory:

     Executing make in SRC/common/vtools
     vtools make failed:
     make[1]: Entering directory `/home/tet/test_sets/SRC/common/vtools'
     /usr/bin/cc -I../../INC -I../../SYSINC -D_XOPEN_SOURCE=500 -ansi -c -o
cs_arc.o cs_arc.c
     /usr/bin/cc -o cs_arc cs_arc.o ../../LIB/genlib.a ../../LIB/vlib.a
     cs_arc made
     cp cs_arc ../../BIN/cs_arc
     chown vsx0 ../../BIN/cs_arc
     chgrp vsxg0 ../../BIN/cs_arc
     chmod 755 ../../BIN/cs_arc
     /usr/bin/cc -I ../../INC -I../../SYSINC -D_XOPEN_SOURCE=500 -ansi -c
-o chmog.o chmog.c
     /usr/bin/cc -I ../../INC -I../../SYSINC -D_XOPEN_SOURCE=500 -ansi -c
-o chmog_c.o chmog_c.c
     /usr/bin/cc -o chmog chmog.o chmog_c.o ../../LIB/genlib.a
../../LIB/vlib.a ../../LIB/vport.a
     ../../LIB/vport.a(userintf.o): In function `mnt_rw':
     userintf.o(.text+0x15a): undefined reference to `mount'
     userintf.o(.text+0x1b4): undefined reference to `mount'
     ../../LIB/vport.a(userintf.o): In function `mnt_ro':
     userintf.o(.text+0x1ea): undefined reference to `mount'
     userintf.o(.text+0x244): undefined reference to `mount'
     ../../LIB/vport.a(userintf.o): In fuction `unmnt':
     userintf.o(.text+0x26a): undefined reference to `umount'
     collect2: ld returned 1 exit status
     make[1]: *** [chmog] Error 1
     make[1]: Leaving directory `/home/tet/test_sets/SRC/common/vtools'

The problem appears to be caused by the mount and umount APIs not being
present in the stub libraries of lsbdev since they are not defined by the
LSB. I was not able to work around these problems, so I did not make it any
further in building and executing the test suite within the lsbdev
environment. I am not sure, but I think these problems can be overcome by
having the commands in the vtools directory statically link to the system
libc which will have the mount and umount APIs.

If we can resolve the problems listed above and get the test suite to build
and execute within lsbdev it will be a good validation of both the tests
and lsbdev.


Marvin Heffler
Linux Standard Base and ISV Developer Kit
IBM Linux Technology Center
11400 Burnet Road, Zip 908-1A33
Austin, TX 78758
(512) 838-0953    T/L 678-0953

Reply to: