source: BOOK/cross-tools/common/pkg-config-lite.xml@ f9639be

clfs-3.0.0-systemd systemd
Last change on this file since f9639be was 39612b5, checked in by William Harrington <kb0iic@…>, 10 years ago

Add --host={CLFS_TARGET} during Cross tools pkg-config configure so that the <host-triplet>-pkg-config file installed to /cross-tools/bin is named properly for when cross-compiling in temp-system. Make and Util-Linux, for example, will look for <triplet>-pkg-config based on the running host (x86_64, etc) and will look for x86_64-pkg-config on the host rather than use /cross-tools/bin/pkg-config or /cross-tools/bin/{CLFS_TARGET}-pkg-config. This will fix that.

  • Property mode set to 100644
File size: 2.8 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
4 <!ENTITY % general-entities SYSTEM "../../general.ent">
5 %general-entities;
6]>
7
8<sect1 id="ch-cross-tools-pkg-config-lite" role="wrap">
9 <?dbhtml filename="pkg-config-lite.html"?>
10
11 <title>Pkg-config-lite-&pkg-config-lite-version;</title>
12
13 <indexterm zone="ch-cross-tools-pkg-config-lite">
14 <primary sortas="a-Pkg-config-lite">Pkg-config-lite</primary>
15 <secondary>cross tools</secondary>
16 </indexterm>
17
18 <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
19 href="../../final-system/common/pkg-config-lite.xml"
20 xpointer="xpointer(//*[@role='package'])"/>
21
22 <sect2 role="installation">
23 <title>Installation of Pkg-config-lite</title>
24
25 <para os="a">Several packages in the temporary system will use
26 <command>pkg-config</command> to find various required and optional
27 dependencies. Unfortunately, this could result in those packages
28 finding libraries on the host system and trying to link against them,
29 which will not work. To avoid this problem, we will install
30 a <command>pkg-config</command> binary in
31 <filename class="directory">/cross-tools</filename> and configure it so
32 that it will look for Pkg-config files only in
33 <filename class="directory">/tools</filename>.</para>
34
35 <para os="b">Prepare Pkg-config-lite for compilation:</para>
36
37<screen os="c"><userinput>./configure --prefix=/cross-tools --host=${CLFS_TARGET}\
38 --with-pc-path=/tools/lib/pkgconfig:/tools/share/pkgconfig</userinput></screen>
39
40 <variablelist os="d">
41 <title>The meaning of the new configure option:</title>
42
43 <varlistentry>
44 <term><parameter>--with-pc-path</parameter></term>
45 <listitem>
46 <para>This sets the default PKG_CONFIG_PATH to
47 <filename class="directory">/tools/lib/pkgconfig</filename> and
48 <filename class="directory">/tools/share/pkgconfig</filename>.</para>
49 </listitem>
50 </varlistentry>
51
52 <varlistentry>
53 <term><parameter>--host=${CLFS_TARGET}</parameter></term>
54 <listitem>
55 <para>This option makes sure the installation includes the proper
56 <command>{$CLFS_TARGET}-pkg-config</command> to be detected and used
57 when cross-compiling some tools in the temporary system and boot
58 chapter.</para>
59 </listitem>
60 </varlistentry>
61
62 </variablelist>
63
64 <para os="e">Compile the package:</para>
65
66<screen os="f"><userinput>make</userinput></screen>
67
68 <para os="g">Install the package:</para>
69
70<screen os="h"><userinput>make install</userinput></screen>
71
72 </sect2>
73
74 <sect2 role="content">
75 <title/>
76
77 <para>Details on this package are located in <xref
78 linkend="contents-pkg-config-lite" role="."/></para>
79
80 </sect2>
81
82</sect1>
Note: See TracBrowser for help on using the repository browser.