Closed Bug 1725906 Opened 3 years ago Closed 3 years ago

"ERROR: No package 'zlib' found" with `ac_add_options --enable-project=js` after bug 1724374 on macOS 10.15.7

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(firefox-esr78 unaffected, firefox-esr91 unaffected, firefox91 unaffected, firefox92 unaffected, firefox93 affected)

RESOLVED DUPLICATE of bug 1725855
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- unaffected
firefox91 --- unaffected
firefox92 --- unaffected
firefox93 --- affected

People

(Reporter: arai, Unassigned)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression)

Steps to reproduce:

  1. create mozconfig with ac_add_options --enable-project=js, on macOS 10.15.7
  2. run ./mach build

Expected result:
successful build.

Actual result:

before 81b5d5665b4e
successful build with:

 0:11.51 checking for NSIS version... no
 0:11.53 checking for llvm-objdump... /Users/arai/.mozbuild/clang/bin/llvm-objdump
 0:11.54 checking for zlib >= 1.2.3... yes

OBJDIR/config.log contains:

INFO: checking for zlib >= 1.2.3... 
DEBUG: Executing: `/usr/local/bin/pkg-config --errors-to-stdout --print-errors 'zlib >= 1.2.3'`
INFO: yes
INFO: checking MOZ_ZLIB_CFLAGS... 
DEBUG: Executing: `/usr/local/bin/pkg-config --cflags 'zlib >= 1.2.3'`
INFO: 
INFO: checking MOZ_ZLIB_LIBS... 
DEBUG: Executing: `/usr/local/bin/pkg-config --libs 'zlib >= 1.2.3'`
INFO: -lz

after 81b5d5665b4e
build failure with:

 0:14.16 checking for NSIS version... no
 0:14.19 checking for llvm-objdump... /Users/arai/.mozbuild/clang/bin/llvm-objdump
 0:14.21 checking for zlib >= 1.2.3... no
 0:14.21 ERROR: Package zlib was not found in the pkg-config search path.
 0:14.21 ERROR: Perhaps you should add the directory containing `zlib.pc'
 0:14.21 ERROR: to the PKG_CONFIG_PATH environment variable
 0:14.21 ERROR: No package 'zlib' found

OBJDIR/config.log contains:

INFO: checking for zlib >= 1.2.3... 
DEBUG: Executing: `/usr/local/bin/pkg-config --errors-to-stdout --print-errors 'zlib >= 1.2.3'`
INFO: no
ERROR: Package zlib was not found in the pkg-config search path.
ERROR: Perhaps you should add the directory containing `zlib.pc'
ERROR: to the PKG_CONFIG_PATH environment variable
ERROR: No package 'zlib' found

Some observation:

env in https://searchfox.org/mozilla-central/rev/d3683dbb252506400c71256ef3994cdbdfb71ada/build/moz.configure/pkg.configure#117 is None before 81b5d5665b4e,
and is a dict after 81b5d5665b4e, that contains an entry 'PKG_CONFIG_LIBDIR': '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/pkgconfig:/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/x86_64-apple-darwin19.6.0/pkgconfig:/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/share/pkgconfig'.

running /usr/local/bin/pkg-config --debug --errors-to-stdout --print-errors 'zlib >= 1.2.3' prints the following and exits with status 0.

no output option set, defaulting to --exists
Error printing disabled by default due to use of output options --exists, --atleast/exact/max-version, --list-all or no output option at all. Value of --print-errors: 1
Error printing enabled
Adding virtual 'pkg-config' package to list of known packages
Looking for package 'zlib'
Looking for package 'zlib-uninstalled'
Reading 'zlib' from file '/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.15/zlib.pc'
Parsing package file '/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.15/zlib.pc'
  line>homebrew_sdkroot=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk
 Variable declaration, 'homebrew_sdkroot' has value '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk'
  line>prefix=${homebrew_sdkroot}/usr
 Variable declaration, 'prefix' has value '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr'
  line>exec_prefix=/usr
 Variable declaration, 'exec_prefix' has value '/usr'
  line>libdir=${exec_prefix}/lib
 Variable declaration, 'libdir' has value '/usr/lib'
  line>sharedlibdir=${libdir}
 Variable declaration, 'sharedlibdir' has value '/usr/lib'
  line>includedir=${prefix}/include
 Variable declaration, 'includedir' has value '/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/include'
  line>
  line>Name: zlib
  line>Description: zlib compression library
  line>Version: 1.2.11
  line>
  line>Requires:
  line>Libs: -L${libdir} -L${sharedlibdir} -lz
  line>Cflags:
Path position of 'zlib' is 4
Adding 'zlib' to list of known packages
Package zlib has -L /usr/lib in Libs
Removing -L /usr/lib from libs for zlib
Package zlib has -L /usr/lib in Libs
Removing -L /usr/lib from libs for zlib

running PKG_CONFIG_LIBDIR=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/pkgconfig:/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/lib/x86_64-apple-darwin19.6.0/pkgconfig:/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk/usr/share/pkgconfig /usr/local/bin/pkg-config --debug --errors-to-stdout --print-errors 'zlib >= 1.2.3' prints the following and exits with 1.

no output option set, defaulting to --exists
Error printing disabled by default due to use of output options --exists, --atleast/exact/max-version, --list-all or no output option at all. Value of --print-errors: 1
Error printing enabled
Adding virtual 'pkg-config' package to list of known packages
Looking for package 'zlib'
Looking for package 'zlib-uninstalled'
Package zlib was not found in the pkg-config search path.
Perhaps you should add the directory containing `zlib.pc'
to the PKG_CONFIG_PATH environment variable
No package 'zlib' found

so, looks like the build system has dependency to zlib.pc in homebrew, and after 81b5d5665b4e it doesn't use homebrew's files.

Set release status flags based on info from the regressing bug 1724374

This is happening for me to, adding to mach busted since I didn't see it in there.

Blocks: mach-busted

I can also confirm that checking out the revision before the regressing bug c83998e348e746d6c321e9ea8ba8eff07d39d649 will work around this failure, and SpiderMonkey will build just fine.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → DUPLICATE
Has Regression Range: --- → yes
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/6a4936254be6 adjust expectation for midi-reporting.https.html on Android
You need to log in before you can comment on or make changes to this bug.