Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install on macOS Mojave fails #113

Open
just-doit opened this issue Jul 10, 2019 · 5 comments
Open

Install on macOS Mojave fails #113

just-doit opened this issue Jul 10, 2019 · 5 comments

Comments

@just-doit
Copy link

The brew option --with-shared is no longer supported, so I omitted it, but it seems this causes some missing dev headers.
Make fails with Error: You need GLib 2 and JSON-GLib development headers installed to be able to compile this plugin.

@EionRobb
Copy link
Owner

What's the full output of the brew command?

@just-doit
Copy link
Author

just-doit commented Jul 10, 2019

When I include the --with-shared option I get:

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/core).
==> Updated Formulae
apache-flink

Usage: brew install [options] formula

Install formula.

formula is usually the name of the formula to install, but it can be specified
in several different ways.

Unless HOMEBREW_NO_INSTALL_CLEANUP is set, brew cleanup will be run for the
installed formulae or, every 30 days, for all formulae.

    -d, --debug                      If brewing fails, open an interactive
                                     debugging session with access to IRB or a
                                     shell inside the temporary build directory
        --env                        If std is passed, use the standard build
                                     environment instead of superenv.If super
                                     is passed, use superenv even if the formula
                                     specifies the standard build environment.
        --ignore-dependencies        An unsupported Homebrew development flag to
                                     skip installing any dependencies of any
                                     kind. If the dependencies are not already
                                     present, the formula will have issues. If
                                     you're not developing Homebrew, consider
                                     adjusting your PATH rather than using this
                                     flag.
        --only-dependencies          Install the dependencies with specified
                                     options but do not install the specified
                                     formula.
        --cc                         Attempt to compile using provided
                                     compiler. compiler should be the name
                                     of the compiler's executable, for instance
                                     gcc-7 for GCC 7. In order to use LLVM's
                                     clang, use llvm_clang. To specify the
                                     Apple-provided clang, use clang. This
                                     parameter will only accept compilers that
                                     are provided by Homebrew or bundled with
                                     macOS. Please do not file issues if you
                                     encounter errors while using this flag.
    -s, --build-from-source          Compile the specified formula from source
                                     even if a bottle is provided. Dependencies
                                     will still be installed from bottles if
                                     they are available.
        --force-bottle               Install from a bottle if it exists for the
                                     current or newest version of macOS, even if
                                     it would not normally be used for
                                     installation.
        --include-test               Install testing dependencies required to
                                     run brew test.
        --devel                      If formula defines it, install the
                                     development version.
        --HEAD                       If formula defines it, install the HEAD
                                     version, aka. master, trunk, unstable.
        --fetch-HEAD                 Fetch the upstream repository to detect if
                                     the HEAD installation of the formula is
                                     outdated. Otherwise, the repository's HEAD
                                     will be checked for updates when a new
                                     stable or development version has been
                                     released.
        --keep-tmp                   Don't delete the temporary files created
                                     during installation.
        --build-bottle               Prepare the formula for eventual bottling
                                     during installation.
        --bottle-arch                Optimise bottles for the given architecture
                                     rather than the oldest architecture
                                     supported by the version of macOS the
                                     bottles are built on.
    -f, --force                      Install without checking for previously
                                     installed keg-only or non-migrated
                                     versions.
    -v, --verbose                    Print the verification and postinstall
                                     steps.
        --display-times              Print install times for each formula at the
                                     end of the run.
    -i, --interactive                Download and patch formula, then open a
                                     shell. This allows the user to run
                                     ./configure --help and otherwise
                                     determine how to turn the software package
                                     into a Homebrew package.
    -g, --git                        Create a Git repository, useful for
                                     creating patches to the software.
    -h, --help                       Show this message.
Error: invalid option: --with-shared

Without this option I get:

Warning: json-glib 1.4.4_1 is already installed and up-to-date
To reinstall 1.4.4_1, run `brew reinstall json-glib`
Warning: pidgin 2.13.0_3 is already installed and up-to-date
To reinstall 2.13.0_3, run `brew reinstall pidgin`
Warning: discount 2.2.4 is already installed and up-to-date
To reinstall 2.2.4, run `brew reinstall discount`

@EionRobb
Copy link
Owner

Whoops, sorry, I meant: are you able to post the full output of the build failing (including the brew step) - is it failing on the pkg-config step, to try find the json-glib/pidign dev headers?

@just-doit
Copy link
Author

Not 100% sure, what exactly you need, but here we go.

Command: brew install json-glib pidgin discount. Did a brew uninstall first.

Updating Homebrew...
==> Auto-updated Homebrew!
Updated 2 taps (homebrew/core and homebrew/cask).
==> Updated Formulae
python ✔           babel              dnstwist           fonttools          janet              minio              openconnect        sysdig
amazon-ecs-cli     chronograf         doitlive           ghostscript        jsoncpp            minio-mc           redex              tomcat
ansible            ckan               dosbox             glide              lgogdownloader     mono               serverless         tomcat@8
ask-cli            convox             erlang             gradle             libjson-rpc-cpp    nim                ship               [email protected]
aws-sdk-cpp        digdag             exploitdb          hcloud             libsbol            node               sip

==> Installing dependencies for json-glib: python
==> Installing json-glib dependency: python
==> Downloading https://homebrew.bintray.com/bottles/python-3.7.4.mojave.bottle.tar.gz
==> Downloading from https://akamai.bintray.com/81/81fc6e5914a16387bd09387ce08e99122ea3ad65c55ded42ea07f40952aa20d1?__gda__=exp=1562822009~hmac=9bf791f6a10b
######################################################################## 100.0%
==> Pouring python-3.7.4.mojave.bottle.tar.gz
==> /usr/local/Cellar/python/3.7.4/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.4/bin --in
==> /usr/local/Cellar/python/3.7.4/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.4/bin --in
==> /usr/local/Cellar/python/3.7.4/bin/python3 -s setup.py --no-user-cfg install --force --verbose --install-scripts=/usr/local/Cellar/python/3.7.4/bin --in
==> Caveats
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/python/libexec/bin

If you need Homebrew's Python 2.7 run
  brew install python@2

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python
==> Summary
🍺  /usr/local/Cellar/python/3.7.4: 3,865 files, 60MB
==> Installing json-glib
==> Downloading https://homebrew.bintray.com/bottles/json-glib-1.4.4_1.mojave.bottle.tar.gz
Already downloaded: /Users/dirkmika/Library/Caches/Homebrew/downloads/f8e8c09a1f1953e109d57ea57e60adc000331c814514f136ddd42b15ca625514--json-glib-1.4.4_1.mojave.bottle.tar.gz
==> Pouring json-glib-1.4.4_1.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/json-glib/1.4.4_1: 109 files, 1.2MB
==> Downloading https://homebrew.bintray.com/bottles/pidgin-2.13.0_3.mojave.bottle.tar.gz
Already downloaded: /Users/dirkmika/Library/Caches/Homebrew/downloads/b1ec2ca35f87a5a93b2662067be7524417f222e285d168636d99f375bd3c8f3b--pidgin-2.13.0_3.mojave.bottle.tar.gz
==> Pouring pidgin-2.13.0_3.mojave.bottle.tar.gz
🍺  /usr/local/Cellar/pidgin/2.13.0_3: 940 files, 31.7MB
==> Downloading https://homebrew.bintray.com/bottles/discount-2.2.4.mojave.bottle.1.tar.gz
Already downloaded: /Users/dirkmika/Library/Caches/Homebrew/downloads/6e1cc03be0a3242c544fd2efce6f512594bb99c33e7afd242e2d1751e881103c--discount-2.2.4.mojave.bottle.1.tar.gz
==> Pouring discount-2.2.4.mojave.bottle.1.tar.gz
🍺  /usr/local/Cellar/discount/2.2.4: 32 files, 368.6KB
==> Caveats
==> python
Python has been installed as
  /usr/local/bin/python3

Unversioned symlinks `python`, `python-config`, `pip` etc. pointing to
`python3`, `python3-config`, `pip3` etc., respectively, have been installed into
  /usr/local/opt/python/libexec/bin

If you need Homebrew's Python 2.7 run
  brew install python@2

You can install Python packages with
  pip3 install <package>
They will install into the site-package directory
  /usr/local/lib/python3.7/site-packages

See: https://docs.brew.sh/Homebrew-and-Python

I omit the `git clone` part, since this works. :-)

Command: make && sudo make install

Error: You need GLib 2 and JSON-GLib development headers installed to be able to compile this plugin
Password:
Error: You need GLib 2 and JSON-GLib development headers installed to be able to compile this plugin
mkdir -p `pkg-config --variable=datadir purple`/pixmaps/pidgin/protocols/16
mkdir -p `pkg-config --variable=datadir purple`/pixmaps/pidgin/protocols/22
mkdir -p `pkg-config --variable=datadir purple`/pixmaps/pidgin/protocols/48
install mattermost16.png `pkg-config --variable=datadir purple`/pixmaps/pidgin/protocols/16/mattermost.png
install mattermost22.png `pkg-config --variable=datadir purple`/pixmaps/pidgin/protocols/22/mattermost.png
install mattermost48.png `pkg-config --variable=datadir purple`/pixmaps/pidgin/protocols/48/mattermost.png
mkdir -p `pkg-config --variable=plugindir purple`
install -p FAILNOLIBS `pkg-config --variable=plugindir purple`
install: FAILNOLIBS: No such file or directory
make: *** [install] Error 71

Last time I just did a make and not the make && sudo make install combo. The make statement fails with just the following message, without setting a return code != 0, btw.

Error: You need GLib 2 and JSON-GLib development headers installed to be able to compile this plugin
I then took a look at the Makefile and found that the following check failed:
ifeq ($(shell $(PKG_CONFIG) --exists glib-2.0 json-glib-1.0 2>/dev/null && echo "true"),)
So I did the check manually and got the following result:

Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libffi', required by 'gobject-2.0', not found

A brew list libffi lists:

/usr/local/Cellar/libffi/3.2.1/lib/libffi.6.dylib
/usr/local/Cellar/libffi/3.2.1/lib/libffi-3.2.1/ (2 files)
/usr/local/Cellar/libffi/3.2.1/lib/pkgconfig/libffi.pc
/usr/local/Cellar/libffi/3.2.1/lib/ (2 other files)
/usr/local/Cellar/libffi/3.2.1/share/info/libffi.info
/usr/local/Cellar/libffi/3.2.1/share/man/ (4 files)

So the package seems to be installed. I then checked /usr/local/lib/pkgconfigand there was no symlink for libffi. So I added it manually.

After that I was able to make & sudo make install.

Why the Symlink was missing is not clear to me. Maybe my system was just a mess. :-)

@sauttefk
Copy link

OK, had the same problem.
pkg-config and symlink to libffi were missing.

Solution:

  • brew install pkg-config
  • pushd .; \
    cd /usr/local/lib/pkgconfig/; \
    ln -s ../../Cellar/libffi/3.2.1/lib/pkgconfig/libffi.pc .; \
    popd

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants