Bug 8589 - Bootstrap packages get wrong pkg-config information
Summary: Bootstrap packages get wrong pkg-config information
Status: NEW
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Build system (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.19.0
Assignee: Pierre Ossman
URL:
Keywords:
Depends on:
Blocks: 8361
  Show dependency treegraph
 
Reported: 2025-05-15 08:38 CEST by Pierre Ossman
Modified: 2025-05-15 09:14 CEST (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2025-05-15 08:38:31 CEST
Packages that are built as part of the bootstrapping (before we have a working chroot) will be built incorrectly if they rely on pkg-config. Either failing, or producing the wrong result.


The problem is that the only special setup we do during bootstrapping is to alter $PATH. That means that our gcc and binutils are used instead of the system's.

For programs that test things via the compiler, this is sufficient. But programs that look for dependencies via pkg-config will use the system's pkg-config, and get the wrong results.



E.g., if ncurses-devel is installed on the host, then util-linux will find that and fail:

> /bin/sh ./libtool  --tag=CC   --mode=link i686-pc-linux-gnu-gcc -fsigned-char -fno-common -Wall -Werror=sequence-point -Wextra -Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes -Wno-missing-field-initializers -Wredundant-decls -Wsign-compare -Wtype-limits -Wuninitialized -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-parameter -Wunused-result -Wunused-variable -Wnested-externs -Wpointer-arith -Wstrict-prototypes -Wimplicit-function-declaration -O2 -g  -g -o dmesg sys-utils/dmesg-dmesg.o lib/dmesg-monotonic.o  libcommon.la libtcolors.la -lrt 
> libtool: link: i686-pc-linux-gnu-gcc -fsigned-char -fno-common -Wall -Werror=sequence-point -Wextra -Wmissing-declarations -Wmissing-parameter-type -Wmissing-prototypes -Wno-missing-field-initializers -Wredundant-decls -Wsign-compare -Wtype-limits -Wuninitialized -Wunused-but-set-parameter -Wunused-but-set-variable -Wunused-parameter -Wunused-result -Wunused-variable -Wnested-externs -Wpointer-arith -Wstrict-prototypes -Wimplicit-function-declaration -O2 -g -g -o dmesg sys-utils/dmesg-dmesg.o lib/dmesg-monotonic.o  ./.libs/libcommon.a ./.libs/libtcolors.a -ltinfo -lrt
> /opt/cendio-build/arch/i386/usr/bootstrap/lib/gcc/i686-pc-linux-gnu/5.5.0/../../../../i686-pc-linux-gnu/bin/ld: cannot find -ltinfo
> collect2: error: ld returned 1 exit status


We need to provide some mechanism to redirect pkg-config to our stuff.

Note You need to log in before you can comment on or make changes to this bug.