bin/161846: bsdgrep causes regression in www/firefox port

Guido Falsi mad at madpilot.net
Thu Oct 20 23:10:10 UTC 2011


>Number:         161846
>Category:       bin
>Synopsis:       bsdgrep causes regression in www/firefox port
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 20 23:10:09 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Guido Falsi
>Release:        9.0-RC1
>Organization:
none
>Environment:
amd64 9.0-RC1

(sorry I don't have the affected machine available right now. I'll followup with the full details)
>Description:
On the affected machine I have 9.0-RC1 and WITH_BSD_GREP defined in src.conf.

Today I tried rebuilding the firefox port and it failed in a strange way on the file mozilla-release/js/src/jslock.cpp.

The problem disappeared after replacing gnugrep as the default grep.

After investigation I found out the problem happens in the configure stage, two files are generated in that directory: js-confdefs.h  and js-config.h.

in jsconfdefs there is a "#define JS_THREADSAFE 1" line, while in js-config I find "#undef JS_THREADSAFE", this breaks the build due to the order in which these two files are included. With gnugrep the files have the same define.(why the firefox build system should put the same defines in two files is beyond me, BTW)

I'm still trying to investigate this one further to identify exactly where is the faulty invocation of grep. I'm anyway posting this PR since this is already fully reproducible and maybe someone with a better knowledge about the firefox build process or the autotools can find the exact point of failure faster than me.

Here are the full files.

js-confdefs.h:
/* List of defines generated by configure. Included with preprocessor flag,
 * -include, to avoid long list of -D defines on the compile command-line.
 * Do not edit.
 */

#ifndef _JS_CONFDEFS_H_
#define _JS_CONFDEFS_H_

#define AVMPLUS_64BIT 1
#define AVMPLUS_AMD64 1
#define AVMPLUS_UNIX 1
#define CPP_THROW_NEW throw()
#define D_INO d_ino
#define EDITLINE 1
#define FEATURE_NANOJIT 1
#define HAVE_64BIT_OS 1
#define HAVE_CLOCK_MONOTONIC 1
#define HAVE_CPP_ACCESS_CHANGING_USING 1
#define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1
#define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1
#define HAVE_CPP_EXPLICIT 1
#define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX 1
#define HAVE_CPP_NAMESPACE_STD 1
#define HAVE_CPP_NEW_CASTS 1
#define HAVE_CPP_PARTIAL_SPECIALIZATION 1
#define HAVE_CPP_TYPENAME 1
#define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL 1
#define HAVE_DIRENT_H 1
#define HAVE_DLADDR 1
#define HAVE_DLOPEN 1
#define HAVE_FCHMOD 1
#define HAVE_FLOCKFILE 1
#define HAVE_GETC_UNLOCKED 1
#define HAVE_GETOPT_H 1
#define HAVE_GETPAGESIZE 1
#define HAVE_I18N_LC_MESSAGES 1
#define HAVE_ICONV 1
#define HAVE_ICONV_WITH_CONST_INPUT 1
#define HAVE_INT16_T 1
#define HAVE_INT32_T 1
#define HAVE_INT64_T 1
#define HAVE_LCHOWN 1
#define HAVE_LOCALECONV 1
#define HAVE_LOCALECONV 1
#define HAVE_LOCALTIME_R 1
#define HAVE_MBRTOWC 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMORY_H 1
#define HAVE_MMINTRIN_H 1
#define HAVE_NL_TYPES_H 1
#define HAVE_POSIX_FALLOCATE 1
#define HAVE_POSIX_MEMALIGN 1
#define HAVE_RANDOM 1
#define HAVE_SBRK 1
#define HAVE_SETLOCALE 1
#define HAVE_SIGINFO_T 1
#define HAVE_SNPRINTF 1
#define HAVE_SSIZE_T 1
#define HAVE_STATVFS 1
#define HAVE_STRERROR 1
#define HAVE_STRNDUP 1
#define HAVE_STRTOK_R 1
#define HAVE_ST_BLKSIZE 1
#define HAVE_SYS_CDEFS_H 1
#define HAVE_SYS_MOUNT_H 1
#define HAVE_SYS_STATVFS_H 1
#define HAVE_THREAD_TLS_KEYWORD 1
#define HAVE_TM_ZONE_TM_GMTOFF 1
#define HAVE_UINT 1
#define HAVE_UINT16_T 1
#define HAVE_UNISTD_H 1
#define HAVE_VALLOC 1
#define HAVE_VA_COPY 1
#define HAVE_VA_LIST_AS_ARRAY 1
#define HAVE_VISIBILITY_ATTRIBUTE 1
#define HAVE_VISIBILITY_HIDDEN_ATTRIBUTE 1
#define HAVE_WCRTOMB 1
#define HAVE_X11_XKBLIB_H 1
#define HAVE___CXA_DEMANGLE 1
#define JSGC_TESTPILOT 1
#define JS_ALIGN_OF_POINTER 8
#define JS_BITS_PER_WORD_LOG2 6
#define JS_BYTES_PER_DOUBLE 8
#define JS_BYTES_PER_WORD 8
#define JS_CPU_X64 1
#define JS_HAS_CTYPES 1
#define JS_HAVE_STDINT_H 1
#define JS_METHODJIT 1
#define JS_MONOIC 1
#define JS_POLYIC 1
#define JS_POLYIC_TYPED_ARRAY 1
#define JS_PUNBOX64 1
#define JS_THREADSAFE 1
#define JS_TRACER 1
#define MALLOC_H <sys/malloc.h>
#define MOZ_DLL_SUFFIX ".so"
#define NEW_H <new>
#define NS_ALWAYS_INLINE __attribute__((always_inline))
#define NS_ATTR_MALLOC __attribute__((malloc))
#define NS_NORETURN __attribute__((noreturn))
#define NS_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#define STATIC_EXPORTABLE_JS_API 1
#define STDC_HEADERS 1
#define UNIX_ASYNC_DNS 1
#define VA_COPY va_copy
#define XP_UNIX 1
#define _REENTRANT 1
#define _THREAD_SAFE 1

#endif /* _JS_CONFDEFS_H_ */

js-config.h:
/* js-config.h.  Generated automatically by configure.  */
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
 * vim: set ts=8 sw=4 et tw=78:
 *
 * ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is Mozilla Communicator client code, released
 * March 31, 1998.
 *
 * The Initial Developer of the Original Code is
 * Netscape Communications Corporation.
 * Portions created by the Initial Developer are Copyright (C) 1998
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either of the GNU General Public License Version 2 or later (the "GPL"),
 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

#ifndef js_config_h___
#define js_config_h___

/* Definitions set at build time that affect SpiderMonkey's public API.
   This header file is generated by the SpiderMonkey configure script,
   and installed along with jsapi.h.  */

/* Define to 1 if SpiderMonkey should support multi-threaded clients.  */
#undef JS_THREADSAFE

/* Define to 1 if SpiderMonkey should include ctypes support.  */
#define JS_HAS_CTYPES 1

/* Define to 1 if SpiderMonkey should support the ability to perform
   entirely too much GC.  */
#undef JS_GC_ZEAL

/* Define to 1 if the standard <stdint.h> header is present and
   useable.  See jstypes.h and jsstdint.h.  */
#define JS_HAVE_STDINT_H 1

/* Define to 1 if the <sys/types.h> defines int8_t, etc. */
#undef JS_SYS_TYPES_H_DEFINES_EXACT_SIZE_TYPES

/* Define to 1 if the N-byte __intN types are defined by the
   compiler.  */
#undef JS_HAVE___INTN

/* Define to 1 if #including <stddef.h> provides definitions for
   intptr_t and uintptr_t.  */
#undef JS_STDDEF_H_HAS_INTPTR_T

/* Define to 1 if #including <crtdefs.h> provides definitions for
   intptr_t and uintptr_t.  */
#undef JS_CRTDEFS_H_HAS_INTPTR_T

/* The configure script defines these if it doesn't #define
   JS_HAVE_STDINT_H.  */
#undef JS_INT8_TYPE
#undef JS_INT16_TYPE
#undef JS_INT32_TYPE
#undef JS_INT64_TYPE
#undef JS_INTPTR_TYPE
#define JS_BYTES_PER_WORD 8

/* Some mozilla code uses JS-friend APIs that depend on JS_TRACER and
   JS_METHODJIT being correct. */
#define JS_TRACER 1
#define JS_METHODJIT 1

#endif /* js_config_h___ */

>How-To-Repeat:
Try to build the www/firefox port when having bsdgrep as the default grep for the system.

Fails reproducibly when trying to compile mozilla-release/js/src/jslock.cpp, due to contrasting definition in configure generated include files.
>Fix:


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list