coin-or-tools / BuildTools

Macros and patches for GNU autotools
https://coin-or-tools.github.io/BuildTools/
Other
3 stars 7 forks source link

pkg-config search path setup assumes libdir is prefix/lib #90

Closed svigerske closed 5 years ago

svigerske commented 5 years ago

Issue created by migration from Trac.

Original creator: @svigerske

Original creation time: 2011-09-03 14:10:00

Assignee: @svigerske

Version: 0.7

When creating addlibs files from .pc files, the Makefile's augment PKG_CONFIG_SEARCH_PATH by $prefix/lib/pkgconfig, assuming that .pc files are installed there. This does not work if a user changes the library installation directory via configure's --libdir option.

An easy workaround for a user is to set a link $prefix/lib -> $libdir.

There may be other places where $prefix/lib == $libdir is assumed.

svigerske commented 5 years ago

Comment by @svigerske created at 2012-02-12 18:46:19

On new 64bit systems (e.g., OpenSuse 12.1), libdir seem to default to $prefix/lib64. Thus, make install already fails even if the user does not change the prefix!

The same workaround as above can be applied.

svigerske commented 5 years ago

Comment by @svigerske created at 2012-02-12 18:46:19

Changing priority from major to critical.

svigerske commented 5 years ago

Comment by @svigerske created at 2012-11-19 12:04:40

Added a simple workaround with bb9972e745.

svigerske commented 5 years ago

Comment by @svigerske created at 2012-11-19 12:04:40

Changing priority from critical to major.

svigerske commented 5 years ago

Comment by @svigerske created at 2012-11-19 12:04:40

Changing status from new to assigned.

svigerske commented 5 years ago

Comment by @LouHafer created at 2018-11-01 18:39:23

I'm thinking this is fixed, to the extent that it can be fixed. The autotools_update version of COIN_HAS_PKGCONFIG follows autoconf's rules for expanding ${libdir}. Stable/0.8 doesn't do the full expansion but includes lib64 as an option. And the above workaround remains available.

I vote we close this one.

svigerske commented 5 years ago

Comment by @svigerske created at 2018-11-01 18:47:28

I agree.

I think you mean this nice code:

  expanded_libdir=$libdir
  while expr "$expanded_libdir" : '.*$.*' >/dev/null 2>&1 ; do
    eval expanded_libdir=$expanded_libdir
  done
  prefix=$save_prefix
  exec_prefix=$save_exec_prefix
  COIN_PKG_CONFIG_PATH="${expanded_libdir}/pkgconfig:${COIN_PKG_CONFIG_PATH}"
svigerske commented 5 years ago

Comment by @svigerske created at 2018-11-01 18:47:28

Resolution: fixed