Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jan 2014 21:00:12 +0100
From:      Matthias Andree <matthias.andree@gmx.de>
To:        freebsd-ports@freebsd.org
Subject:   Re: USE_GCC doesn't set rpath
Message-ID:  <52E174CC.1020801@gmx.de>
In-Reply-To: <CAE-m3X0cMxJ_mpPZ_AoDb17G9Dg4F_Sj45KsZi-hYnd9mguhLw@mail.gmail.com>
References:  <52DEE7EE.6010909@rawbw.com> <52DF0346.6000108@ShaneWare.Biz> <52E167BF.8050103@rawbw.com> <CAE-m3X0cMxJ_mpPZ_AoDb17G9Dg4F_Sj45KsZi-hYnd9mguhLw@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Am 23.01.2014 20:53, schrieb Bernhard Fr=F6hlich:
> Am 23.01.2014 20:04 schrieb "Yuri" <yuri@rawbw.com>:
>>
>> On 01/21/2014 15:31, Shane Ambler wrote:
>>>
>>> I think you will find that qbittorrent will need to be built with the
>>> same gcc version as libtorrent-rasterbar.
>>>
>>> I believe qbittorrent is loading /usr/lib/libstdc++.so.6 then it load=
s
>>> libtorrent-rasterbar.so.7 which tries to load libstdc++ and it is giv=
en
>>> the already open copy which doesn't have GLIBCXX_3.4.15 that it needs=
 to
>>> run.
>>
>>
>> Yes, you are right, thst's what is happening.
>> So if any dependency has USE_GCC set, all dependent packages should al=
so
> have USE_GCC set. Can ports build infrastructure automatically set USE_=
GCC
> for dependent ports? Because doing this by hand in each port is tedious=
 and
> error prone.
>>
>> Yuri
>=20
> No it can't right now and this is why we need a ports compiler. Right n=
ow
> we are hiding this problems by the fact that we are able to build 95%
> percent of the tree with clang and everyone is happy. We add dozens of
> patches to compile with clang or add this rpath workarounds to even mor=
e
> ports just because nobody wants to acknowledge that this is shit and wo=
n't
> work properly unless really everything is build with one compiler.

No reason to use offensive language.

We can technically provide/use different ports compilers, the only thing
is that we need to make sure to separate ports by their ABI.  I. e.
clang-built C++ ports require clang-built C++ requisites.  Meaning that
you may need to install the same library twice, once with GCC47 ABI,
once with clang ABI - and of course the rpath needs to be set accordingly=
.

Possibly we also need to provide only static versions of
compiler-dependent libs (such as libcompiler-rt for clang and libgcc*
for GCC) to overcome the particular problem Bernhard is describing.

Again, this mostly affects C++ ports, and to a lesser extent Objective-C
ports.

> The rpath stuff is only a workaround that works in a few cases but it
> doesn't work in all cases. You will still see very hard to diagnose run=
time
> crashes.

If the ABIs are not compatible, then linking should not work - for
instance, if I compile rawtherapee with GCC, it will not link against
requisites built with clang.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52E174CC.1020801>