Boost logo

Boost-Build :

Subject: [Boost-build] [wince] Building Boost for Windows CE... some progress and problems...
From: Andy Schweitzer (a.schweitzer.grps_at_[hidden])
Date: 2009-06-13 20:38:31


I've been trying to build boost for windows CE. I've made some progress,
      but it's not really working yet. I was asked off-list about it, so
I thought I'd post a report and some questions.

Summary:
Basically, I managed to build STLport libs/dlls for CE, using vc8 and
vc9, with minor mods to STLport. STLport test program runs, apparently
successfully on the CE emulator. A test program can link to STLport libs
and use them successfully.

Then, with a modified user-config.jam (based on VeecoFTC's), and the
proper bjam command line. I was able to build some of the boost
libraries. I have only gotten static link and vc8 building. My dlls fail
to link to STL. My vc9 has include problems. I haven't really
investigated either of these. Compiler errors result from parts of the
standard C++ libraries that are missing from CE (and not provided by
STLport). I have satisfied the compiler by providing stub
implementations - which of course wouldn't actually work, but do build.

I linked a test program to some of the built libraries and ran it
successfully in the emulator. I would like to run boost::test on the
emulator to see what works and what doesn't. So far I have been able to
build boost::test, but not the first individual test case I tried,
libs/system/test. I got an ARM vs THUMB link error which I have yet to
investigate.

Questions:
-- Any suggestions C++ standard functions missing from CE?
    -- Has anyone tried wcelibex? It looks appropriate. All its
functions start with "wce_", and I think for it to work with well with
boost and STLport, those would have to be wrapped into calls with the
standard names and put into STL namespace.

-- Any idea why vc9 would have problems finding the right include
directories when vc8 does not? I diffed the setup batch files and they
appear to be indentical.

-- Any ideas on why machine conflicts (X86 vs ARM and ARM vs THUMB) seem
to occur in some cases but not others?

====================================================
Details (for reference - comments welcome from anyone
          who wants to pore through details):
====================================================
Tools:

* vc8, vc9
     I had to un-install IE8 before I could create
     Smart Device projects. Based on web searches
     there seems to be an on-going problem with
     some solutions that didn't work for me.

* CE SDKs
     STANDARDSDK_500

* Ran code from WM5 emulator

* bjam

====================================================
Code (modifications included in attached zip file):

--STLport-5.2.1--

* added batchfiles to setup and build STL
     They assume an env var STL_ROOT pointing
     to, STLport-5.2.1 dir.
     if you put them there and run
     STL_evc8_ARMV4I_WCE500.bat or
     STL_evc9_ARMV4I_WCE500.bat, they
     might "just work"

* build/Makefiles/nmake/evc4.mak - added define of
     ARMV4I and use of THUMB

* src/details/fstream_win32io.cpp - open() failed
     until I hacked in code to ignore failing
     call to SetFilePointer. Not sure what is
     going on here, or if hack is appropriate.

* stlport/using/cstring - hacked in stub of strerror
     (boost::system needs it)

--Boost--

* used svn to download trunk a couple weeks ago

* tools/build/v2/tools/user-config.jam - adds toolsets
     for vc8+CE+STLport and vc9+CE+STLport

* libs/system/test/error_code_user_test.cpp - stubs
     errno and call to std::remove.

* libs/program_options/src/parsers.cpp
     stubbed environ

* libs/iostreams/src/file_descriptor.cpp
     hacked out some includes
     stubbed _get_osfhandle

* libs/iostreams/src/mapped_file.cpp
     added TEXT macro to get wider chars
     hacked out try_may_file

* libs/filesystem/src/operations.cpp
     hacked out some includes
     stubbed in Get/SetCurrentDirectory,
     GetFullPathName, GetShortPathName

* boost/test/impl/cpp_main.ipp
     stubbed in getenv

* These built at least enough successfully that static link succeeded.
     static-link successfully built:
         system
         filesystem
         iostreams
         program_options
         test
         thread
         signals
         date_time
     I could not link to them from an emulator test-program until I used
     --build-type=complete (which nevertheless reported erors).
     I actually tried and successfully linked to:
         system
         filesystem
         program_options
         iostreams

* build command, that at least succeeded with static link:

bjam --with-system --with-thread --with-signals --with-date_time^
  --with-filesystem --with-program_options --with-iostreams^
  --with-test --build-type=complete^
  toolset=msvc-8.0~wm5~stlport5.2^
  stdlib=stlport-5.2~evc8~arm > bjam.txt 2>&1

* failures:
     regex - fails on strxfrm
     serialization
     graph - fails on iswalnum




Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk