This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


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: Broken SO due to dropped dependencies


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


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