public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* libstdc++.so.6.0.*-gdb.py might be installed at the wrong place
@ 2009-07-23 20:49 Basile STARYNKEVITCH
  2009-07-24 14:33 ` Ian Lance Taylor
  2009-07-24 15:51 ` Tom Tromey
  0 siblings, 2 replies; 8+ messages in thread
From: Basile STARYNKEVITCH @ 2009-07-23 20:49 UTC (permalink / raw)
  To: gcc Mailing List

Hello

Sometimes, I am building & installing (on Linux/AMD64/Debian/Sid) the 
trunk configured as

/usr/src/Lang/gcc-trunk/configure  '--program-suffix=-trunk' 
'--libdir=/usr/local/lib/gcc-trunk' 
'--libexecdir=/usr/local/libexec/gcc-trunk' 
'--with-gxx-include-dir=/usr/local/lib/gcc-trunk/include/c++/' 
'--disable-multilib' '--enable-maintainer-mode' '--enable-languages=c,c++'

I don't know much the internals of libstdc++. But apparently, a file 
/usr/local/lib/lib64/libstdc++.so.6.0.12-gdb.py (refered as i 
/usr/local/lib/gcc-trunk/../lib64/libstdc++.so.6.0.12-gdb.py somehow) s 
installed and it seems to be a python script for some future version of gdb.

I would believe that it is the wrong place to install such a file. (In 
particular it makes ldconfig unhappy, when /usr/local/lib/lib64 is scanned).

Shouldn't a python script for gdb be installed  outside of a directory 
supposed to contain only  ELF libraries?  Wouldn't a gdb specific  
subdirectory be a more appropriate place?

And I am surprised it is in trunk. I thought that python support is for 
future GDB release (probably gdb 7.0, not yet released). Shouldn't such 
a script belong more to contrib? Why is it installed? Is there any 
synchronisation between gdb & gcc releases?

But I agree I don't know much about all that, and the installation part 
of the Makefile.in is something which still scares me a lot (in 
particular because I don't understand all the file path conventions).

Regards.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: libstdc++.so.6.0.*-gdb.py might be installed at the wrong place
  2009-07-23 20:49 libstdc++.so.6.0.*-gdb.py might be installed at the wrong place Basile STARYNKEVITCH
@ 2009-07-24 14:33 ` Ian Lance Taylor
  2009-07-24 14:56   ` Basile STARYNKEVITCH
  2009-07-24 15:51 ` Tom Tromey
  1 sibling, 1 reply; 8+ messages in thread
From: Ian Lance Taylor @ 2009-07-24 14:33 UTC (permalink / raw)
  To: Basile STARYNKEVITCH; +Cc: gcc Mailing List

Basile STARYNKEVITCH <basile@starynkevitch.net> writes:

> I would believe that it is the wrong place to install such a file. (In
> particular it makes ldconfig unhappy, when /usr/local/lib/lib64 is
> scanned).

In what way does it make ldconfig unhappy?  My /usr/lib directory has a
number of files which are not shared libraries.

Ian

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: libstdc++.so.6.0.*-gdb.py might be installed at the wrong place
  2009-07-24 14:33 ` Ian Lance Taylor
@ 2009-07-24 14:56   ` Basile STARYNKEVITCH
  0 siblings, 0 replies; 8+ messages in thread
From: Basile STARYNKEVITCH @ 2009-07-24 14:56 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc Mailing List

Ian Lance Taylor wrote:
> Basile STARYNKEVITCH <basile@starynkevitch.net> writes:
>
>   
>> I would believe that it is the wrong place to install such a file. (In
>> particular it makes ldconfig unhappy, when /usr/local/lib/lib64 is
>> scanned).
>>     
>
> In what way does it make ldconfig unhappy?  My /usr/lib directory has a
> number of files which are not shared libraries.
>   

ldconfig gives me:

ldconfig: /usr/local/lib/lib64/libstdc++.so.6.0.12-gdb.py is not an ELF 
file - it has the wrong magic bytes at the start.


Ok, it still does something sensible.

But I still believe a python script for a future gdb could go elsewhere.

regards.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: libstdc++.so.6.0.*-gdb.py might be installed at the wrong place
  2009-07-23 20:49 libstdc++.so.6.0.*-gdb.py might be installed at the wrong place Basile STARYNKEVITCH
  2009-07-24 14:33 ` Ian Lance Taylor
@ 2009-07-24 15:51 ` Tom Tromey
  2009-09-03  5:08   ` Ryan Hill
  1 sibling, 1 reply; 8+ messages in thread
From: Tom Tromey @ 2009-07-24 15:51 UTC (permalink / raw)
  To: Basile STARYNKEVITCH; +Cc: gcc Mailing List

>>>>> "Basile" == Basile STARYNKEVITCH <basile@starynkevitch.net> writes:

[...]
Basile> /usr/local/lib/gcc-trunk/../lib64/libstdc++.so.6.0.12-gdb.py

Basile> I would believe that it is the wrong place to install such a file. (In
Basile> particular it makes ldconfig unhappy, when /usr/local/lib/lib64 is
Basile> scanned).

By my reading of the GNU coding standards, it is ok to install this file
here.

That is a somewhat pedantic answer, maybe not the most helpful :)

Basile> Shouldn't a python script for gdb be installed  outside of a directory
Basile> supposed to contain only  ELF libraries?  Wouldn't a gdb specific
Basile> subdirectory be a more appropriate place?

Perhaps.  It is a problem of several parts.  Basically, gdb and all
possible users of this interface must agree on where to install such
"hook" files.

I chose to name the .py files after the libraries and install them
alongside the libraries because it is simple and will not result in any
naming clash.

There is also the option of installing these files underneath the
separate debug directory.  However, gcc has no knowledge of that.  I
assume that distros will solve this themselves by moving the file after
make install.

We could change this, of course.  But, I think a discussion about that
would be better placed on the gdb list.  I don't see anything really
wrong about the current setup, but if there is a big enough outcry, or
some new reason I have not thought of, I suppose I could be swayed.

Basile> And I am surprised it is in trunk. I thought that python support is
Basile> for future GDB release (probably gdb 7.0, not yet released). Shouldn't
Basile> such a script belong more to contrib? Why is it installed? Is there
Basile> any synchronisation between gdb & gcc releases?

I think the current approach is best.  It lets people who work on both
gcc and gdb have a trivial way to test python-based pretty-printing.
And, the existence of this .py file does not cause any problems for any
earlier version of gdb.

If I understand correctly, the alternative you suggest is to put this
code in contrib and not install it until gdb 7.0 is released, and only
then move it.  That seems worse -- it is more churn and it makes it
harder to test.  Also, the hook file is just one file that is installed;
there are also the printers themselves.

Tom

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: libstdc++.so.6.0.*-gdb.py might be installed at the wrong place
  2009-07-24 15:51 ` Tom Tromey
@ 2009-09-03  5:08   ` Ryan Hill
  2009-09-03  8:51     ` Jakub Jelinek
  2009-09-03 20:55     ` Tom Tromey
  0 siblings, 2 replies; 8+ messages in thread
From: Ryan Hill @ 2009-09-03  5:08 UTC (permalink / raw)
  To: gcc

[-- Attachment #1: Type: text/plain, Size: 1641 bytes --]

On Fri, 24 Jul 2009 09:51:07 -0600
Tom Tromey <tromey@redhat.com> wrote:

> >>>>> "Basile" == Basile STARYNKEVITCH <basile@starynkevitch.net> writes:

> Basile> Shouldn't a python script for gdb be installed  outside of a directory
> Basile> supposed to contain only  ELF libraries?  Wouldn't a gdb specific
> Basile> subdirectory be a more appropriate place?
> 
> Perhaps.  It is a problem of several parts.  Basically, gdb and all
> possible users of this interface must agree on where to install such
> "hook" files.
> 
> I chose to name the .py files after the libraries and install them
> alongside the libraries because it is simple and will not result in any
> naming clash.
> 
> There is also the option of installing these files underneath the
> separate debug directory.  However, gcc has no knowledge of that.  I
> assume that distros will solve this themselves by moving the file after
> make install.

I was just wondering if there was any consensus among distros about where to
move these.  We cannot keep the .py files in the location they're currently
installed; ldconfig is far too noisy about it:

  /sbin/ldconfig: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0-pre9999/libstdc++.so.6.0.14-gdb.py is not an ELF file - it has the wrong magic bytes at the start.
  /sbin/ldconfig: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0-pre9999/32/libstdc++.so.6.0.14-gdb.py is not an ELF file - it has the wrong magic bytes at the start.


-- 
fonts,                             Character is what you are in the dark.
gcc-porting,
wxwidgets @ gentoo     EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: libstdc++.so.6.0.*-gdb.py might be installed at the wrong place
  2009-09-03  5:08   ` Ryan Hill
@ 2009-09-03  8:51     ` Jakub Jelinek
  2009-09-03 17:59       ` Ralf Wildenhues
  2009-09-03 20:55     ` Tom Tromey
  1 sibling, 1 reply; 8+ messages in thread
From: Jakub Jelinek @ 2009-09-03  8:51 UTC (permalink / raw)
  To: Ryan Hill; +Cc: gcc

On Wed, Sep 02, 2009 at 11:08:19PM -0600, Ryan Hill wrote:
> On Fri, 24 Jul 2009 09:51:07 -0600
> Tom Tromey <tromey@redhat.com> wrote:
> 
> > >>>>> "Basile" == Basile STARYNKEVITCH <basile@starynkevitch.net> writes:
> 
> > Basile> Shouldn't a python script for gdb be installed  outside of a directory
> > Basile> supposed to contain only  ELF libraries?  Wouldn't a gdb specific
> > Basile> subdirectory be a more appropriate place?
> > 
> > Perhaps.  It is a problem of several parts.  Basically, gdb and all
> > possible users of this interface must agree on where to install such
> > "hook" files.
> > 
> > I chose to name the .py files after the libraries and install them
> > alongside the libraries because it is simple and will not result in any
> > naming clash.
> > 
> > There is also the option of installing these files underneath the
> > separate debug directory.  However, gcc has no knowledge of that.  I
> > assume that distros will solve this themselves by moving the file after
> > make install.
> 
> I was just wondering if there was any consensus among distros about where to
> move these.  We cannot keep the .py files in the location they're currently
> installed; ldconfig is far too noisy about it:
> 
>   /sbin/ldconfig: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0-pre9999/libstdc++.so.6.0.14-gdb.py is not an ELF file - it has the wrong magic bytes at the start.
>   /sbin/ldconfig: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0-pre9999/32/libstdc++.so.6.0.14-gdb.py is not an ELF file - it has the wrong magic bytes at the start.

ldconfig by default certainly doesn't search gcc private directories, if you
let ldconfig search there by adding it to its configuration, it would be
admin error.

	Jakub

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: libstdc++.so.6.0.*-gdb.py might be installed at the wrong place
  2009-09-03  8:51     ` Jakub Jelinek
@ 2009-09-03 17:59       ` Ralf Wildenhues
  0 siblings, 0 replies; 8+ messages in thread
From: Ralf Wildenhues @ 2009-09-03 17:59 UTC (permalink / raw)
  To: Jakub Jelinek; +Cc: Ryan Hill, gcc

Hello Jakub,

* Jakub Jelinek wrote on Thu, Sep 03, 2009 at 10:51:42AM CEST:
> On Wed, Sep 02, 2009 at 11:08:19PM -0600, Ryan Hill wrote:
> > 
> > I was just wondering if there was any consensus among distros about where to
> > move these.  We cannot keep the .py files in the location they're currently
> > installed; ldconfig is far too noisy about it:
> > 
> >   /sbin/ldconfig: /usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0-pre9999/libstdc++.so.6.0.14-gdb.py is not an ELF file - it has the wrong magic bytes at the start.

> ldconfig by default certainly doesn't search gcc private directories, if you
> let ldconfig search there by adding it to its configuration, it would be
> admin error.

'libtool --mode=install' will invoke 'ldconfig -n' on the directory
it installs libraries in (e.g., in order to fix symlinks), which will
cause this complaint as well.

Cheers,
Ralf

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: libstdc++.so.6.0.*-gdb.py might be installed at the wrong place
  2009-09-03  5:08   ` Ryan Hill
  2009-09-03  8:51     ` Jakub Jelinek
@ 2009-09-03 20:55     ` Tom Tromey
  1 sibling, 0 replies; 8+ messages in thread
From: Tom Tromey @ 2009-09-03 20:55 UTC (permalink / raw)
  To: Ryan Hill; +Cc: gcc

>>>>> "Ryan" == Ryan Hill <dirtyepic@gentoo.org> writes:

Ryan> I was just wondering if there was any consensus among distros
Ryan> about where to move these.

I suggest moving them either to the separate debug directory, or
underneath gdb's datadir.  See (info "(gdb)Auto-loading") for details of
the procedure that gdb uses to find these files.

Tom

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-09-03 20:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-23 20:49 libstdc++.so.6.0.*-gdb.py might be installed at the wrong place Basile STARYNKEVITCH
2009-07-24 14:33 ` Ian Lance Taylor
2009-07-24 14:56   ` Basile STARYNKEVITCH
2009-07-24 15:51 ` Tom Tromey
2009-09-03  5:08   ` Ryan Hill
2009-09-03  8:51     ` Jakub Jelinek
2009-09-03 17:59       ` Ralf Wildenhues
2009-09-03 20:55     ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).