GCC Dependencies

Chris Jones jonesc at hep.phy.cam.ac.uk
Mon Aug 13 00:57:30 UTC 2018


Hi,

> On 13 Aug 2018, at 1:38 am, Marcus Calhoun-Lopez <mcalhoun at macports.org> wrote:
> 
> 
> 
>> On Aug 12, 2018, at 5:14 PM, Chris Jones <jonesc at hep.phy.cam.ac.uk> wrote:
> 
> Thank you for your response.
> 
>> What you are proposing seems to suggest no long making, for instance, libgcc6 depend on the libgcc7 or libgcc. This means if you install only libgcc6 you will not get a complete runtime, only the incomplete part that provides. I am not sure this is a good idea. For one it means all the old gcc versions have to explicitly declare a dependency on all the libgcc versions, which is currently not required, as each, once installed guarantees a complete runtime via its dependencies. For me, this should not be changed.
> You make a fair point, but it seems to me that the current situation is a combinations of two different approaches.
> For example, libgcc6 currently has library dependencies on llibgcc and libgcc7.
> If I understand correctly, this is in keeping with what you describe as the proper approach.
> However, gcc6 has library dependencies on libgcc and libgcc7 and a runtime dependency on libgcc6.
> This seems to already be the situation you would like to avoid.
> 
> It seems to me that we should either choose to have the primary responsibility of maintaining dependencies in the GCC or the libgcc ports, not a mixture of both.

This is likely in part because the libgccX ports are sub ports of gccX, and thus some of the dependencies are shared. 

I am not saying some tidy up might not be in order, but just be careful there aren’t any requirements you are not aware of. 

> 
>> You also seem to be proposing moving all the gcc port dependencies on libgcc to runtime. Please note the dependencies are not only required at runtime, but are in a number of cases also required whilst building. 
> Thank you for pointing this out.
> This is news to be.
> I had assumed that as GCC was being built, it relied solely on its local version of libgcc with no interaction with the installed version of libgcc.
> The Portfile then just deletes the local version of libgcc.
> Just for my own education, would you mind going into a little more detail on how GCC uses the installed version of libgcc?

Ok, i was not entirely precise. Gcc doesn't. I was thinking of the games that are played during the destroot step. One of these is to delete some files are replace them with sym links to the versions, that are provided by the libgcc ports. Now I think a bit more about it it might be ok these are only a runtime dependency....  as i say above, maybe some dependencies could (should) be changed from one sort to another. But making these changes this would have to be done quite carefully.

Chris

> 
> Thanks,
> Marcus
> 
>>> On 12 Aug 2018, at 7:47 pm, Marcus Calhoun-Lopez <mcalhoun at macports.org> wrote:
>>> 
>>> Currently, the GCC dependencies on the various parts of libgcc seem somewhat inconsistent or at least difficult to follow.
>>> Before I go to the trouble of creating a pull request, I thought someone might have some insights.
>>> Here is what I propose:
>>> 
>>> gcc43, gcc44, gcc45:
>>>  Library Dependencies: 
>>>  Runtime Dependencies: libgcc45, libgcc6, libgcc7, libgcc
>>> 
>>> gcc46, gcc47, gcc48, gcc49, gcc5, gcc6:
>>>  Library Dependencies: 
>>>  Runtime Dependencies: libgcc6, libgcc7, libgcc
>>> 
>>> gcc7:
>>>  Library Dependencies: 
>>>  Runtime Dependencies: libgcc7, libgcc
>>> 
>>> gcc8:
>>>  Library Dependencies: 
>>>  Runtime Dependencies: libgcc
>>> 
>>> gcc9:
>>>  Library Dependencies: 
>>>  Runtime Dependencies: libgcc-devel
>>> 
>>> --------------------------------------------------
>>> 
>>> libgcc45:
>>>  Library Dependencies:
>>>  Runtime Dependencies:
>>> 
>>> libgcc6:
>>>  Library Dependencies:
>>>  Runtime Dependencies:
>>> 
>>> libgcc7:
>>>  Library Dependencies: 
>>>  Runtime Dependencies:
>>> 
>>> 
>>> ==============================================
>>> This is the current status of things:
>>> ==============================================
>>> 
>>> gcc43, gcc44, gcc45:
>>>  Library Dependencies: libgcc
>>>  Runtime Dependencies: libgcc45 libgcc6
>>> 
>>> gcc46, gcc47, gcc48, gcc49, gcc5:
>>>  Library Dependencies: libgcc
>>>  Runtime Dependencies: libgcc6
>>> 
>>> gcc6:
>>>  Library Dependencies: libgcc libgcc7
>>>  Runtime Dependencies: libgcc6
>>> 
>>> gcc7:
>>>  Library Dependencies: libgcc
>>>  Runtime Dependencies: libgcc7
>>> 
>>> gcc8:
>>>  Library Dependencies: libgcc
>>>  Runtime Dependencies: 
>>> 
>>> gcc9:
>>>  Library Dependencies: libgcc-devel
>>>  Runtime Dependencies: 
>>> 
>>> --------------------------------------------------
>>> 
>>> libgcc45:
>>>  Library Dependencies:
>>>  Runtime Dependencies: 
>>> 
>>> libgcc6:
>>>  Library Dependencies: llibgcc libgcc7
>>>  Runtime Dependencies: 
>>> 
>>> libgcc7:
>>>  Library Dependencies: llibgcc
>>>  Runtime Dependencies: 
>>> 
>>> --------------------------------------------------
>>> 
>>> Port libgcc45 contains:
>>> /opt/local/lib/libgcc/libobjc-gnu.2.dylib
>>> 
>>> 
>>> Port libgcc6 contains:
>>> /opt/local/lib/libgcc/libasan.3.dylib
>>> /opt/local/lib/libgcc/libgfortran.3.dylib
>>> 
>>> 
>>> Port libgcc7 (for ${os.major}>=10) contains:
>>> /opt/local/lib/libgcc/libasan.4.dylib
>>> /opt/local/lib/libgcc/libcilkrts.5.dylib
>>> /opt/local/lib/libgcc/libgfortran.4.dylib
>>> /opt/local/lib/libgcc/libubsan.0.dylib
>>> 
>>> 
>>> libgcc and libgcc-devel conflict
>>> libgcc depends on
>>>  libgcc8 if ${os.major}>=10
>>>  libgcc7 otherwise
>> 
> 



More information about the macports-dev mailing list