Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Plone 3.3 Site Administration

You're reading from   Plone 3.3 Site Administration Manage your site like a Plone professional

Arrow left icon
Product type Paperback
Published in Jul 2010
Publisher Packt
ISBN-13 9781847197047
Length 240 pages
Edition 1st Edition
Languages
Tools
Concepts
Arrow right icon
Author (1):
Arrow left icon
Alex Clark Alex Clark
Author Profile Icon Alex Clark
Alex Clark
Arrow right icon
View More author details
Toc

Table of Contents (15) Chapters Close

Plone 3.3 Site Administration
Credits
Foreword
About the Author
About the Reviewer
Preface
1. Background 2. Site Basics FREE CHAPTER 3. Appearance 4. Administration 5. Deployment and Maintenance 6. Optimization 7. Security 8. The Future Index

How to install a C compiler


Both Python and Zope 2 require a C compiler to build from source. So let us take a minute to explore the available options. Regardless of the packaging, each of the following software provides some version of the GNU Compiler Collection (GCC) and libraries (http://gcc.gnu.org/gcc-4.3/).

Installing a C compiler on Mac OS X

Before you can compile C code on Mac OS X, you must install XCode (http://developer.apple.com/technologies/tools/xcode.html).

Installing XCode

Check your Mac OS X installation DVD or Apple Developer Connection (http://developer.apple.com/) for the latest version.

Verify that GCC works

To verify that GCC works, open Finder | Applications | Utilities | Terminal and type:

$ gcc

You should see:

We have just finished explaining how to install and test a C compiler on Mac OS X.

Installing a C compiler on Windows

Before you can compile C code on Windows, you must install MinGW (or Microsoft's Visual Studio, but that approach is not covered in this book).

Downloading MinGW

To download MinGW with Internet Explorer:

  1. Browse to http://mingw.org.

  2. Click on Downloads | View all files | Automated MinGW Installer | MinGW-5.1.6.exe.

  3. Save the file.

  4. Run the installer.

Installing MinGW

Windows will present a series of dialogues you can answer based on the following suggestions:

  • Select the current package

  • Select g++ and check options in addition to the base tools

  • Select the default location

You should see:

Adding MinGW to the Environment Variable—Path

Now that a C compiler is installed, we would like to be able to easily run the gcc command from the Command Prompt. To accomplish this, perform the following steps:

  1. Select Start | Computer System Properties | Advanced system settings | Environment Variables.

  2. Under System variables, scroll down to Path.

  3. Select Edit.

  4. Add the following separated by a semicolon:

    • C:\MinGW\bin

  5. Click on Save.

You should see:

Verify that GCC works

To verify that your C compiler works, select Start | All Programs | Accessories | Command Prompt and type:

$ gcc

You should see:

We have just demonstrated how to install and test a C compiler on Windows.

Configuring Distutils

Later, when you try to compile Zope 2, your Buildout may fail with a Visual Studio error like this:

To avoid this error, you can configure Distribute to use MinGW's C compiler. Just create a file called C:\Python\Lib\Distutils\distutils.cfg, and include the following contents:

[build] 
compiler=mingw32

Visit http://plone.org/documentation/kb/using-buildout-on-windows/ for more information.

Installing a C compiler on Ubuntu Linux

Before you can compile C code on Ubuntu Linux, you must install the build-essential package (http://packages.ubuntu.com/lucid/build-essential):

$ sudo aptitude install build-essential

You should see:

Verify that GCC works

To verify that GCC works, type:

$ gcc  
gcc: no input files 

You should see:

We have just demonstrated how to install and test a C compiler on Ubuntu Linux.

Installing additional development libraries

Later on, when you are using Buildout to install Python, you may encounter this error:

To avoid this error, install the zlib1g-dev library:

$ sudo aptitude install zlib1g-dev
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image