Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependent ports reported incorrectly for lang/gcc12 #596

Open
lsalvadore opened this issue Sep 3, 2024 · 3 comments
Open

Dependent ports reported incorrectly for lang/gcc12 #596

lsalvadore opened this issue Sep 3, 2024 · 3 comments

Comments

@lsalvadore
Copy link

As maintainer of the GCC ports, I am fairly sure that the information reported under "This port is required by:" is wrong for lang/gcc12: there is a huge amount of ports listed in there, which is very weird for the non default GCC version (default is GCC 13 at the moment). Indeed running git grep -P "USE_GCC[ \t]*=[ \t]*12" in the ports tree returns only 4 ports.

@dlangille
Copy link
Contributor

A port does not need to contain USE_GCC12 to be dependent up on lang/gcc12 - sometimes the dependency comes in through another mechanism.

For example, archivers/R-cran-zip:

[13:58 mydev dvl /usr/ports/archivers/R-cran-zip] % make -V BUILD_DEPENDS
/usr/local/bin/R:math/R gfortran13:lang/gcc13 /usr/local/bin/as:devel/binutils
[14:00 mydev dvl /usr/ports/archivers/R-cran-zip] % grep -i gcc *
[14:00 mydev dvl /usr/ports/archivers/R-cran-zip] % 

It comes from USES= cran:auto-plist,compiles

Looking in Mk/Uses/cran.mk we see it invokes fortran.mk which in turn sets RUN_DEPENDS and TEST_DEPENDS for gcc.

@lsalvadore
Copy link
Author

Of course I am well aware that USE_GCC is not the only mechanism. However please note that:

  • according to FreshPorts archivers/R-cran-zip depends on lang/gcc12;
  • running make all-depends-list | grep gcc in archivers/R-cran-zip returns lang/gcc13 only, not lang/gcc12.

@dlangille
Copy link
Contributor

dlangille commented Sep 4, 2024

The next problem though is why does gcc13 show up in the output above yet archivers/R-cran-zip shows up on lang/gcc12 but not on lang/gcc13?

The dependencies for a port are extracted when a commit to that port is processed by FreshPorts. I will guess that when the last commit to archivers/R-cran-zip occurs, the default gcc was 12, not 13.

This situation, (dependencies for a port change without a commit to the port), is a harder problem to solve. For every change to a Mk/Uses file we'd have to reevaluate dependencies for all ports using that particular USES.

This problem is similar to:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants