Ask Your Question
0

Need help for first build macOS High Sierra

asked 2017-12-30 17:01:52 +0100

GrimSleepless gravatar image

Hi everyone,

I have been trying to build libreoffice on my machine. I tried to fix it by reading the documentation available and use google to see if anyone ever had a similar issue to mine and I seem to be unable to find anything that may help me fix the error I receive from autotools.

Here is the error I got from autogen.sh :

checking for bogus pkg-config... configure: error: yes, from unknown origin. This *will* break the build. Please modify your PATH variable so that /usr/local/bin/pkg-config is no longer found by configure scripts.
Error running configure at ./autogen.sh line 293.

and here is the build verbose :

Running ./configure with '--srcdir=/Users/jefflabonte/Documents/Development/FOSS/core --enable-option-checking=fatal'
********************************************************************
*
*   Running LibreOffice build configuration.
*
********************************************************************

checking build system type... x86_64-apple-darwin17.3.0
checking host system type... x86_64-apple-darwin17.3.0
checking for product name... LibreOfficeDev
checking for package version... 6.1.0.0.alpha0+
checking for product version... 6.1
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for grep... (cached) /usr/bin/grep
checking for GNU Make... /usr/bin/make
checking for sed... /usr/bin/sed
checking whether to use link-time optimization... no
checking for explicit AFLAGS... no
checking for explicit CFLAGS... no
checking for explicit CXXFLAGS... no
checking for explicit OBJCFLAGS... no
checking for explicit OBJCXXFLAGS... no
checking for explicit LDFLAGS... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for library containing dlsym... none required
checking whether build target is Release Build... no
checking whether to sign windows build... no
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking for awk... /usr/bin/awk
checking for bash... /bin/sh
checking for GNU or BSD tar... gnutar
checking for tar's option to strip components... --strip-components
checking how to build and package galleries... internal src images for desktop
checking for ccache... not found
checking gcc home... /usr
checking for gcc... /usr/bin/gcc
checking whether to build with Java support... yes
checking what Mac OS X SDK to use... SDK 10.13 at /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
checking what compiler to use... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -m64  -mmacosx-version-min=10.9 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk and /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -m64  -stdlib=libc++ -mmacosx-version-min=10.9 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk
checking that macosx-version-min-required is coherent ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2017-12-30 19:11:38 +0100

logician13 gravatar image

In a terminal window, enter the command "which pkg-config". bash will search the PATH directories for a pkg-config file, and on my system it found one in /usr/local/bin. My guess is that it will find one there on your system, too. It's probably a remnant of another package installation, possibly one for Python.

Note: depending on the owner of the /usr/local/bin/pkg-config file, you may need to use sudo or chown to handle any ownership issues as part of performing the steps suggested below.

You could use the "mv" command to temporarily rename the pkg-config file in /usr/local/bin to some other name or to another directory that's NOT in the PATH list. Use the command "echo $PATH" to see the colon delimited list of directories in PATH. After the build, you can again use "mv" to reinstate that file. For instance

jsmith$ mv /usr/local/bin/pkg-config /usr/local/bin/pkg-config.restore-after-build

After the build, you would rename it back:

jsmith$ mv /usr/local/bin/pkg-config.restore-after-build /usr/local/bin/pkg-config

A riskier approach would be to use the "export" command to redefine the PATH setting in the terminal window where you are running autogen.sh, and eventually the build. Your new PATH setting would not include "/usr/local/bin:". That directory typically contains products you've installed, so it's possible but unlikely the LibreOffice build will need them. For instance:

jsmith$ echo $PATH

/Users/jsmith/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/opt/X11/bin

Note the presence of /usr/local/bin: in the setting. In the following export command, /usr/local/bin: has been removed.

jsmith$ export PATH=/Users/jsmith/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/MacGPG2/bin:/opt/X11/bin

jsmith$ echo $PATH

/Users/jsmith/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/opt/X11/bin

Changes to the PATH setting are only known to that terminal window and processes started from that window. If that window is closed, or if that setting is needed in another terminal window, the steps to alter the PATH setting will need to be repeated.

edit flag offensive delete link more

Comments

Thank you for your quick answer. It worked.

GrimSleepless gravatar imageGrimSleepless ( 2017-12-30 21:23:42 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2017-12-30 17:01:52 +0100

Seen: 225 times

Last updated: Dec 30 '17