Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Jul 2018 04:57:32 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 229626] Mk/Uses/compiler.mk has spurious complaints for some ports on gcc-based archs
Message-ID:  <bug-229626-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229626

            Bug ID: 229626
           Summary: Mk/Uses/compiler.mk has spurious complaints for some
                    ports on gcc-based archs
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Ports Framework
          Assignee: portmgr@FreeBSD.org
          Reporter: linimon@FreeBSD.org
                CC: ports-bugs@FreeBSD.org

Some ports have adopted the following pattern to work around dependency iss=
ues:

  BUILD_DEPENDS+=3D  clang40:devel/llvm40
  CC=3D              clang40
  CXX=3D             clang++40

However, on archs where clang is not the default compiler, this creates
complaints for any bulk build:

  /bin/sh: clang40: not found
  make[2]: "/usr/ports/Mk/Uses/compiler.mk" line 78: warning: "clang40
--version" returned non-zero status
  make[2]: "/usr/ports/Mk/Uses/compiler.mk" line 133: warning: "clang++40 -=
###
/dev/null 2>&1" returned non-zero status

See sysutils/osquery for an example of "clang40".  This pattern is also seen
for instances of "clang50" and "clang60", but the symptoms are the same.

The logic in compiler.mk is hard for me to follow, but here are the offendi=
ng
lines:

  _CCVERSION!=3D    ${CC} --version
  _CXXINTERNAL!=3D  ${CXX} -\#\#\# /dev/null 2>&1

These lines were introduced in the initial commit of compiler.mk.

I don't know what the proper fix is, but my guess is that the two lines abo=
ve
were written assuming that CC/CXX were whatever is in the base system.  So,
either those two lines should be fixed, or compiler.mk refactored to take s=
ome
kind of parameter to say "assign BUILD_DEPENDS/CPP/CC/CXX/ in the following
fashion" and use that to trigger a code block exactly like e.g. lines 186, =
208,
230, 252, and 274.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-229626-7788>