Skip to content

Error building in Linux #571

Closed
Closed
@Cronan

Description

@Cronan

Environment

  • Pythonnet version: 2.4.0
  • Python version: 2.7.5
  • Operating System: Red Hat Enterprise Linux Server release 7.3 (Maipo)
  • DotNet version: 2.0.0

Details

  • Error restoring packages while trying to build from the command line in Linux

  • I used the following commands to create the issue:

    pip install wheel
    pip install pytest
    git clone https://github.com/pythonnet/pythonnet.git
    cd pythonnet
    python setup.py bdist_wheel --xplat
  • Details of the error below:
running bdist_wheel
running build
running build_ext
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Restore completed in 24.15 ms for /users/isys/icronyn/git/pythonnet/src/testing/Python.Test.15.csproj.
  Restore completed in 24.16 ms for /users/isys/icronyn/git/pythonnet/src/console/Console.15.csproj.
  Restore completed in 26.29 ms for /users/isys/icronyn/git/pythonnet/src/runtime/Python.Runtime.15.csproj.
  Restore completed in 86.12 ms for /users/isys/icronyn/git/pythonnet/src/embed_tests/Python.EmbeddingTest.15.csproj.
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

pyobject.cs(50,13): warning CS0162: Unreachable code detected [/users/isys/icronyn/git/pythonnet/src/runtime/Python.Runtime.15.csproj]
pythonexception.cs(64,13): warning CS0162: Unreachable code detected [/users/isys/icronyn/git/pythonnet/src/runtime/Python.Runtime.15.csproj]
delegatemanager.cs(204,13): warning CS0162: Unreachable code detected [/users/isys/icronyn/git/pythonnet/src/runtime/Python.Runtime.15.csproj]
pyscope.cs(534,13): warning CS0162: Unreachable code detected [/users/isys/icronyn/git/pythonnet/src/runtime/Python.Runtime.15.csproj]
  Python.Runtime.15 -> /users/isys/icronyn/git/pythonnet/src/runtime/bin/Python.Runtime.dll
pyobject.cs(50,13): warning CS0162: Unreachable code detected [/users/isys/icronyn/git/pythonnet/src/runtime/Python.Runtime.15.csproj]
delegatemanager.cs(204,13): warning CS0162: Unreachable code detected [/users/isys/icronyn/git/pythonnet/src/runtime/Python.Runtime.15.csproj]
pythonexception.cs(64,13): warning CS0162: Unreachable code detected [/users/isys/icronyn/git/pythonnet/src/runtime/Python.Runtime.15.csproj]
pyscope.cs(534,13): warning CS0162: Unreachable code detected [/users/isys/icronyn/git/pythonnet/src/runtime/Python.Runtime.15.csproj]
  Python.Runtime.15 -> /users/isys/icronyn/git/pythonnet/src/runtime/bin/netstandard2.0/Python.Runtime.dll
  Console.15 -> /users/isys/icronyn/git/pythonnet/src/console/bin/nPython.exe
  Python.Test.15 -> /users/isys/icronyn/git/pythonnet/src/testing/bin/Python.Test.dll
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.' [/users/isys/icronyn/git/pythonnet/src/embed_tests/Python.EmbeddingTest.15.csproj]
  Python.EmbeddingTest.15 -> /users/isys/icronyn/git/pythonnet/src/embed_tests/bin/Python.EmbeddingTest.dll
  Python.Test.15 -> /users/isys/icronyn/git/pythonnet/src/testing/bin/netstandard2.0/Python.Test.dll
  Console.15 -> /users/isys/icronyn/git/pythonnet/src/console/bin/netcoreapp2.0/nPython.dll
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.' [/users/isys/icronyn/git/pythonnet/src/embed_tests/Python.EmbeddingTest.15.csproj]
  Python.EmbeddingTest.15 -> /users/isys/icronyn/git/pythonnet/src/embed_tests/bin/netcoreapp2.0/Python.EmbeddingTest.dll
Microsoft (R) Build Engine version 15.3.409.57025 for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

  Python.Runtime.15 -> /users/isys/icronyn/git/pythonnet/src/runtime/bin/netstandard2.0/Python.Runtime.dll
  Console.15 -> /users/isys/icronyn/git/pythonnet/src/console/bin/netcoreapp2.0/nPython.dll
  Console.15 -> /users/isys/icronyn/git/pythonnet/build/lib.linux-x86_64-2.7/netcoreapp2.0/
  Python.EmbeddingTest.15 -> /users/isys/icronyn/git/pythonnet/src/embed_tests/bin/netcoreapp2.0/Python.EmbeddingTest.dll
  Python.EmbeddingTest.15 -> /users/isys/icronyn/git/pythonnet/src/embed_tests/bin/netcoreapp2.0_publish/
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/man/releases/python-medusa/27-1/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/opt/man/releases/python-medusa/27-1/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/opt/man/releases/python-medusa/27-1/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 "/users/isys/icronyn/pyenvs/pythonnet/lib/python2.7/site-packages/wheel-0.30.0-py2.7.egg/wheel/bdist_wheel.py", line 204, in run
    self.run_command('build')
  File "/opt/man/releases/python-medusa/27-1/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/opt/man/releases/python-medusa/27-1/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/opt/man/releases/python-medusa/27-1/lib/python2.7/distutils/command/build.py", line 127, in run
    self.run_command(cmd_name)
  File "/opt/man/releases/python-medusa/27-1/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/opt/man/releases/python-medusa/27-1/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/opt/man/releases/python-medusa/27-1/lib/python2.7/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/opt/man/releases/python-medusa/27-1/lib/python2.7/distutils/command/build_ext.py", line 448, 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/man/releases/python-medusa/27-1/lib/python2.7/subprocess.py", line 573, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command 'pkg-config --libs mono-2' returned non-zero exit status 1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions