public inbox for gdb@sourceware.org
 help / color / mirror / Atom feed
* Broken libcc1 lookup in GDB/Ubuntu
@ 2021-03-24 15:15 Luis Machado
  2021-03-24 15:16 ` Luis Machado
  2021-03-24 16:45 ` Ruslan Kabatsayev
  0 siblings, 2 replies; 4+ messages in thread
From: Luis Machado @ 2021-03-24 15:15 UTC (permalink / raw)
  To: gdb, jan.kratochvil, Jeff Law

Hi,

While looking at enabling the compile tests in GDB's testsuite, I 
noticed GDB doesn't find the right shared library because it is looking 
for a different naming pattern.

In the case of Ubuntu 18.04/20.04, the shared library is named like so:

/usr/lib/aarch64-linux-gnu/libcc1.so.0.0.0
/usr/lib/aarch64-linux-gnu/libcc1.so.0 -> libcc1.so.0.0.0

But GDB is looking for libcc1.so in the following ways:

#define GCC_C_FE_LIBCC libcc1.so
#define GCC_CP_FE_LIBCC libcc1.so

So, basically, the gdb.compile tests will never be exercised 
out-of-the-box, even if you install the libcc1 package. I had to add a 
symlink named "libcc1.so" to make GDB happy.

Now, I noticed there was a proposed fix for this many years ago, in the 
following series:

https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01241.html
https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01242.html
https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01243.html
https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01244.html
https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01245.html

Was this dropped for some reason? Or is this still valid and should be 
pursued upstream?


Thanks,
Luis

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

* Re: Broken libcc1 lookup in GDB/Ubuntu
  2021-03-24 15:15 Broken libcc1 lookup in GDB/Ubuntu Luis Machado
@ 2021-03-24 15:16 ` Luis Machado
  2021-03-24 16:45 ` Ruslan Kabatsayev
  1 sibling, 0 replies; 4+ messages in thread
From: Luis Machado @ 2021-03-24 15:16 UTC (permalink / raw)
  To: gdb, jan.kratochvil, Jeff Law, Christian Biesinger

Adding Christian, as he ran into this as well.

On 3/24/21 12:15 PM, Luis Machado wrote:
> Hi,
> 
> While looking at enabling the compile tests in GDB's testsuite, I 
> noticed GDB doesn't find the right shared library because it is looking 
> for a different naming pattern.
> 
> In the case of Ubuntu 18.04/20.04, the shared library is named like so:
> 
> /usr/lib/aarch64-linux-gnu/libcc1.so.0.0.0
> /usr/lib/aarch64-linux-gnu/libcc1.so.0 -> libcc1.so.0.0.0
> 
> But GDB is looking for libcc1.so in the following ways:
> 
> #define GCC_C_FE_LIBCC libcc1.so
> #define GCC_CP_FE_LIBCC libcc1.so
> 
> So, basically, the gdb.compile tests will never be exercised 
> out-of-the-box, even if you install the libcc1 package. I had to add a 
> symlink named "libcc1.so" to make GDB happy.
> 
> Now, I noticed there was a proposed fix for this many years ago, in the 
> following series:
> 
> https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01241.html
> https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01242.html
> https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01243.html
> https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01244.html
> https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01245.html
> 
> Was this dropped for some reason? Or is this still valid and should be 
> pursued upstream?
> 
> 
> Thanks,
> Luis

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

* Re: Broken libcc1 lookup in GDB/Ubuntu
  2021-03-24 15:15 Broken libcc1 lookup in GDB/Ubuntu Luis Machado
  2021-03-24 15:16 ` Luis Machado
@ 2021-03-24 16:45 ` Ruslan Kabatsayev
  2021-03-24 16:55   ` Luis Machado
  1 sibling, 1 reply; 4+ messages in thread
From: Ruslan Kabatsayev @ 2021-03-24 16:45 UTC (permalink / raw)
  To: Luis Machado; +Cc: gdb, jan.kratochvil, Jeff Law

Hi,

On Wed, 24 Mar 2021 at 18:15, Luis Machado via Gdb <gdb@sourceware.org> wrote:
>
> Hi,
>
> While looking at enabling the compile tests in GDB's testsuite, I
> noticed GDB doesn't find the right shared library because it is looking
> for a different naming pattern.
>
> In the case of Ubuntu 18.04/20.04, the shared library is named like so:
>
> /usr/lib/aarch64-linux-gnu/libcc1.so.0.0.0
> /usr/lib/aarch64-linux-gnu/libcc1.so.0 -> libcc1.so.0.0.0

"apt-file search libcc1.so" shows me that e.g. gcc-9 package (and
other versions of gcc) provides the suffixless version. It's installed
as a symlink into /usr/lib/gcc/aarch64-linux-gnu/9/libcc1.so . Can it
not be found?

>
> But GDB is looking for libcc1.so in the following ways:
>
> #define GCC_C_FE_LIBCC libcc1.so
> #define GCC_CP_FE_LIBCC libcc1.so
>
> So, basically, the gdb.compile tests will never be exercised
> out-of-the-box, even if you install the libcc1 package. I had to add a
> symlink named "libcc1.so" to make GDB happy.
>
> Now, I noticed there was a proposed fix for this many years ago, in the
> following series:
>
> https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01241.html
> https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01242.html
> https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01243.html
> https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01244.html
> https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01245.html
>
> Was this dropped for some reason? Or is this still valid and should be
> pursued upstream?
>
>
> Thanks,
> Luis

Regards,
Ruslan

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

* Re: Broken libcc1 lookup in GDB/Ubuntu
  2021-03-24 16:45 ` Ruslan Kabatsayev
@ 2021-03-24 16:55   ` Luis Machado
  0 siblings, 0 replies; 4+ messages in thread
From: Luis Machado @ 2021-03-24 16:55 UTC (permalink / raw)
  To: Ruslan Kabatsayev; +Cc: gdb, jan.kratochvil, Jeff Law

On 3/24/21 1:45 PM, Ruslan Kabatsayev wrote:
> Hi,
> 
> On Wed, 24 Mar 2021 at 18:15, Luis Machado via Gdb <gdb@sourceware.org> wrote:
>>
>> Hi,
>>
>> While looking at enabling the compile tests in GDB's testsuite, I
>> noticed GDB doesn't find the right shared library because it is looking
>> for a different naming pattern.
>>
>> In the case of Ubuntu 18.04/20.04, the shared library is named like so:
>>
>> /usr/lib/aarch64-linux-gnu/libcc1.so.0.0.0
>> /usr/lib/aarch64-linux-gnu/libcc1.so.0 -> libcc1.so.0.0.0
> 
> "apt-file search libcc1.so" shows me that e.g. gcc-9 package (and
> other versions of gcc) provides the suffixless version. It's installed
> as a symlink into /usr/lib/gcc/aarch64-linux-gnu/9/libcc1.so . Can it
> not be found?
> 

Those do exist, but GDB seems to want to load that library from 
/usr/lib/aarch64-linux-gnu, and not from, say, 
/usr/lib/aarch64-linux-gnu/9/libcc1.so.

There is no symlink from /usr/lib/aarch64-linux-gnu/libcc1.so.0 pointing 
at the version-specific file.

>>
>> But GDB is looking for libcc1.so in the following ways:
>>
>> #define GCC_C_FE_LIBCC libcc1.so
>> #define GCC_CP_FE_LIBCC libcc1.so
>>
>> So, basically, the gdb.compile tests will never be exercised
>> out-of-the-box, even if you install the libcc1 package. I had to add a
>> symlink named "libcc1.so" to make GDB happy.
>>
>> Now, I noticed there was a proposed fix for this many years ago, in the
>> following series:
>>
>> https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01241.html
>> https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01242.html
>> https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01243.html
>> https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01244.html
>> https://gcc.gnu.org/legacy-ml/gcc-patches/2015-04/msg01245.html
>>
>> Was this dropped for some reason? Or is this still valid and should be
>> pursued upstream?
>>
>>
>> Thanks,
>> Luis
> 
> Regards,
> Ruslan
> 

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

end of thread, other threads:[~2021-03-24 16:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-24 15:15 Broken libcc1 lookup in GDB/Ubuntu Luis Machado
2021-03-24 15:16 ` Luis Machado
2021-03-24 16:45 ` Ruslan Kabatsayev
2021-03-24 16:55   ` Luis Machado

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).