Armin K. wrote:
> On 01/21/2014 07:49 PM, bdu...@higgs.linuxfromscratch.org wrote:
>> Author: bdubbs
>> Date: Tue Jan 21 10:49:14 2014
>> New Revision: 10448
>>
>> Log:
>> Moved util-linux final build to be after udev.
>> Fixed up e2fsprogs and udev to use the Chapter 5 build of util-linux.
>>
>> Changed umount instructions in Chapter 9 to be compatible with
>> changes in mounting /run as a tmpfs.
>>
>> Modified:
>>     trunk/BOOK/appendices/dependencies.xml
>>     trunk/BOOK/chapter01/changelog.xml
>>     trunk/BOOK/chapter06/chapter06.xml
>>     trunk/BOOK/chapter06/e2fsprogs.xml
>>     trunk/BOOK/chapter06/systemd.xml
>>     trunk/BOOK/chapter09/reboot.xml
>>     trunk/BOOK/general.ent
>>     trunk/BOOK/packages.ent
>>
>
>
>
>>
>> Modified: trunk/BOOK/chapter06/e2fsprogs.xml
>> ==============================================================================
>> --- trunk/BOOK/chapter06/e2fsprogs.xml       Sun Jan 19 17:18:30 2014        
>> (r10447)
>> +++ trunk/BOOK/chapter06/e2fsprogs.xml       Tue Jan 21 10:49:14 2014        
>> (r10448)
>> @@ -52,7 +52,11 @@
>>
>>       <para>Prepare E2fsprogs for compilation:</para>
>>
>> -<screen><userinput remap="configure">../configure --prefix=/usr         \
>> +<screen><userinput remap="configure">export 
>> PKG_CONFIG_PATH=/tools/lib/pkgconfig
>> +
>
> Why do you export PKG_CONFIG_PATH? Can't you just use it as you used
> LIBS and CFLAGS, on the same line as ./configure? Then, you would not
> need to do any cleanup below. Also, shouldn't LIBS and CFLAGS already be
> set since pkg-config is being used?

The e2fsprogs configure doesn't use pkg-config in a consistent way.  The 
only way I found for it to complete properly with util-linux in /tools 
is what I committed.   Also, we know exactly where the libraries and 
headers are at this point in Chapter 6.  There's no need to query that.

I tried a lot of things to get this to work.  IIRC, I tried using 
PKG_CONFIG_PATH on the configure line, but something wasn't right.

If someone can get this simpler, I'm quite willing to change to that.


>> +LIBS=-L/tools/lib                  \
>> +CFLAGS=-I/tools/include            \
>> +../configure --prefix=/usr         \
>>                --with-root-prefix="" \
>>                --enable-elf-shlibs   \
>>                --disable-libblkid    \
>> @@ -61,16 +65,16 @@
>>                --disable-fsck</userinput></screen>
>>
>>       <variablelist>
>> -      <title>The meaning of the configure options:</title>
>> -<!--
>> +      <title>The meaning of the environment variable and configure 
>> options:</title>
>> +
>>         <varlistentry>
>> -        <term><parameter>PKG_CONFIG...</parameter></term>
>> +        <term><parameter>PKG_CONFIG_PATH, LIBS, CFLAGS</parameter></term>
>>           <listitem>
>> -          <para>This enables E2fsprogs to be built without requiring 
>> Pkg-config
>> -          to be built and installed first.</para>
>> +          <para>These variables enable e2fsprogs to be built using the
>> +          <xref linkend="ch-tools-util-linux"/> package built 
>> earlier.</para>
>>           </listitem>
>>         </varlistentry>
>> --->
>> +
>>         <varlistentry>
>>           <term><parameter>--with-root-prefix=""</parameter></term>
>>           <listitem>
>> @@ -127,9 +131,10 @@
>>
>>   <screen><userinput remap="install">make install</userinput></screen>
>>
>> -    <para>Install the static libraries and headers:</para>
>> +    <para>Install the static libraries and headers and do some clean 
>> up:</para>
>>
>> -<screen><userinput remap="install">make install-libs</userinput></screen>
>> +<screen><userinput remap="install">make install-libs
>> +unset PKG_CONFIG_PATH</userinput></screen>
>>
>>       <para>Make the installed static libraries writable so debugging 
>> symbols can
>>       be removed later:</para>
>>
>> Modified: trunk/BOOK/chapter06/systemd.xml
>> ==============================================================================
>> --- trunk/BOOK/chapter06/systemd.xml Sun Jan 19 17:18:30 2014        (r10447)
>> +++ trunk/BOOK/chapter06/systemd.xml Tue Jan 21 10:49:14 2014        (r10448)
>> @@ -53,7 +53,14 @@
>>
>>   <screen><userinput remap="pre">tar -xvf 
>> ../&udev-lfs;.tar.bz2</userinput></screen>
>>
>> -    <para>Compile the package:</para>
>> +    <para>Create two symbolic links to header files and set an
>> +    environment variable to properly use <xref 
>> linkend="ch-tools-util-linux"/>.</para>
>> +
>> +<screen><userinput remap="pre">ln -svf /tools/include/blkid /usr/include
>> +ln -svf /tools/include/uuid  /usr/include
>> +export LD_LIBRARY_PATH=/tools/lib</userinput></screen>
>> +
>> +    <para>Install the package:</para>
>>
>
> Can't you simply use pkg-config --cflags uuid blkid and pkg-config
> --libs uuid blkid in the makefile? It should work just fine and it's a
> nicer way.

I tried that but LD_LIBRARY_PATH is also needed for 'build/udevadm hwdb 
--update' and 'bash udev-lfs-208-2/init-net-rules.sh'.

If you can get a clean build another way, we can do that, but I tried a 
lot of things and the above is the best way I could come up with in the 
LFS Chapter 6 environment.

Note that if we are using pkg-config, we would need to set 
PKG_CONFIG_PATH=/tools/lib/pkgconfig

   -- Bruce


   -- Bruce


   -- Bruce


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

Reply via email to