8000 Installation/build failure via MacPorts and macOS High Sierra with Mono · Issue #570 · pythonnet/pythonnet · GitHub
[go: up one dir, main page]

Skip to content

Installation/build failure via MacPorts and macOS High Sierra with Mono #570

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

Closed
nsbruce opened this issue Nov 12, 2017 · 1 comment
Closed

Comments

@nsbruce
Copy link
nsbruce commented Nov 12, 2017

Environment/Dependency Versions

> pkg-config --version
0.29.2
> mono --version
Mono JIT compiler version 5.2.0.224 (d15-3/14f2c81 Thu Aug 24 10:33:52 EDT 2017)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:                normal
	SIGSEGV:       altstack
	Notification:   kqueue
	Architecture:  amd64
	Disabled:        none
	Misc:              softdebug
	LLVM:             yes(3.6.0svn-mono-master/8b1520c)
	GC:                 sgen (concurrent by default)
> port info glib2
glib2 @2.54.2 (devel)
Variants:                       quartz, universal, [+]x11

Description:                  Glib is a library which includes support routines for C,
                                      such as lists, trees, hashes, memory allocation, and many
                                      other things.
Homepage:                   https://wiki.gnome.org/Projects/GLib

Extract Dependencies: xz
Build Dependencies:    libxml2
Library Dependencies: gettext, libffi, libiconv, pcre, zlib
Conflicts with:              glib2-devel
Platforms:                     darwin
License:                        LGPL-2+
Maintainers:                 Email: ryandesign@macports.org, GitHub: ryandesign
                                      Policy: openmaintainer
> python --version
Python 2.7.14
  • Operating System: macOS 10.13.1 (High Sierra)

Details

Moving a previous discussion from #555. The wiki recommends installing with Homebrew (and users like @vkhombal have seen success in doing so).

Attempting to run a similar install process with Macports instead of Homebrew fails. Since port install mono installs an older version, I build from the .pkg at mono-project.com (I've attempted with v5.4.0 and have since tried downgrading to v5.2.0 without any success).

The mono .pkg also installs pkg-config and glib (see figure below).

image

_TODO_
    print('TODO')

How to repeat error/failure

I downloaded the latest master, unzipped, and ran sudo python setup.py bdist_wheel (without sudo it doesn't run).

Error/Output

sudo python setup.py bdist_wheel
Password:
running bdist_wheel
running build
running build_ext
Checking for updates from https://www.nuget.org/api/v2/.
Currently running NuGet.exe 4.1.0.
Updating NuGet.exe to 4.3.0.
Update successful.
MSBuild auto-detection: using msbuild version '15.0' from '/Library/Frameworks/Mono.framework/Versions/Current/lib/mono/msbuild/15.0/bin/'.
Restoring NuGet package NUnit.ConsoleRunner.3.7.0.
Restoring NuGet package UnmanagedExports.1.2.7.
Restoring NuGet package NUnit.3.7.1.
Adding package 'NUnit.ConsoleRunner.3.7.0' to folder '/Users/nsbruce-school/Downloads/pythonnet-master/packages'
Adding package 'UnmanagedExports.1.2.7' to folder '/Users/nsbruce-school/Downloads/pythonnet-master/packages'
Adding package 'NUnit.3.7.1' to folder '/Users/nsbruce-school/Downloads/pythonnet-master/packages'
Added package 'UnmanagedExports.1.2.7' to folder '/Users/nsbruce-school/Downloads/pythonnet-master/packages'
Added package 'NUnit.ConsoleRunner.3.7.0' to folder '/Users/nsbruce-school/Downloads/pythonnet-master/packages'
Added package 'NUnit.3.7.1' to folder '/Users/nsbruce-school/Downloads/pythonnet-master/packages'

NuGet Config files used:
    /Users/nsbruce-school/Downloads/pythonnet-master/nuget.config
    /Users/nsbruce-school/.config/NuGet/NuGet.Config

Feeds used:
    /Users/nsbruce-school/.nuget/packages/
    https://dotnet.myget.org/F/dotnet-core/api/v3/index.json
    https://api.nuget.org/v3/index.json

Installed:
    3 package(s) to packages.config projects

>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<

XBuild Engine Version 14.0
Mono, Version 5.4.0.0
Copyright (C) 2005-2013 Various Mono authors

>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<

XBuild Engine Version 14.0
Mono, Version 5.4.0.0
Copyright (C) 2005-2013 Various Mono authors
		Configuration: ReleaseMono Platform: x64
delegatemanager.cs(204,13): warning CS0162: Unreachable code detected
runtime.cs(327,17): warning CS0162: Unreachable code detected
pythonexception.cs(64,13): warning CS0162: Unreachable code detected
pyobject.cs(50,13): warning CS0162: Unreachable code detected
pyscope.cs(534,13): warning CS0162: Unreachable code detected
Configuration: ReleaseMono Platform: x64
Configuration: ReleaseMono Platform: x64
dynamic.cs(121,28): warning CS0618: 'PythonEngine.RunString(string, IntPtr?, IntPtr?)' is obsolete: 'RunString is deprecated and will be removed. Use Exec/Eval/RunSimpleString instead.'
Configuration: ReleaseMono Platform: x64
Package mono-2 was not found in the pkg-config search path.
Perhaps you should add the directory containing `mono-2.pc'
to the PKG_CONFIG_PATH environment variable
No package 'mono-2' found
Traceback (most recent call last):
  File "setup.py", line 522, in <module>
    zip_safe=False,
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "setup.py", line 470, in run
    return bdist_wheel.bdist_wheel.run(self)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/wheel/bdist_wheel.py", line 204, in run
    self.run_command('build')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 340, in run
    self.build_extensions()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/command/build_ext.py", line 449, in build_extensions
    self.build_extension(ext)
  File "setup.py", line 270, in build_extension
    self._build_monoclr()
  File "setup.py", line 284, in _build_monoclr
    mono_libs = _check_output("pkg-config --libs mono-2", shell=True)
  File "setup.py", line 98, in _check_output
    output = subprocess.check_output(*args, **kwargs)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 219, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'pkg-config --libs mono-2' returned non-zero exit status 1
@nsbruce
Copy link
Author
nsbruce commented Nov 12, 2017

My previous attempts to solve the path error with mono-2.pc are recorded in issue #555.

@filmor filmor closed this as completed Aug 8, 2021
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

2 participants
0