ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> boost
boost
Re: [boost] [tools][bcp] using boost internally in other libraries
by bjorn other posts by this author
Sep 29 2005 12:06PM messages near this date
Re: [boost] [tools][bcp] using boost internally in other libraries | Re: [boost] [tools][bcp] using boost internally in other libraries
SOURCE On Saturday 24 September 2005 21:38, Bj�rn Roald wrote:
>  John Maddock said:
>  > I guess the we'd just have to try it and see if any current libraries
>  > break
>  > this idiom.
> 
>   I will try some more ...

I did some testing with my modified bcp tool,

First I called bcp to copy some modules to /tmp/bcp and replace namespace 
boost with spoost "spooked boost" :)

[bjorn@frodo boost]$ tools/bcp/run/bcp --cvs --namespace=spoost filesystem 
program_options boost-build.jam build Jamrules project-root.jam /tmp/bcp/
[bjorn@frodo debug]$ cd /tmp/bcp/
[bjorn@frodo bcp]$ ls -l
total 44
drwxrwxr-x   3 bjorn bjorn 4096 Sep 25 23:47 bin
-r--r--r--   1 bjorn bjorn  482 Sep 25 23:44 boost-build.jam
-r--r--r--   1 bjorn bjorn  616 Sep 25 23:44 boost.css
-r--r--r--   1 bjorn bjorn 6308 Sep 25 23:44 boost.png
-r--r--r--   1 bjorn bjorn  435 Sep 25 23:44 Jamrules
drwxrwxr-x   9 bjorn bjorn 4096 Sep 25 23:40 libs
-r--r--r--   1 bjorn bjorn   75 Sep 25 23:44 project-root.jam
drwxrwxr-x  18 bjorn bjorn 4096 Sep 25 23:44 spoost
drwxrwxr-x   3 bjorn bjorn 4096 Sep 25 23:45 stage
drwxrwxr-x   3 bjorn bjorn 4096 Sep 25 23:44 tools

I then compiled 
./lib/program_options/build
./lib/program_options/test
with plain "bjam" command in those directories
no errors during build and test run as far as I saw.

here are some checks I did on one of the test programs afterwords

[bjorn@frodo bcp]$ 
cd /tmp/bcp/bin/boost/libs/program_options/test/parsers_test.test/gcc/debug
[bjorn@frodo debug]$ ldd ./parsers_test
        libstdc++.so.6 =>  /usr/lib/libstdc++.so.6 (0x00101000)
        libm.so.6 =>  /lib/tls/libm.so.6 (0x009b6000)
        libgcc_s.so.1 =>  /lib/libgcc_s.so.1 (0x0098e000)
        libc.so.6 =>  /lib/tls/libc.so.6 (0x00a69000)
        /lib/ld-linux.so.2 (0x0099c000)
[bjorn@frodo debug]$ ./parsers_test
Running 1 test case...

*** No errors detected
[bjorn@frodo debug]$ nm -C ./parsers_test | grep boost | wc
      0       0       0
[bjorn@frodo debug]$ nm -C ./parsers_test | grep spoost | wc
   2491   35631  785706

Note that there are no "boost" string in any binary symbols, while all 2491 
boost symbols references are renamed "spoost" in binary.   

I also attached two source files so you can see the effect on the source.

As far as I can see, I have successfully demonstrated feasability of
an automated production line of boost library with modification to its 
namespace. 

A few questions before I go on to the next step:

Is there a simple way of getting bcp to copy all of boost, i.e. without having 
to list all modules?
 
And then; how do I run test on all of "spoost" and generate test reports that 
are suitable for evaluation?   I guess there is a target in boost.build of 
some sort I can try.

-----
Bj�rn
Attachments:
cmdline.cpp
program_options.hpp
unknown1
unknown2

Thread:
David Abrahams
Bjørn Roald
Bjørn Roald
David Abrahams
bjorn
John Maddock

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved