NetBSD Problem Report #51978

From www@NetBSD.org  Fri Feb 17 15:58:22 2017
Return-Path: <www@NetBSD.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 "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 461557A26E
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 17 Feb 2017 15:58:22 +0000 (UTC)
Message-Id: <20170217155821.108477A2AB@mollari.NetBSD.org>
Date: Fri, 17 Feb 2017 15:58:21 +0000 (UTC)
From: org.netbsd@pooryorick.com
Reply-To: org.netbsd@pooryorick.com
To: gnats-bugs@NetBSD.org
Subject: hdf-4.2r2, p- implicit declaration of function 'yyerror'
X-Send-Pr-Version: www-1.0

>Number:         51978
>Category:       pkg
>Synopsis:       hdf-4.2r2, p- implicit declaration of function 'yyerror'
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 17 16:00:00 +0000 2017
>Originator:     Poor Yorick
>Release:        2016Q4
>Organization:
>Environment:
Linux 3.10.0-514.el7.x86_64
>Description:
building hdf-4.2r4, pkgsrc-2016Q4:

    ... -MD -MP -MF .deps/main.Tpo -c -o main.o main.c
    main.c: In function 'main':
    main.c:64:17: warning: implicit declaration of function 'getopt' [-Wimplicit-fun
    ction-declaration]
         while ((c = getopt(argc, argv, "bcfno:")) != EOF)
                 ^


And then later:

    tab.o -MD -MP -MF .deps/ncgentab.Tpo -c -o ncgentab.o ncgentab.c
    In file included from ./ncgen.y:681:0:
    ./ncgen.l: In function 'yylex':
    ./ncgen.l:35:5: warning: implicit declaration of function 'yyerror' [-Wimplicit-
    function-declaration]
         yyerror("string too long, truncated\n");
         ^
    ./ncgen.y: At top level:
    ./ncgen.y:685:1: warning: return type defaults to 'int' [-Wimplicit-int]
     yyerror(s) /* called for yacc syntax error */
     ^
    ./ncgen.y: In function 'yyparse':
    ./ncgen.y:539:11: warning: implicit declaration of function 'nctype' [-Wimplicit
    -function-declaration]
               nctype(valtype));
               ^

and finally:

    libtool-fortran: link: gcc .. -o .libs/hdfncgen ... 
    ncgentab.o: In function `yylex':
    ncgentab.c:(.text+0x1878): undefined reference to `yywrap'
    collect2: error: ld returned 1 exit status

After I added "-lfl" to $LIBS in the build environment, the problem
disappeared.

>How-To-Repeat:

>Fix:

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-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.