Generic Build

From K-3D

Jump to: navigation, search

Build Overview

  • K-3D version: 0.5 / 0.6.
  • Build environment: autotools + gcc.
  • Runtime environment: Most Posix platforms.
  • Pros
    • Preferred environment for most K-3D developers.
    • Preferred method of building K-3D, since it uses a 100% GNU toolchain.
    • Native OpenGL performance.
    • Stable.
  • Cons
  • Known Issues
    • None.
  • Requirements
  • Important Notes
    • At least 1 Gb of disk space is required to build K-3D, more if you install the binaries.
    • Not all features are available on all platforms, and some features may be disabled depending on the libraries available on the local host.
    • Ensure that you have a clean development platform: multiple versions of a library installed on your system can cause the compiler to pull-in a different version than is expected and yield either compilation or link errors. A majority of our support requests usually trace back to this.
    • If you are compiling K-3D on a package-based distribution, you must install both the library and the development halves of K-3D's dependencies: if you've installed "package.rpm" you need to install "package-devel.rpm". Similarly, "package.deb" requires "package-dev.deb".
    • Due to differences in the C++ ABI between different versions of gcc, care must be taken to ensure that K-3D and its dependencies are all compiled with the same compiler version. Unfortuncately GCC ABI incompatibilities aren't always detected at link time, and will yield strange behaviours when running K-3D. The symptom seen most often when trying to use incompatible libraries is a hang in an infinite loop at program startup during plugin loading. Libraries written in plain "C" are less of a problem.
    • With GCC >= 4.0 use libboost >= 1.33: the old boost source files included with K-3D package will yield infinite loops, use --with-external-boost at configure time.

Download Sources

Obtain the K-3D sources, from either CVS or K-3D Downloads.

Build Instructions

In your shell, cd into the K-3D source tree:

$ cd k3d

If (and only if) you obtained K-3D from CVS, run bootstrap:

$ LANG="" ./bootstrap

or use single quotes (LANG=) if using Mingw and msys

Now, regardless of how you obtained the K-3D source, check for available configuration options:

$ ./configure --help

Make note of any options you wish to override, then run configure for real:

$ LANG="" ./configure <additional options here>

See more options on Optimizing And Saving Space.

Tip:For more ./configure options run ./configure --help. Probably you will use --prefix=PUT_YOUR_PATH_HERE to change the installation directory. The default is /usr/local/k3d.

If configure fails, it is usually due to missing library dependencies. Either obtain the missing libraries, or follow the instructions on how to disable features that require those libraries.

Once configure has completed successfully, build the software:

$ make

While waiting for the build to complete, resist the temptation to tell us it's a long build - we already figured that out.

Once the build completes, try testing it before installation:

$ make test

Assuming all went well, install the new binaries:

$ su -c "make install"

Enjoy!

Autotools

Autotools emcompass the following 3 packages :

  • libtools
  • autoconf
  • automake

Note about pkg-config

Starting from pkg-config 0.17, package flags queries no longer returns flags for dependent packages. A temporary fix (until K-3D handles this new pkg-config behaviour) is to rebuild pkg-config itself with --enable-indirect-deps .

Personal tools