Bug 40289 - [4.5 Regression] share/libstdc++/python/ pollutes common namespace
[4.5 Regression] share/libstdc++/python/ pollutes common namespace
Status: RESOLVED FIXED
Product: gcc
Classification: Unclassified
Component: libstdc++
4.5.0
: P3 normal
: 4.5.0
Assigned To: Tom Tromey
:
Depends on:
Blocks: 346 51368
  Show dependency treegraph
 
Reported: 2009-05-29 11:11 UTC by Gerald Pfeifer
Modified: 2011-11-30 21:46 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build: tromey@novell.com,pmuldoon@redhat.com,jwakely.gcc@gmail.com
Known to work:
Known to fail:
Last reconfirmed: 2009-05-29 17:26:59


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerald Pfeifer 2009-05-29 11:11:57 UTC
This patch

  2009-05-28  Tom Tromey  <tromey@redhat.com>
            Phil Muldoon  <pmuldoon@redhat.com>
            Jonathan Wakely  <jwakely.gcc@gmail.com>

        * python/Makefile.in, , python/libstdcxx/__init__.py,
        python/libstdcxx/v6/__init__.py, python/libstdcxx/v6/printers.py,
        python/hook.in, python/Makefile.am: New files.
        * configure, Makefile.in: Rebuild.
        * acinclude.m4 (glibcxx_SUBDIRS): Add python.
        * Makefile.am (SUBDIRS): Add python.

pollutes global namespace under $PREFIX with

  share/libstdc++/python/libstdcxx/__init__.py
  share/libstdc++/python/libstdcxx/v6/__init__.py
  share/libstdc++/python/libstdcxx/v6/printers.py

which will create conflicts when installing several versions of GCC under
the same $PREFIX.

This is common practice under FreeBSD, for example, where the ports
have been using --program-suffix, --libdir, --libexecdir just fine for
many years.
Comment 1 Richard Biener 2009-05-29 11:26:32 UTC
It probably needs to be split into a separate package for distributors (or go
with a libstdc++ library package).  As long as it is configurable whether these
files get installed the situation is IMHO ok.
Comment 2 Tom Tromey 2009-05-29 18:11:43 UTC
I'm working on a fix.

Distro folks will probably want to rewrite the "hook" file and stick
it somewhere else.  The auto-loading search path is documented in the
gdb manual.
Comment 3 Tom Tromey 2009-06-10 22:58:38 UTC
Subject: Bug 40289

Author: tromey
Date: Wed Jun 10 22:58:22 2009
New Revision: 148357

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=148357
Log:
	PR libstdc++/40289:
	* python/Makefile.in: Rebuild.
	* python/hook.in: Compute module path relative to objfile.
	* python/Makefile.am (pythondir): Redefine.
	(gdb.py): Subst toolexeclibdir.
	(install-data-local): Rewrite.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/python/Makefile.am
    trunk/libstdc++-v3/python/Makefile.in
    trunk/libstdc++-v3/python/hook.in

Comment 4 Tom Tromey 2009-06-10 23:06:20 UTC
I changed this to install the code in a versioned directory.
I think this fixes the problem; reopen this PR if not.