Archive for the 'build' Category
cross compiling for arm, libtool issues, openmoko

No idea if this is a bug, but when installing *-dev packages with opgk-dev, the *.la library wrappers for libtool are not updated with the correct path. This causes dificulties when trying to cross compile packages that use libtool. In order to make this working, one should change the $MYCROSSCHAIN/usr/lib*.la the /usr/*/* paths to $MYCROSSCHAIN/usr/*/* directory. $MYCROSSCHAIN points to the directory where the crsschain is installed, in my case:

MYCROSSCHAIN=/usr/local/openmoko/arm/arm-XXX

Vimo: Vim for windows mobile

I created a wiki where I will try to collect information about issues/success stories/problems building vim for windows mobile:

http://mobiphil.com/vimowiki

your help is welcome!

makefile for boost

boost is a wonderfull library, but bjam sucks! The documentation of the config files is ambiguous. I spent few hours to find out how to capture the command lines during build (without hack), and how to influence cxxflags. Did not work. On the other annoying part of bjam is that parallel build does not work either. So I packed together a makefile. This is version 0.0.0.0.1, I will add later several other variables (CXXFLAGS, VERSION, LDFLAGS etc.)… At the moment there are 2 control variables, and they are the source directory and the build directory.

 

BOOST_SRCDIR=/data/build/boost/boost
BOOST_BUILDDIR=/data/build/boost/boostbuild
BOOST_INCLUDEDIR=$(BOOST_SRCDIR)

 

SYSTEM_SOURCEDIR=$(BOOST_SRCDIR)/libs/system/src
SYSTEM_OBJECT_NAMES=error_code.o
SYSTEM_BUILDDIR=$(BOOST_BUILDDIR)/system
SYSTEM_OBJECTS=$(patsubst %.o,$(SYSTEM_BUILDDIR)/%.o, $(SYSTEM_OBJECT_NAMES))
SYSTEM_LIBNAME=system.so
SYSTEM_LIB=$(SYSTEM_BUILDDIR)/$(SYSTEM_LIBNAME)

$(SYSTEM_LIB): $(SYSTEM_BUILDDIR) $(SYSTEM_OBJECTS)
 gcc $(SYSTEM_OBJECTS) -shared  -o $@

$(SYSTEM_BUILDDIR):
 mkdir $(SYSTEM_BUILDDIR)
 
$(SYSTEM_OBJECTS): $(SYSTEM_BUILDDIR)/%.o: $(SYSTEM_SOURCEDIR)/%.cpp
 gcc -c $< -o $@ -I $(BOOST_INCLUDEDIR) -c  -fPIC -fno-stack-protector

 

FILESYSTEM_SOURCEDIR=$(BOOST_SRCDIR)/libs/filesystem/src
FILESYSTEM_OBJECT_NAMES= operations.o \
         path.o \
         portability.o \
         utf8_codecvt_facet.o
FILESYSTEM_BUILDDIR=$(BOOST_BUILDDIR)/filesystem
FILESYSTEM_OBJECTS=$(patsubst %.o,$(FILESYSTEM_BUILDDIR)/%.o, $(FILESYSTEM_OBJECT_NAMES))
FILESYSTEM_LIBNAME=filesystem.so
FILESYSTEM_LIB=$(FILESYSTEM_BUILDDIR)/$(FILESYSTEM_LIBNAME)

$(FILESYSTEM_LIB): $(FILESYSTEM_BUILDDIR) $(FILESYSTEM_OBJECTS)
 gcc $(FILESYSTEM_OBJECTS) -shared  -o $@

$(FILESYSTEM_BUILDDIR):
 mkdir $(FILESYSTEM_BUILDDIR)
 
$(FILESYSTEM_OBJECTS): $(FILESYSTEM_BUILDDIR)/%.o: $(FILESYSTEM_SOURCEDIR)/%.cpp
 gcc -c $< -o $@ -I $(BOOST_INCLUDEDIR) -c  -fPIC -fno-stack-protector

 

REGEX_SOURCEDIR=$(BOOST_SRCDIR)/libs/regex/src
REGEX_OBJECT_NAMES=cpp_regex_traits.o \
       cregex.o \
       c_regex_traits.o \
       fileiter.o \
       icu.o \
       instances.o \
       posix_api.o \
       regex.o \
       regex_debug.o \
       regex_raw_buffer.o \
       regex_traits_defaults.o \
       static_mutex.o \
       usinstances.o \
       w32_regex_traits.o \
       wc_regex_traits.o \
       wide_posix_api.o \
       winstances.o
REGEX_BUILDDIR=$(BOOST_BUILDDIR)/regex
REGEX_OBJECTS=$(patsubst %.o,$(REGEX_BUILDDIR)/%.o, $(REGEX_OBJECT_NAMES))
REGEX_LIBNAME=regex.so
REGEX_LIB=$(REGEX_BUILDDIR)/$(REGEX_LIBNAME)

$(REGEX_LIB): $(REGEX_BUILDDIR) $(REGEX_OBJECTS)
 gcc $(REGEX_OBJECTS) -shared  -o $@

$(REGEX_BUILDDIR):
 mkdir $(REGEX_BUILDDIR)
 
$(REGEX_OBJECTS): $(REGEX_BUILDDIR)/%.o: $(REGEX_SOURCEDIR)/%.cpp
 gcc -c $< -o $@ -I $(BOOST_INCLUDEDIR) -c  -fPIC -fno-stack-protector

 
PROGRAM_OPTIONS_SOURCEDIR=$(BOOST_SRCDIR)/libs/program_options/src
PROGRAM_OPTIONS_OBJECT_NAMES= cmdline.o \
           config_file.o \
           convert.o \
           options_description.o \
           parsers.o \
           positional_options.o \
           utf8_codecvt_facet.o \
           value_semantic.o \
           variables_map.o \
           winmain.o
PROGRAM_OPTIONS_BUILDDIR=$(BOOST_BUILDDIR)/program_options
PROGRAM_OPTIONS_OBJECTS=$(patsubst %.o,$(PROGRAM_OPTIONS_BUILDDIR)/%.o, $(PROGRAM_OPTIONS_OBJECT_NAMES))
PROGRAM_OPTIONS_LIBNAME=program_options.so
PROGRAM_OPTIONS_LIB=$(PROGRAM_OPTIONS_BUILDDIR)/$(PROGRAM_OPTIONS_LIBNAME)

$(PROGRAM_OPTION_SLIB): $(PROGRAM_OPTIONS_BUILDDIR) $(PROGRAM_OPTIONS_OBJECTS)
 gcc $(PROGRAM_OPTIONSOBJECTS) -shared  -o $@

$(PROGRAM_OPTIONS_BUILDDIR):
 mkdir $(PROGRAM_OPTIONS_BUILDDIR)
 
$(PROGRAM_OPTIONS_OBJECTS): $(PROGRAM_OPTIONS_BUILDDIR)/%.o: $(PROGRAM_OPTIONS_SOURCEDIR)/%.cpp
 gcc -c $< -o $@ -I $(BOOST_INCLUDEDIR) -c  -fPIC -fno-stack-protector

 

LIBS=$(SYSTEM_LIB) $(FILESYSTEM_LIB) $(REGEX_LIB) $(PROGRAM_OPTIONSLIB)

all: $(LIBS)
# echo $(LIBS) $(SYSTEM_LIB) $(SYSTEM_OBJECTS) $(SYSTEM_BUILDDIR)/%.o: $(SYSTEM_SOURCEDIR)/%.cpp

build boost for wt

the only needed libraries for wt are:

  • libboost_thread
  • libboost_program_options
  • libboost_signals
  • libboost_date_time
  • libboost_filesystem-gcc42
  • libboost_regex
  • libboost_system

Therefore one should run the configure script for boost as

../boost/configure –without-icu \

–with-libraries=thread,program_options,signals,date_time,filesystem,regex,system \

–prefix=`pwd`/deploy