Bruce Dubbs wrote:
> Armin K. wrote:

>>>> I know why is PKG_CONFIG_PATH necessarry, but I don't know why
>>>> is it necessary to do
>>>>
>>>> export PKG_CONFIG_PATH=blah
>>>> ./configure --blah
>>>> unset PKG_CONFIG_PATH
>>>>
>>>> instead of
>>>>
>>>> PKG_CONFIG_PATH=blah ./configure blah
>>>> or
>>>> ./configure blah PKG_CONFIG_PATH=blah
>>>
>>> In my test logs I have:
>>>
>>> +../e2fsck/e2fsck: error while loading shared libraries: libblkid.so.1:
>>> cannot open shared object file: No such file or directory
>>>
>>> I got this even with the export.  I'll investigate tomorrow.  It may be
>>> that I need to export LD_LIBRARY_PATH instead of PKG_CONFIG_PATH.

>> As I said in my original mail, LD_LIBRARY_PATH didn't work for me, but
>> yet I didn't export it before the build. The check script seems to set
>> LD_LIBRARY_PATH to something else.
>
> We may need to create temp symbolic links in /usr/lib for the tests. Not
> sure yet.

OK, I think I've got this figured out.  The following works in the 
chroot environment:

sed -i -e 's|^LD_LIBRARY_PATH.*|&:/tools/lib|' tests/test_config

mkdir -v build
cd build

LIBS=-L/tools/lib                    \
CFLAGS=-I/tools/include              \
PKG_CONFIG_PATH=/tools/lib/pkgconfig \
../configure --prefix=/usr           \
              --with-root-prefix=""   \
              --enable-elf-shlibs     \
              --disable-libblkid      \
              --disable-libuuid       \
              --disable-uuidd         \
              --disable-fsck
make
make -k check >> $TEST_LOG 2>&1 || true
make install
make install-libs

All tests pass and there is no need to export anything.  the key here 
was that tests/test_config was setting an explicit LD_LIBRARY_PATH 
without taking into account that it might already be set.  I just made 
LD_LIBRARY_PATH in that file explicit for our environment.

------

I also did some investigating of the difference between:

VAR=whatever program ...

and

./configure VAR=whatever ...

The first instance is a part of bash.  The shell explicitly sets VAR as 
an environment variable in the subshell created for 'program'.  In the 
second instance, configure looks for *=* (where the first * is not 
preceded by a -) and explicitly exports VAR in it's own environment.

 From what I can tell, the effect for configure is identical for both 
constructs.

   -- Bruce

-- 
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page

Reply via email to