Go to file
Thomas Petazzoni 7ae7c82dd6 package/pkg-generic.mk: also replace /lib by STAGING_DIR/lib in .la files
After the staging installation, we replace a number of paths in libtool
.la files so that those paths point to STAGING_DIR instead of a location
in the build machine.

However, we replace only paths that start with /usr. And it turns out
that the linux-pam package is configured with --libdir=/lib (linux-pam
seems to always be installed in /lib rather than /usr/lib).

Due to this, libpam.la contains the following line:

  libdir='/lib'

When building a configuration that has:

 - BR2_ROOTFS_MERGED_USR=y
 - BR2_PACKAGE_LINUX_PAM=y
 - BR2_PACKAGE_POLKIT=y

on a system that has its system-wide PAM library installed in /lib,
the build fails with:

/lib/libpam.so: file not recognized: File format not recognized

For some reason, libtool searches only in STAGING_DIR/usr/lib, but
when BR2_ROOTFS_MERGED_USR=y, STAGING_DIR/lib points to
STAGING_DIR/usr/lib, so libtool finds libpam.la. And this libpam.la
contains a bogus libdir='/lib' path. libtool then goes on, finds
/lib/libpam.so, and links with it, causing the build failure.

By doing the proper replacement of libdir='/lib', we have a correct
libpam.la, and solve the build issue.

There is no autobuilder failure associated to this issue, as it
requires /lib/libpam.so to exist. This is the case on ArchLinux, on
which Xogium reported the issue, which can also be reproduced in an
ArchLinux container.

Reported-by: Xogium <contact@xogium.me>
Cc: Xogium <contact@xogium.me>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Tested-by: Yann E. MORIN <yann.morin.1998@free.fr>
[yann.morin.1998@free.fr:
  - tested by manually creating a symlink to libpam.so in /lib
]
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
2020-04-05 23:17:26 +02:00
arch arch/arc: explicitly set "max-page-size" for GNU LD 2019-12-25 22:09:52 +01:00
board configs/nitrogen8mm: Add new defconfig 2020-03-29 16:31:11 +02:00
boot boot/syslinux: fix build of efi part with gnu-efi 3.0.10 2020-04-04 23:07:29 +02:00
configs configs/mx53loco: bump the kernel version 2020-03-31 23:25:48 +02:00
docs docs/manual: minor typo fix 2020-04-02 21:43:55 +02:00
fs fs/erofs: add support for creating EROFS rootfs image 2020-03-19 18:43:15 +01:00
linux {linux, linux-headers}: bump 4.{4, 9, 14, 19}.x / 5.{4, 5, 6}.x series 2020-04-04 17:26:53 +02:00
package package/pkg-generic.mk: also replace /lib by STAGING_DIR/lib in .la files 2020-04-05 23:17:26 +02:00
support support/testing: fix systemd test by using a more recent gcc 2020-04-05 20:32:10 +02:00
system package/systemd: make sure init choice and package have same dependencies 2020-04-05 20:33:36 +02:00
toolchain {linux, linux-headers}: add version 5.6 2020-04-02 21:05:10 +02:00
utils utils/scancpan: use two spaces indentation in hash file 2020-03-15 23:17:46 +01:00
.defconfig arch: remove support for sh64 2016-09-08 22:15:15 +02:00
.flake8 .flake8: fix check for 80/132 columns 2019-04-10 12:31:33 +02:00
.gitignore
.gitlab-ci.yml support/testing: add build tests for the syslinux bootloader 2020-04-04 23:07:36 +02:00
.gitlab-ci.yml.in gitlab-ci: use our updated docker base image 2019-10-27 21:52:28 +01:00
CHANGES Update for 2019.02.10 2020-03-16 22:46:36 +01:00
Config.in Config.in: drop BR2_NEEDS_HOST_{JAVAC,JAR} 2020-03-03 23:55:48 +01:00
Config.in.legacy package/kodi: remove optional libtheora support 2020-04-05 16:25:43 +02:00
COPYING COPYING: add exception about patch licensing 2016-02-26 19:50:13 +01:00
DEVELOPERS package/unbound: new package 2020-04-04 23:33:10 +02:00
Makefile Makefile: assemble package file lists before calling post-build scripts 2020-03-20 22:17:28 +01:00
Makefile.legacy Remove BR2_DEPRECATED 2016-10-15 23:14:45 +02:00
README

Buildroot is a simple, efficient and easy-to-use tool to generate embedded
Linux systems through cross-compilation.

The documentation can be found in docs/manual. You can generate a text
document with 'make manual-text' and read output/docs/manual/manual.text.
Online documentation can be found at http://buildroot.org/docs.html

To build and use the buildroot stuff, do the following:

1) run 'make menuconfig'
2) select the target architecture and the packages you wish to compile
3) run 'make'
4) wait while it compiles
5) find the kernel, bootloader, root filesystem, etc. in output/images

You do not need to be root to build or run buildroot.  Have fun!

Buildroot comes with a basic configuration for a number of boards. Run
'make list-defconfigs' to view the list of provided configurations.

Please feed suggestions, bug reports, insults, and bribes back to the
buildroot mailing list: buildroot@buildroot.org
You can also find us on #buildroot on Freenode IRC.

If you would like to contribute patches, please read
https://buildroot.org/manual.html#submitting-patches