Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev-libs/libbpf: Fix install in cross-compilation #28962

Closed
wants to merge 1 commit into from

Conversation

zhuyifei1999
Copy link
Contributor

@zhuyifei1999 zhuyifei1999 commented Jan 4, 2023

Without this patch install would cause:

* Bad lib64 usage detected:
drwxr-xr-x 3 root root 4.0K Jan  4 06:31 /build/target/tmp/portage/dev-libs/libbpf-1.0.1/image/usr/lib64
lrwxrwxrwx 1 root root   11 Jan  4 06:31 /build/target/tmp/portage/dev-libs/libbpf-1.0.1/image/usr/lib64/libbpf.so -> libbpf.so.1
lrwxrwxrwx 1 root root   15 Jan  4 06:31 /build/target/tmp/portage/dev-libs/libbpf-1.0.1/image/usr/lib64/libbpf.so.1 -> libbpf.so.1.0.1
-rwxr-xr-x 1 root root 889K Jan  4 06:31 /build/target/tmp/portage/dev-libs/libbpf-1.0.1/image/usr/lib64/libbpf.so.1.0.1
drwxr-xr-x 2 root root 4.0K Jan  4 06:31 /build/target/tmp/portage/dev-libs/libbpf-1.0.1/image/usr/lib64/pkgconfig
-rw-r--r-- 1 root root  294 Jan  4 06:31 /build/target/tmp/portage/dev-libs/libbpf-1.0.1/image/usr/lib64/pkgconfig/libbpf.pc
* This arch (arm) should never use 'lib64'.

PR #28323 commit bd8d3b7 (dev-libs/libbpf: Fix install in prefix") removed declaration of LIBDIR because it is default-initialized to:
LIBDIR ?= $(PREFIX)/$(LIBSUBDIR)

However this causes regression because while we do set:
export LIBSUBDIR="$(get_libdir)"

This does not take effect in the Makefile, because it does either one of:

LIBSUBDIR := lib64
LIBSUBDIR := lib

Environment variables don't take precedence over variables from makefiles unless -e is given. To minimize other possible regressions I'm explicitly whitelisting LIBSUBDIR for precedence over that from makefile.

Reported-by: Aashay Shringarpure aashay@google.com
Signed-off-by: YiFei Zhu zhuyifei@google.com

@gentoo-bot
Copy link

Pull Request assignment

Submitter: @zhuyifei1999
Areas affected: ebuilds
Packages affected: dev-libs/libbpf

dev-libs/libbpf: @chutz, @jsmolic

Linked bugs

No bugs to link found. If your pull request references any of the Gentoo bug reports, please add appropriate GLEP 66 tags to the commit message and request reassignment.

If you do not receive any reply to this pull request, please open or link a bug to attract the attention of maintainers.


In order to force reassignment and/or bug reference scan, please append [please reassign] to the pull request title.

Docs: Code of ConductCopyright policy (expl.) ● DevmanualGitHub PRsProxy-maint guide

@gentoo-bot gentoo-bot added assigned PR successfully assigned to the package maintainer(s). no bug found No Bug/Closes found in the commits. labels Jan 4, 2023
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2023-01-04 19:23 UTC
Newest commit scanned: 7a1d4f7
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/6a200392ef/output.html

Without this patch install would cause:

  * Bad lib64 usage detected:
  drwxr-xr-x 3 root root 4.0K Jan  4 06:31 /build/target/tmp/portage/dev-libs/libbpf-1.0.1/image/usr/lib64
  lrwxrwxrwx 1 root root   11 Jan  4 06:31 /build/target/tmp/portage/dev-libs/libbpf-1.0.1/image/usr/lib64/libbpf.so -> libbpf.so.1
  lrwxrwxrwx 1 root root   15 Jan  4 06:31 /build/target/tmp/portage/dev-libs/libbpf-1.0.1/image/usr/lib64/libbpf.so.1 -> libbpf.so.1.0.1
  -rwxr-xr-x 1 root root 889K Jan  4 06:31 /build/target/tmp/portage/dev-libs/libbpf-1.0.1/image/usr/lib64/libbpf.so.1.0.1
  drwxr-xr-x 2 root root 4.0K Jan  4 06:31 /build/target/tmp/portage/dev-libs/libbpf-1.0.1/image/usr/lib64/pkgconfig
  -rw-r--r-- 1 root root  294 Jan  4 06:31 /build/target/tmp/portage/dev-libs/libbpf-1.0.1/image/usr/lib64/pkgconfig/libbpf.pc
  * This arch (arm) should never use 'lib64'.

PR gentoo#28323 commit bd8d3b7 (dev-libs/libbpf: Fix install in prefix")
removed declaration of LIBDIR because it is default-initialized to:
  LIBDIR ?= $(PREFIX)/$(LIBSUBDIR)

However this causes regression because while we do set:
  export LIBSUBDIR="$(get_libdir)"

This does not take effect in the Makefile, because it does either one of:
  LIBSUBDIR := lib64
  LIBSUBDIR := lib

Environment variables don't take precedence over variables from makefiles
unless -e is given. To minimize other possible regressions I'm explicitly
whitelisting LIBSUBDIR for precedence over that from makefile.

Reported-by: Aashay Shringarpure <aashay@google.com>
Signed-off-by: YiFei Zhu <zhuyifei@google.com>
@gentoo-repo-qa-bot
Copy link
Collaborator

Pull request CI report

Report generated at: 2023-01-05 04:18 UTC
Newest commit scanned: 12565ed
Status: ✅ good

There are existing issues already. Please look into the report to make sure none of them affect the packages in question:
https://qa-reports.gentoo.org/output/gentoo-ci/12838b834f/output.html

@thesamesam
Copy link
Member

Thanks for the solid explanation!

@gentoo-bot gentoo-bot closed this in 7295d49 Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
assigned PR successfully assigned to the package maintainer(s). no bug found No Bug/Closes found in the commits.
Projects
None yet
4 participants