Showing posts with label BuildTools. Show all posts
Showing posts with label BuildTools. Show all posts

Monday, July 18, 2011

Announcing BuildTools 0.7.0 release

he first release of the BuildTools 0.7 series has just been created.
Changes w.r.t. 0.6 can rougly be seen here:
https://projects.coin-or.org/BuildTools/changeset?reponame=&new=2365%40trunk&old=1950%40trunk

Incomplete release notes are below. Some of the fixes may also have been

merged to the 0.6 series.

In case of questions, refer also to the updated documentation page for

project managers at https://projects.coin-or.org/BuildTools/wiki/pm-main
If your project is still using BuildTools 0.5 and you consider to
upgrade to use 0.7, have a look into the brief tutorial on switching
from 0.5 to 0.7:
https://projects.coin-or.org/BuildTools/wiki/pm-switch


coin.m4:

- changed default installation directory for libraries back to ${prefix}/lib
- removed macros that were marked deprecated in BuildTools 0.6
- removed ADDLIBS, FADDLIBS, and PCADDLIBS variables; macros like
COIN_CHECK_GNU_ZLIB now take a list of prefixes for shell variables
where to add corresponding linker flags
- defines for numeric version numbers of the form PRJCT_VERSION_MAJOR,
PRJCT_VERSION_MINOR, PRJCT_VERSION_RELEASE are now created automatically
by configure
- added recognition of Windows 64bit MKL libraries and MacOS X Veclib
framework as Blas/Lapack alternatives
- --enable-maintainer-mode should work again
- new macros COIN_CHECK_ISFINITE and COIN_CHECK_ISNAN (originally from
CoinUtils) to check for variations of isfinite and isnan functions and
to define suitable C preprocessor macros COIN_C_ISFINITE and COIN_C_ISNAN
- configure help messages about enable/disable commands have been
changed to say --enable-xyz for features that are disabled by default
and vice versa
- --without-xyz, --without-xyz-lib, --without-xyz-incdir,
--without-xyz-datadir and corresponding --with-xyz*=no should work to
disable the use of a particular package
- added -O0 to compiler flags in debug mode
- added -Wno-long-long to compiler flags
- removed -Wimplicit from C++ compiler flags
- slightly change the way the FLIBS variable is setup (fixes some issue
on MacOS X)
- change the order in which to check for Fortran compiler, e.g.,
Fortran90 compilers are prefered to Fortran77 compilers
- enable check for Fortran cross-compiler
- only pkg-config versions >= 0.16 are supported now
- $prefix/share/pkgconfig has been added to the search path for .pc files
- improved setup of XYZ_DEPENDENCIES variable for use in Makefiles to
specify cross-project dependencies of a library; added option
--disable-interpackage-
dependencies to disable setup of XYZ_DEPENDENCIES
variable
- allow to exclude package versions via != in AC_COIN_CHECK_PACKAGE
- fix parsing of .pc files in mingw builds
- fix setup of XYZ_LIBS_INSTALLED variables for builds with cl compiler

{prepare,commit}_new_{release,
stable} scripts:
- improvements and fixes for computing the libtool age of a project
- adapted update of PRJCT_VERSION* defines in config header files to
changed scheme of these header files and to also update new defines
- the new release will not have a changed Dependencies file, but will
use the same as in the stable branch it originated from. Only the
svn:externals property is set to point to releases of Dependencies. This
makes it easier for a user to switch to updated releases via the
set_externals script.

headers/configall_system_msc.
h:
- moved preprocessor defines that were specific for CoinUtils to the
CoinUtils configuration headers

Friday, April 1, 2011

pkg-config in COIN-OR

Now quite a few COIN-OR projects have adopted pkg-config tool when building their projects.

Here is the manual of pkg-config shown below
pkg-config

pkg-confg @freedesktop

Sunday, March 6, 2011

vpath && srcdir

If you want to build the project in a different folder of the original code.

1. mkdir build // create a new folder called build

2. ../configure in the build folder

3. it will create a config.status and makefile

4. but when you type  ""make"", it will produce errors

5. then you can change the VPATH and srcdir .
to indicate where the source code is located. In our case , they are located in the code folder

6. then type make, it will create new errors
fatal error: opening dependency file .deps/hello.Tpo: Permission denied

7. sudo make and it proceeds successfully

make debugging

make -rd

will provide additional debugging information.

Building a GNU Autotools Project(automatically create )

1. autoscan

automatically generate a configure.scan file

2. rename the configure.scan file to configure.ac file
and edit it as below

AC_PREREQ([2.65])
AC_INIT([hello],[1.0])
AM_INIT_AUTOMAKE([1.10 no-define])

AC_CONFIG_SRCDIR([functions.h])
AC_CONFIG_HEADERS([config.h])

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC

# Checks for libraries.

# Checks for header files.

# Checks for typedefs, structures, and compiler characteristics.

# Checks for library functions.

AC_CONFIG_FILES([makefile])
AC_OUTPUT

*******************************************************************************************
Please note that configure.in is no longer valid so that the postfix is ac
*******************************************************************************************

3. execute aclocal to create aclocal.4m file
*******************************************************************************************
Make sure to apt-get build-essentials to install 4m file. It
was not successful to generate aclocal.4m file probably due to the
fact that I was creating configure.in rather than configure.ac file
ADDITION: apt-get install libtool
******************************************************************************************

4. autoconf to create configure file

********************************************************************************
Maybe require autoreconf
********************************************************************************

5. create makefile.am file

AUTOMAKE_OPTIONS=foreign
bin_PROGRAMS=hello
hello_SOURCES=hello.cpp functions.h factorial.cpp main.cpp

6. automake to create make.in from make.in

***********************************************************
automake --add-missing
**********************************************************

7. configure to generate makefile


http://www.openismus.com/documents/linux/automake/automake.shtml

http://inti.sourceforge.net/tutorial/libinti/autotoolsproject.html

tutorials of build tools in COIN-OR

If you are not familiar with building projects in COIN-OR, you might want to
follow the website below to study the build tools.

I did no realize that there is a good website . So now I introduce it to you.

projects.coin-or.org/BuildTools/

1. After you compiled the code successfully on a UNIX-type system, you can install the package (and automatically all its dependencies), using make install (see the Compilation and Installation page). By default, the files are installed in newly created subdirectories bin, lib, and include in the package's base directory (Coin-Clp above). If you want to install the files at a different location (such as /usr/local), you need to specify the --prefix configure script option.

2. The function of configure:
The most important thing for configure is to generate the makefile.

In addition, a configure script usually creates a header file (e.g, Coin-Pkg/Clp/inc/config_clp.h) for each included project, which contains #defines to help the source c
ode adapt to different platforms.

3. Giving options to configure:
config.site

4. Parallel compilation :
If you are using GNU make and want to use the parallel compilation feature, you can do this by specifying the -j N option to make, where N is the number of parallel compilations you want to start. A good value for N is the number of available processors plus 1.

Monday, February 14, 2011

Makefile.am and Makefile.in

  • Makefile.am is the automake source file.
  • Makefile.in is generated by automake from Makefile.am