This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: --prefix


Ulrich Drepper <drepper@redhat.com> writes:

> On Wed, 2002-04-24 at 11:50, Andreas Jaeger wrote:
>
>> I propose to change the prefix to something else than /usr/local/.
>> What do you think?  Or is there a problem with autoconf?
>
> Changing the default prefix isn't good.  But you could add some code in
> sysdeps/unix/sysv/linux/configure.in which warns if the prefix != /usr.

Here's a patch.  What do you think?  Shall I commit it for both
branches?

Andreas

2002-05-19  Andreas Jaeger  <aj@suse.de>

	* sysdeps/unix/sysv/linux/configure.in: Warn against an
	installation in /usr/local.

============================================================
Index: sysdeps/unix/sysv/linux/configure.in
--- sysdeps/unix/sysv/linux/configure.in	30 Apr 2002 22:00:56 -0000	1.49
+++ sysdeps/unix/sysv/linux/configure.in	19 May 2002 17:03:10 -0000
@@ -185,6 +185,23 @@ if test "$linuxthreads_missing"; then
   fi
 fi
 
+if test "$prefix" = "/usr/local" -o "$prefix" = "/usr/local/" -o "$prefix" = "NONE"; then
+  if test $enable_sanity = yes; then
+    echo "\
+*** On GNU/Linux systems the GNU C Library should not be installed into
+*** /usr/local since this might make your system totally unusable.
+*** We strongly advise to use a different prefix.  For details read the FAQ.
+*** If you really mean to do this, run configure again using the extra 
+*** parameter \`--disable-sanity-checks'."
+    exit 1
+  else
+    echo "\
+*** WARNING: Do you really want to install the GNU C Library into /usr/local?
+*** This might make your system totally unusable, for details read the FAQ."
+  fi
+fi
+
+
 # One Linux we use ldconfig.
 use_ldconfig=yes
 
============================================================
Index: FAQ.in
--- FAQ.in	5 Jan 2002 06:15:54 -0000	1.130
+++ FAQ.in	19 May 2002 17:03:12 -0000
@@ -1028,6 +1028,19 @@ This version is needed because the fpos_
 have changed in glibc 2.2, and gcc 2.95.3 contains a corresponding patch.
 
 
+??	Why shall glibc never get installed on GNU/Linux systems in
+/usr/local?
+
+{AJ} The GNU C compiler treats /usr/local/include and /usr/local/lib in a
+special way, these directories will be searched before the system
+directories.  Since on GNU/Linux the system directories /usr/include and
+/usr/lib contain a --- possibly different --- version of glibc and mixing
+certain files from different glibc installations is not supported and will
+break, you risk breaking your complete system.  If you want to test a glibc
+installation, use another directory as argument to --prefix.  If you like to
+install this glibc version as default version, overriding the existing one,
+use --prefix=/usr and everything will go in the right places.
+
 ? Source and binary incompatibilities, and what to do about them
 
 ??	I expect GNU libc to be 100% source code compatible with

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]