Skip to content
Edwin Young edited this page Jun 1, 2015 · 2 revisions

Q: When I try to compile Gnofract 4D why do I get this error?

 Traceback (most recent call last):
   File "./setup.py", line 4, in ?
     from distutils.core import setup, Extension
 ImportError: No module named distutils.core

A: Python-devel is not installed

I've seen this on SuSE, where they split the distutils module into a separate python-devel package which is not installed by default. Personally I think that's a really bad idea, but c'est la vie. To compile Gnofract 4D successfully on SuSE linux, you must have these packages installed beyond the defaults:

  • python-devel
  • gtk2-devel
  • gconf2-devel
  • libpng-devel
  • libjpeg-devel
  • gcc
  • gcc-c++

Install those using YaST then try compiling again.

Q: When I try to compile older versions of Gnofract 4D on Ubuntu, why do I get this error?

 Can't set up. Error running 'pkg-config gconf-2.0 --cflags'.
 Package gconf-2.0 was not found in the pkg-config search path.
 Perhaps you should add the directory containing `gconf-2.0.pc'
 to the PKG_CONFIG_PATH environment variable
 No package 'gconf-2.0' found
 Possibly you don't have one of these installed: 'gconf-2.0'.

A: libgconf2-dev is not installed

You need to install the libgconf2-dev package, which is required to build programs which use gconf. Newer versions will still compile if you don't have gconf2-devel, but they will be unable to pick up your browser settings from gconf.

Q: When I try to compile Gnofract 4D, why do I get this error?

 cc: error trying to exec 'cc1plus': execvp: No such file or directory
 error: command 'gcc' failed with exit status 1

A: You have the C compiler installed, but not the C++ compiler.

You need to install the g++ (sometimes called gcc-c++) package, which is required to build C++ programs.

Q: When I run setup.py, how come I get messages about 'NO JPEG HEADERS FOUND'?

A: Jpeg headers are not installed

Gnofract4D contains some optional functionality - the compiled version always contains it, but if you compile it yourself, Gnofract4D will try to detect the things it needs to build that optional functionality. If it can't find it, Gnofract4D will still compile and work (though some unit tests will fail) but won't contain that ability. To fix this, you need to install the right libraries and headers.

The relevant pieces are: 1) PNG headers. The package containing these is usually 'libpng-devel', or 'libpng12-dev'. If you don't have this you can't save to PNG files.

  1. JPEG headers. The package containing these is usually 'libjpeg-devel' or 'libjpeg62-dev'. If you don't have this you can't sane to JPEG files.

Q: When I run setup.py, it fails with this message (and lots more). What's up?

 fract4d/c/fract4dmodule.cpp:14:20: error: Python.h: No such file or directory

A: You don't have the headers for Python installed.

They are usually in a package called 'python-dev' or similar.

Q: I installed the Jpeg/PNG headers, but setup.py still complains it can't find them. What gives?

A: This is a known issue with Ubuntu and it's derivatives version 11.10 and higher

You are missing the package 'pkg-config'. If you are missing this then you may also be missing 'build-essential' which is Canonical's recommended way to install the basic development tools for Ubuntu.