為了改善您的使用體驗,本網站正在進行維護,部分功能暫時無法使用。若本站的文件無法解決您的問題,想要向社群發問的話,請到 Twitter 上的 @FirefoxSupport 或 Reddit 上的 /r/firefox 發問,我們的社群成員將很快會回覆您的疑問。

搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Firefox 68 build ./mach configure says "The pkg-config script could not be found"

  • 3 回覆
  • 1 有這個問題
  • 12 次檢視
  • 最近回覆由 crankygoat

more options

While attempting to build Firefox 68.0 on Solaris 11.4 SPARC, I get this:

...

0:20.13 checking whether the C++ compiler supports -fno-sized-deallocation... yes
0:20.16 ERROR: *** The pkg-config script could not be found. Make sure it is
0:20.16 *** in your path, or set the PKG_CONFIG environment variable
0:20.16 *** to the full path to pkg-config.
0:20.30 *** Fix above errors and then restart with\
0:20.30                "./mach build"
0:20.30 gmake: *** [client.mk:115: configure] Error 1

root@hemlock:~/firefox-68.0# I tried setting root@hemlock:~/firefox-68.0# PKG_CONFIG=/usr/lib/64/pkgconfig

But that didn't help. Now I get 0:07.15 checking for pkg_config... not found

0:07.15 DEBUG: pkg_config: Trying /usr/lib/64/pkgconfig
0:07.15 ERROR: Cannot find pkg_config

And I can't find anything called pkg_config either.

While attempting to build Firefox 68.0 on Solaris 11.4 SPARC, I get this: ... 0:20.13 checking whether the C++ compiler supports -fno-sized-deallocation... yes 0:20.16 ERROR: *** The pkg-config script could not be found. Make sure it is 0:20.16 *** in your path, or set the PKG_CONFIG environment variable 0:20.16 *** to the full path to pkg-config. 0:20.30 *** Fix above errors and then restart with\ 0:20.30 "./mach build" 0:20.30 gmake: *** [client.mk:115: configure] Error 1 root@hemlock:~/firefox-68.0# I tried setting root@hemlock:~/firefox-68.0# PKG_CONFIG=/usr/lib/64/pkgconfig But that didn't help. Now I get 0:07.15 checking for pkg_config... not found 0:07.15 DEBUG: pkg_config: Trying /usr/lib/64/pkgconfig 0:07.15 ERROR: Cannot find pkg_config And I can't find anything called pkg_config either.

所有回覆 (3)

more options

pkg-config is a command which takes arguments meant to tell your compiler which libraries and compiler flags are necessary to compile the source code for your system.

https://www.opencsw.org/package/pkgconfig/

https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions

more options

Thanks - that fixed that. Now I'm confused about this (from [https://developer.mozilla.org/en-US/d.../Cross-compiling_Mozilla|Cross-compiling_Mozilla] ): "GCC and binutils will expect to find the system headers and libraries under ${xprefix}/${xtarget_arch} so you will need to copy those files from the target system, preserving directory structure and modify any scripts as necessary"

Uh. *which* "system headers and libraries" are those? Are they talking about /usr/include and /usr/lib/pkgconfig? I'm supposed to copy those directories from the Sun to my Ubuntu x64?

more options

You are compiling on Ubuntu for Solaris? It will want at least the headers from /usr/include (at least for the languages FF is using). I think gcc -M will give you a makefile listing all the headers used by the FF source. Whatever the includes are.

System libraries on which Firefox will depend (/lib on Solaris, maybe other locations? https://docs.oracle.com/cd/E23823_01/html/819-0869/appa-3.html).

Honestly, a build look rather complicated to me: https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Build_Instructions/Solaris_Prerequisites

You might want to try one of the Mozilla IRC channels if this gets complicated. I am pretty much at my limit here without navigating such an adventure myself.

This also might be helpful. https://www3.ntu.edu.sg/home/ehchua/programming/cpp/gcc_make.html