Bug 234495

Summary: Porters Handbook: Mention USE_GCC "currently" unconditionally sets gcc as a RUN_DEPENDS and show workaround
Product: Documentation Reporter: bergerkos
Component: Books & ArticlesAssignee: freebsd-doc (Nobody) <doc>
Status: Closed FIXED    
Severity: Affects Some People CC: gerald, portmgr, ports-bugs
Priority: --- Keywords: easy, needs-patch
Version: Latest   
Hardware: Any   
OS: Any   
See Also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=211154

Description bergerkos 2018-12-29 21:53:22 UTC
When I'm using the Makefile fields "USE_GCC=yes GCC_COMMAND=/usr/local/bin/gcc8" in my port's Makefile the resulting packages installs the specified gcc compiler package as a dependency.

However, the Porter's Handbook at https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/makefile-depend.html explicitly mentions the meaning of the "USE_GCC=" optiona as:

The port requires GCC (gcc or g++) to build. [...]

To build, it says, and adds nothing about installing it together with the compiled port package. In reality, though, this usage ends up in the gcc-$version package being installed along with the port itself. The only way to avoid this currently is to only specify gcc in BUILD_DEPENDS.

What is it? Inconsistency in the documentation? Or a bug in the ports building framework?
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2018-12-30 01:44:25 UTC
Technically a documentation issue. The current documentation is not incorrect, it is just not explicitly complete, mentioning also the fact that its a RUN_DEPENDS too

The ability to specify gcc as a build *only* dependency is being handled in bug 211154, with workarounds in ports in the meantime taking the form of something like ports r464059 (removing gcc from RUN_DEPENDS)
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-01-04 13:56:02 UTC
A commit references this bug:

Author: mat
Date: Fri Jan  4 13:55:53 UTC 2019
New revision: 52746
URL: https://svnweb.freebsd.org/changeset/doc/52746

Log:
  Note that USE_GCC is a build and a run-time dependency.

  PR:		234495
  Reported by:	bergerkos yahoo co uk

Changes:
  head/en_US.ISO8859-1/books/porters-handbook/makefiles/chapter.xml