Skip to content

setup.py fails on Ubuntu14.04 / 64Bit #209

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
mackim83 opened this issue Apr 28, 2016 · 7 comments
Closed

setup.py fails on Ubuntu14.04 / 64Bit #209

mackim83 opened this issue Apr 28, 2016 · 7 comments

Comments

@mackim83
Copy link

I've tried to install with master branch and I took below messages.
Could you check below?

~/git/pythonnet$ sudo python setup.py install
running install
running bdist_egg
running egg_info
writing pythonnet.egg-info/PKG-INFO
writing top-level names to pythonnet.egg-info/top_level.txt
writing dependency_links to pythonnet.egg-info/dependency_links.txt
reading manifest file 'pythonnet.egg-info/SOURCES.txt'
writing manifest file 'pythonnet.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_ext
All packages listed in packages.config are already installed.
XBuild Engine Version 12.0
Mono, Version 4.2.3.0
Copyright (C) 2005-2013 Various Mono authors
/home/mackim-nuc/git/pythonnet/pythonnet.sln:  warning : The project configuration for project 'clrmodule' corresponding to the solution configuration 'ReleaseMono|x64' was not found.
XBuild Engine Version 12.0
Mono, Version 4.2.3.0
Copyright (C) 2005-2013 Various Mono authors
        Configuration: ReleaseMono Platform: x64
CSC: error CS0518: The predefined type `System.Object' is not defined or imported
CSC: error CS0518: The predefined type `System.ValueType' is not defined or imported
CSC: error CS0518: The predefined type `System.Attribute' is not defined or imported
CSC: error CS0518: The predefined type `System.Int32' is not defined or imported
CSC: error CS0518: The predefined type `System.UInt32' is not defined or imported
CSC: error CS0518: The predefined type `System.Int64' is not defined or imported
CSC: error CS0518: The predefined type `System.UInt64' is not defined or imported
CSC: error CS0518: The predefined type `System.Single' is not defined or imported
CSC: error CS0518: The predefined type `System.Double' is not defined or imported
CSC: error CS0518: The predefined type `System.Char' is not defined or imported
CSC: error CS0518: The predefined type `System.Int16' is not defined or imported
CSC: error CS0518: The predefined type `System.Decimal' is not defined or imported
CSC: error CS0518: The predefined type `System.Boolean' is not defined or imported
CSC: error CS0518: The predefined type `System.SByte' is not defined or imported
CSC: error CS0518: The predefined type `System.Byte' is not defined or imported
CSC: error CS0518: The predefined type `System.UInt16' is not defined or imported
CSC: error CS0518: The predefined type `System.String' is not defined or imported
CSC: error CS0518: The predefined type `System.Enum' is not defined or imported
CSC: error CS0518: The predefined type `System.Delegate' is not defined or imported
CSC: error CS0518: The predefined type `System.MulticastDelegate' is not defined or imported
CSC: error CS0518: The predefined type `System.Void' is not defined or imported
CSC: error CS0518: The predefined type `System.Array' is not defined or imported
CSC: error CS0518: The predefined type `System.Type' is not defined or imported
CSC: error CS0518: The predefined type `System.Collections.IEnumerator' is not defined or imported
CSC: error CS0518: The predefined type `System.Collections.IEnumerable' is not defined or imported
CSC: error CS0518: The predefined type `System.IDisposable' is not defined or imported
CSC: error CS0518: The predefined type `System.IntPtr' is not defined or imported
CSC: error CS0518: The predefined type `System.UIntPtr' is not defined or imported
CSC: error CS0518: The predefined type `System.RuntimeFieldHandle' is not defined or imported
CSC: error CS0518: The predefined type `System.RuntimeTypeHandle' is not defined or imported
CSC: error CS0518: The predefined type `System.Exception' is not defined or imported
Traceback (most recent call last):
  File "setup.py", line 354, in <module>
    setup_requires=setup_requires
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python2.7/dist-packages/setuptools/command/install.py", line 67, in run
    self.do_egg_install()
  File "/usr/local/lib/python2.7/dist-packages/setuptools/command/install.py", line 109, in do_egg_install
    self.run_command('bdist_egg')
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/local/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 161, in run
    cmd = self.call_command('install_lib', warn_dir=0)
  File "/usr/local/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 147, in call_command
    self.run_command(cmdname)
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/distutils/command/install_lib.py", line 92, in run
    self.build()
  File "/usr/lib/python2.7/distutils/command/install_lib.py", line 111, in build
    self.run_command('build_ext')
  File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command
    self.distribution.run_command(command)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/lib/python2.7/distutils/command/build_ext.py", line 339, in run
    self.build_extensions()
  File "/usr/lib/python2.7/distutils/command/build_ext.py", line 448, in build_extensions
    self.build_extension(ext)
  File "setup.py", line 187, in build_extension
    check_call(" ".join(cmd + ["/t:Build"]), shell=use_shell)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'xbuild pythonnet.sln /p:Configuration=ReleaseMono /p:Platform=x64 /p:DefineConstants="PYTHON27,UCS4,MONO_LINUX" /p:PythonBuildDir="/home/mackim-nuc/git/pythonnet/build/lib.linux-x86_64-2.7" /p:PythonInteropFile="interop27.cs" /verbosity:minimal /t:Build' returned non-zero exit status 1
@den-run-ai
Copy link
Contributor

@mackim83 you are likely missing one of dependencies:

https://github.com/pythonnet/pythonnet/blob/master/.travis.yml

- sudo add-apt-repository -y "deb http://archive.ubuntu.com/ubuntu/ trusty main universe"
  - sudo apt-get install software-properties-common
  - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
  - echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list
  - echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list
  - sudo apt-get update
  - sudo DEBIAN_FRONTEND=noninteractive apt-get -y -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confnew" install mono-devel mono-complete referenceassemblies-pcl ca-certificates-mono nunit-console

install:
  - pip install six
  - pip install pycparser
  - python setup.py build_ext --inplace
script:
  - export PYTHONPATH=`pwd`:$PYTHONPATH
  - python src/tests/runtests.py

@den-run-ai
Copy link
Contributor

also make sure that Py_ENABLE_SHARED and PYTHON_WITHOUT_ENABLE_SHARED are set or not set according to your python installation:

#119

@mackim83
Copy link
Author

mackim83 commented Apr 28, 2016

👍 Thanks for your help.
It works well!!

And I learned how to check for the installation in travis ci environment.

@den-run-ai
Copy link
Contributor

Can you please close the issue if no other problems appeared?

@mackim83
Copy link
Author

mackim83 commented Apr 28, 2016

Actually I had an issue about No package 'glib-2.0' found' after installing as you taught me.
So I installed libgtk-3-dev through Ubuntu Software Center and the issue was resolved.

@liumuqing
Copy link

don't have to install libgtk-3-dev
just apt-get install libglib2.0-dev is enough

@den-run-ai
Copy link
Contributor

feel free to contribute your findings on troubleshooting wiki and then post an update here or on mailing list:

https://github.com/pythonnet/pythonnet/wiki/Troubleshooting-on-Windows-and-Linux

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