Opened 11 months ago

Last modified 7 weeks ago

#29779 new enhancement

pkg-config installed from SPKG pkgconf should not depend on environment variable SAGE_LOCAL

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-9.4
Component: packages: standard Keywords: sd111
Cc: mjo Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

(from #29411)

Change History (7)

comment:1 Changed 10 months ago by mkoeppe

  • Cc mjo added

comment:2 Changed 10 months ago by mjo

It looks like we can specify the *.pc file location at build time using --with-pkg-config-dir:

https://github.com/pkgconf/pkgconf/blob/master/configure.ac

Afterwards, we can probably just symlink pkgconf to "pkg-config", and then rely on PATH to choose the right one.

comment:3 Changed 10 months ago by mjo

src/bin/sage-env already prepends the sage-specific *.pc file path to PKG_CONFIG_PATH in case the system pkg-config is used. From pkgconf's spkg-configure.m4:

AS_IF([test -z "$ac_cv_path_PKGCONF"], [
   sage_spkg_install_pkgconf=yes
   AC_SUBST(SAGE_PKG_CONFIG_PATH, [''])
   AC_MSG_RESULT([installing pkgconf spkg])], [
dnl the following as needed as long as Sage creates .pc files during build and/or configure
   AC_SUBST(SAGE_PKG_CONFIG_PATH, ['$SAGE_LOCAL/lib/pkgconfig'])
   AC_MSG_RESULT([using pkg-config from the system])
])

Then in sage-env,

if [ -n "$SAGE_PKG_CONFIG_PATH" ]; then
    # set up external pkg-config to look into SAGE_LOCAL/lib/pkgconfig/
    # (Sage's pkgconf spkg takes care of this, if installed)
    export PKG_CONFIG_PATH="$SAGE_PKG_CONFIG_PATH${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
fi

So we "shouldn't" be hurt by ditching the pkgconf wrapper script and hard-coding the full list of paths into pkgconf at build time.

comment:4 Changed 10 months ago by mkoeppe

Sounds right to me

comment:5 Changed 7 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:6 Changed 5 months ago by mkoeppe

  • Keywords sd111 added

Hoping we can make progress on this ticket this week - https://wiki.sagemath.org/days111

comment:7 Changed 7 weeks ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

Sage development has entered the release candidate phase for 9.3. Setting a new milestone for this ticket based on a cursory review of ticket status, priority, and last modification date.

Note: See TracTickets for help on using tickets.