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

[BUGZILLA #17744] pkg-config file should not contain user's LDFLAGS #6918

Open
MichaelChirico opened this issue May 19, 2020 · 0 comments
Open

Comments

@MichaelChirico
Copy link
Owner

When building the pkg-config file for libR in src/unix/Makefile.in, the following stanza,

install-pc:
@$(MKINSTALLDIRS) "$(DESTDIR)$(libdir)/pkgconfig"
-@$(SED) -e "s:@RHome:$(rhome):"
-e "s:@rincludedir:$(rincludedir):"
-e "s:@rarch:$(R_ARCH):"
-e 's:@libsprivate:$(STATIC_LIBR_PC):'
-e 's:@Others:$(MAIN_LDFLAGS) $(LDFLAGS):'
-e 's/@VERSION/$(VERSION)/' $(srcdir)/libR.pc.in \

"$(DESTDIR)$(libdir)/pkgconfig/libR.pc"

combines MAIN_LDFLAGS with LDFLAGS and sticks it into the "Libs" field of the resulting libR.pc file. That's not what you want: LDFLAGS contains the user's linker flags at this point, i.e. whatever they have in their environment variable. This was reported in

https://bugs.gentoo.org/515428

and fixed by

https://gitweb.gentoo.org/repo/gentoo.git/tree/dev-lang/R/files/R-3.6.2-no-LDFLAGS-in-libR-pkg-config.patch

If you dig into "man pkg-config", you can eventually deduce that "pkg-config --libs" should output

all linker flags required to link the packages on the command line,
including flags for all their dependencies

Whatever the user has in LDFLAGS is superfluous to that, and can cause problems besides.


METADATA

  • Bug author - Michael Orlitzky
  • Creation time - 2020-03-25 21:57:27 UTC
  • Bugzilla link
  • Status - UNCONFIRMED
  • Alias - None
  • Component - Installation
  • Version - R 3.6.xx
  • Hardware - Other Linux
  • Importance - P5 enhancement
  • Assignee - R-core
  • URL -
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant