This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Broken SO due to dropped dependencies
- From: Miguel Guedes <miguel dot a dot guedes at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 29 Mar 2013 14:56:58 +0000 (UTC)
- Subject: Re: Broken SO due to dropped dependencies
- References: <kj44bb$plm$1 at ger dot gmane dot org> <CAKOQZ8wYCipwEUD5OW_7fhvx1QsXwAeUG6283HbpH2NxKfugsg at mail dot gmail dot com>
On Fri, 29 Mar 2013 07:01:49 -0700, Ian Lance Taylor wrote:
> Are you using the -flto option?
>
No, not at all. The parameters used are exactly as is shown in the
pastebins.
> If not, when generating a shared library, GCC and presumably clang
> largely defer to the linker. So, what linker are you using? Are you
> using the same linker with both GCC and clang?
>
Yes, linker is exactly the same in both cases and it's `ld'.
> What system are you on?
>
System is: 3.5.0-27-generic #46-Ubuntu SMP (amd64)
Using also:
- gcc (Ubuntu/Linaro 4.7.2-2ubuntu1) 4.7.2
- clang version 3.3 (trunk 170425)
- GNU ld (GNU Binutils for Ubuntu) 2.22.90.20120924
> In the pastebin links you provided, I don't see any clang shared
> libraries at all. Where is clang_createIndex supposed to be defined?
>
In the second screenshot [0] at the bottom of the paste where I ldd the
built shared library there's an SO dependency that is crucial:
libclang.so.3.3 => /usr/local/lib/libclang.so.3.3 (0x00007f04d9e1c000)
It's one of the dependencies dropped/ignored by GCC.
> You may simply need to use the -rdynamic option with GCC.
I'm so annoyed (!) I won't be near my computer until late on Sunday so I
can't have a look at the -rdynamic (and -ftlo) you suggested right now.
I take it you don't think there's anything wrong with GCC? Is the
different behaviour between GCC and clang expected in this case?
Thanks again for the invaluable input, Ian!
[0] http://pastebin.com/xM8NNj4m