[Bug 382344] New: default to /usr/local/lib64 for self-compiled stuff
https://bugzilla.novell.com/show_bug.cgi?id=382344 Summary: default to /usr/local/lib64 for self-compiled stuff Product: openSUSE 11.0 Version: Beta 1 Platform: Other OS/Version: Other Status: NEW Severity: Enhancement Priority: P5 - None Component: Basesystem AssignedTo: bnc-team-screening@forge.provo.novell.com ReportedBy: sbrabec@novell.com QAContact: qa@suse.de CC: coolo@novell.com, schwab@novell.com Blocks: 369696 Found By: --- It would be nice, if autoconf based configure script will default to libdir=/usr/local/lib64 for self compiles stuff (i. e. ./configure ; make ; make install). It would prevent bi-arch clashes in packages supporting /usr/local. It's trivial to do it: Add /usr/local/share/config.site with following contents: ---- #! /bin/sh if test "$libdir" = '${exec_prefix}/lib' ; then libdir='${exec_prefix}/lib64' fi ---- It is possible to enhance it and skip the change, if it was called inside "linux32" command. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=382344 Robert Vojcik <rvojcik@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bnc-team-screening@forge.provo.novell.com |schwab@novell.com -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=382344 User sbrabec@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=382344#c1 Stanislav Brabec <sbrabec@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|369696 | --- Comment #1 from Stanislav Brabec <sbrabec@novell.com> 2008-05-23 05:58:22 MST --- If you decide to use /usr/local/lib for x86_64, patch for bug 369696 may need update. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=382344 User sbrabec@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=382344#c2 Stanislav Brabec <sbrabec@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|schwab@novell.com |ro@novell.com --- Comment #2 from Stanislav Brabec <sbrabec@novell.com> 2009-02-25 05:46:40 MST --- Reassigning, as there is no progress. It would be nice to add this file to aaa_base or filesystem or any low level package needed for compilation. Here is an improved version, which defaults to /usr/local/lib inside linux32 and /usr/local/lib64 outside. /usr/local/share/config.site: ---- if test "$libdir" = '${exec_prefix}/lib' ; then case `/bin/uname -i` in x86_64 | ppc64 | s390x ) libdir='${exec_prefix}/lib64' ;; esac fi ---- Note: It is still possible to override this behavior by "--libdir=/usr/local/lib". -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=382344 User ro@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=382344#c3 Ruediger Oertel <ro@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |NEEDINFO Info Provider| |sbrabec@novell.com --- Comment #3 from Ruediger Oertel <ro@novell.com> 2009-03-02 05:08:04 MST --- we don't have this for /usr/lib64 vs. /usr/lib either, at least I haven't seen libdir detection work automatically in autoconf before. and installing /usr/local/share/config.site may not be such a good idea because the admin might use just that file for his own purposes. That's why we as distribution should not install _any_ file below /usr/local. Any other way to do this ? -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=382344 User sbrabec@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=382344#c4 Stanislav Brabec <sbrabec@novell.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEEDINFO |NEW Info Provider|sbrabec@novell.com | --- Comment #4 from Stanislav Brabec <sbrabec@novell.com> 2009-03-02 11:11:59 MST --- /usr/lib64 vs. /usr/lib is controlled by package maintainers. It's possible and easy to activate this logic for more prefixes or globally (with solution 1 below). There are two ways to configure /usr/local: 1. Set CONFIG_SITE variable to the path of the CONFIG_SITE file. Setting CONFIG_SITE allows to define prefix independent policy. 2. Create /usr/local/share/config.site or /usr/local/etc/config.site. It has effect only for prefix where it belongs. If we do 1. then we can place config.site anywhere. I can create and test config.site for solution 1. It will be basically the same as 2. plus a code resourcing original locations: If ${prefix} is set, search in ${prefix}/share/config.site and ${prefix}/etc/config.site. else search in ${ac_default_prefix}/share/config.site and ${ac_default_prefix}/etc/config.site, where ac_default_prefix=/usr/local. Here is the logic in configure file: ac_default_prefix=/usr/local .. # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then ac_site_file1=$CONFIG_SITE elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=382344 User sbrabec@novell.com added comment https://bugzilla.novell.com/show_bug.cgi?id=382344#c5 --- Comment #5 from Stanislav Brabec <sbrabec@novell.com> 2009-03-17 06:42:10 MST --- Here is the new version of site script. It is intended only for 64-bit bi-arch platforms. It can be places anywhere, but CONFIG_SITE shell variable should point to it. It is possible to modify this script to be shareable for all platforms. It modifies behavior of configure in all prefixes, not only /usr/local. It's possible to limit this behavior only to specific prefixes. It is possible to alter the default libexecdir in the same way to prevent /usr/local/libexec. -------------------- # If user did not specify libdir, guess the correct target: # Use lib64 for 64 bit targets, keep the default for the rest. if test "$libdir" = '${exec_prefix}/lib' ; then # We are trying to guess 32-bit target compilation. It's not as easy as # it sounds, as there is possible several intermediate combinations. ac_config_site_32bit_target=NONE # User defined -m32 in CFLAGS or CXXFLAGS: # (It's sufficient for 32-bit, but alone may cause mis-behavior of some checks.) case "$CFLAGS" in *-m32*) ac_config_site_32bit_target=YES ;; esac case "$CXXFLAGS" in *-m32*) ac_config_site_32bit_target=YES ;; esac # User explicitly specified counterpart --host: # (If cross toolchain is installed, generates 32-bit, else generates native.) case "$host" in *i[3456]86-* | ppc-* | s390-* ) ac_config_site_32bit_target=YES ;; esac # Running with linux32: # (Changes detected platform, but not the toolchain target.) case "`/bin/uname -i`" in x86_64 | ppc64 | s390x ) ;; * ) ac_config_site_32bit_target=YES ;; esac if test "x$ac_config_site_32bit_target" = xNONE; then libdir='${exec_prefix}/lib64' fi fi # Continue with the standard behavior of configure defined in AC_SITE_LOAD: if test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do if test -r "$ac_site_file"; then { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done -------------------- -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@novell.com