Bug 1198538 - Prefix /usr/local sets libdir wrong
Summary: Prefix /usr/local sets libdir wrong
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: autoconf
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Pavel Raiskup
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-03-04 10:38 UTC by Andreas Gruenbacher
Modified: 2015-12-02 17:35 UTC (History)
2 users (show)

Fixed In Version:
Clone Of: 1196340
Environment:
Last Closed: 2015-12-02 09:42:32 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Andreas Gruenbacher 2015-03-04 10:38:39 UTC
Description of problem:
When a package uses prefix /usr, either by default through "AC_PREFIX_DEFAULT(/usr)" or explicitly by "./configure --prefix=/usr", libdir is correctly set to /usr/lib64 on 64-bit platforms (see bug 1196340). This does not happen with the default prefix /usr/local though. This could either be addresses by providing a /usr/local/share/config.site script or by fixing the whole libdir mess in autoconf itself.

Version-Release number of selected component (if applicable):
autoconf-2.69-17.fc21

How reproducible:
Always on 64-bit systems that don't have a custom /usr/local/share/config.site script.

Steps to Reproduce:
1. Run ./configure in a package that doesn't use prefix /usr by default.
2. "grep ^libdir Makefile" shows that libdir is set wrong.

Actual results:
libdir = ${exec_prefix}/lib

Expected results:
libdir = ${exec_prefix}/lib64

Comment 1 Pavel Raiskup 2015-03-04 11:44:35 UTC
Thanks for the bugreport, Andreas.

(In reply to Andreas Grünbacher from comment #0)
> Description of problem:
> When a package uses prefix /usr, either by default through
> "AC_PREFIX_DEFAULT(/usr)" or explicitly by "./configure --prefix=/usr",
> libdir is correctly set to /usr/lib64 on 64-bit platforms (see bug 1196340).

On _our_ 64-bit platforms;  Because its our RPM policy to install libraries
this way.  Other distros do it differently.  Yes, it is better to help
developers with /usr prefix (to e.g. try to approach
what would have been done automatically by %configure).

> This does not happen with the default prefix /usr/local though. This could
> either be addresses by providing a /usr/local/share/config.site script

With (default) --prefix=/usr/local I'm not that sure.  Do we have some policy
in Fedora how libraries should be installed under /usr/local?

> or by fixing the whole libdir mess in autoconf itself.

Without configuration files, autoconf would have to detect what approach
particular policy distribution chosen (even non FHS compliant e.g.).

> How reproducible:
> Always on 64-bit systems that don't have a custom
> /usr/local/share/config.site script.

.. or /usr/local/etc/config.site.

--
FHS says that if {,/usr}/lib<suff> exists, same must exist under
/usr/local/lib<suff>.  Also 'filesystem' owns those directories.  So I tend to
agree with /usr/local/share/config.site.  Lets give this ticket a bit of time
for discussion.

Comment 2 Andreas Gruenbacher 2015-03-04 11:58:47 UTC
I think it is stupid of autoconf to not detect when a distro uses lib64; that would save us from all the config.site mess.

There are some config.site examples in doc/autoconf.texi in the autoconf repo, btw.

Comment 3 Pavel Raiskup 2015-03-23 13:54:17 UTC
Hms, looking at Fedora Packaging Guidelines, packagers are not allowed to
install files below /usr/local, sorry.

> I think it is stupid of autoconf to not detect when a distro uses lib64;
> that would save us from all the config.site mess.

Putting the blame on autoconf easy.  What heuristic do you propose?  Anyway,
files under /usr/local seem to be sort of admin's playground.
I don't think we want to change the defaults for all administrators regardless
of their own policy below /usr/local.

What about making the default /usr/share/config.site more friendly with
/usr/local/share/config.site path, e.g. to allow you to copy (or symlink)
those two files?

Pavel

Comment 4 Andreas Gruenbacher 2015-03-23 14:03:19 UTC
> What about making the default /usr/share/config.site more friendly with
> /usr/local/share/config.site path, e.g. to allow you to copy (or symlink)
> those two files?

What do you instead think of a mechanism that allows to tweak autoconf's defaults globally rather than per prefix; a global config.site script? That would need to happen upstream though.

Comment 5 Pavel Raiskup 2015-03-23 15:58:16 UTC
(In reply to Andreas Gruenbacher from comment #4)
> > What about making the default /usr/share/config.site more friendly with
> > /usr/local/share/config.site path, e.g. to allow you to copy (or symlink)
> > those two files?
>
> What do you instead think of a mechanism that allows to tweak autoconf's
> defaults globally rather than per prefix; a global config.site script?
> That would need to happen upstream though.

While looking at bug #1158915, I was thinking about something like
'config.global' (to configure all the (newly) generated 'configure' scripts,
not autoconf itself).  But I have been reluctant to propose some new feature
upstream without a good reason.

The thing is that we (usually?) want have config.site per prefix.  After
such change we would tend to have something like:

  $ cat /usr/share/autoconf/config.global
  test "$libdir" = '${exec_prefix}/lib' && libdir='${exec_prefix}/lib64'

But I'm not convinced we really want to change this for all possible
prefixes..  and cross-compilation, and..

I (mostly) agree with you on the particular /usr/local/lib{,64} case, but I
feel even this is controversial (because there are definitely many people who
do not respect FHS below /usr/local on Fedora/RHEL, because they simply don't
have to care about multilib) and I don't feel to be very motivated to push
upstream to accept such idea to even break working user scenarios in Fedora..

Comment 6 Fedora End Of Life 2015-11-04 15:38:41 UTC
This message is a reminder that Fedora 21 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 21. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '21'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 21 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 7 Fedora End Of Life 2015-12-02 09:42:35 UTC
Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


Note You need to log in before you can comment on or make changes to this bug.