gnucobol-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [open-cobol-list] Compiling OC on OS X Leopard box


From: David Essex
Subject: Re: [open-cobol-list] Compiling OC on OS X Leopard box
Date: Mon, 03 Aug 2009 16:00:57 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618

Duke Normandin wrote:

I've been trying to compile OC1.0 cleanly on my OS X 10.5.7 box.
> NO JOY!

Well Mac OS X uses BSD UN*X, so it should not be a big problem.

echo $CPPFLAGS
$CPPFLAGS -I/opt/local/include

The above does not look correct.
Check you environment variable as follows. Note that '!' is my PS1 setting (command prompt).

! export CPPFLAGS='-I/opt/local/include'
! echo "CPPFLAGS=$CPPFLAGS;"
CPPFLAGS=-I/opt/local/include;

sudo ./configure

There is no need to run 'configure' or 'make' as root.

To install from the sources (make install) requires root privileges, but speaking from experience is would not recommend that method.

As you can see, it quits with the line:

configure: error: gmp.h is required

However, like I said in my previous post, this file _exists_ on my
system at:

ls /opt/local/include/gmp*
/opt/local/include/gmp.h   /opt/local/include/gmpxx.h

Use the 'ls -l' and check that it is not a link, and if you have read access to the file.

It seems to me that the Env. Var. $CPPFLAGS is not being read - or
something... BTW, I'm using Bash as my shell, if that matters.

The GNU build tools are designed to configure, build and install the
packages in temporary working directories.

The install working directory can then be packaged in some format (DEB, RPM, Slackware tgz, ...).
Normally, this whole process is done by the package script for the
package format.

The basic steps are as follows (no root privileges required).

# Extract the archive
tar -zxvf open-cobol-1.0.tar.gz

# Set some build options
export CFLAGS="-O2 -march=i486 -mcpu=i686"
export CXXFLAGS="-O2 -march=i486 -mcpu=i686"
export CPPFLAGS='/opt/local/include'
export PKG=some-install-working-directory

# The install prefix location is important as OC uses this to locate
# the compiler options (default is /usr/local).
./configure --prefix=/opt/local
make
make install DESTDIR=$PKG

# to clean the build
make distclean


Anyway hope this helps.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]