NetBSD Problem Report #52663

From gson@gson.org  Sat Oct 28 13:53:01 2017
Return-Path: <gson@gson.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 9A9B67A1CB
	for <gnats-bugs@gnats.NetBSD.org>; Sat, 28 Oct 2017 13:53:01 +0000 (UTC)
Message-Id: <20171028135247.576BB98BD79@guava.gson.org>
Date: Sat, 28 Oct 2017 16:52:47 +0300 (EEST)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: scan-build script from clang-static-analyzer package fails
X-Send-Pr-Version: 3.95

>Number:         52663
>Category:       pkg
>Synopsis:       scan-build script from clang-static-analyzer package fails
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Oct 28 13:55:00 +0000 2017
>Last-Modified:  Sun Oct 29 16:25:01 +0000 2017
>Originator:     Andreas Gustafsson
>Release:        NetBSD 7.0
>Organization:

>Environment:
System: NetBSD
Architecture: x86_64
Machine: amd64
>Description:

The scan-build script from the lang/clang-static-analyzer package
fails with the message "error: action RunAnalysis not compiled in".

$ pkg_info -a|grep clang
clang-4.0.1         C language family frontend for LLVM
clang-static-analyzer-4.0.1 C language family frontend for LLVM

$ cat hello.c
#include <stdio.h>
int main(int argc, char **argv) {
   printf("hello, world\n");
}

$ rm -f hello

$ scan-build make hello
scan-build: Using '/usr/pkg/bin/clang-4.0' for static analysis
/usr/pkg/bin/../libexec/ccc-analyzer -O2   -o hello hello.c 
error: action RunAnalysis not compiled in
scan-build: 0 bugs found.
scan-build: The analyzer encountered problems on some source files.
scan-build: Preprocessed versions of these sources were deposited in '/tmp/scan-build-2017-10-28-163812-13178-1/failures'.
scan-build: Please consider submitting a bug report using these files:
scan-build:   http://clang-analyzer.llvm.org/filing_bugs.html

>How-To-Repeat:

See above.

>Fix:

>Audit-Trail:
From: coypu@sdf.org
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/52663: scan-build script from clang-static-analyzer package
 fails
Date: Sun, 29 Oct 2017 16:23:08 +0000

 I think I ended up forcing the clang package to build static analyzer to
 be able to use it.

 The two relevant lines are:
 Makefile: CMAKE_ARGS+=    -DCLANG_ENABLE_STATIC_ANALYZER=OFF
 Makefile.common: CMAKE_ARGS+=    -DCLANG_ENABLE_ARCMT=OFF

 Possibly the change to Makefile.common is the one, but unfortunately I
 can't test LLVM builds right now..

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.