Opened 8 years ago

Closed 7 months ago

#90 closed defect (fixed)

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

Reported by: stefan Owned by: stefan
Priority: major Component: build system
Version: 0.7 Keywords:
Cc:

Description

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.

Change History (4)

comment:1 Changed 7 years ago by stefan

  • Priority changed from major to critical

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.

comment:2 Changed 6 years ago by stefan

  • Priority changed from critical to major
  • Status changed from new to assigned

Added a simple workaround with r2618.

comment:3 Changed 7 months ago by lou

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.

comment:4 Changed 7 months ago by stefan

  • Resolution set to fixed
  • Status changed from assigned to closed

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}"
Note: See TracTickets for help on using tickets.