|
Boost : |
From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-08-12 06:55:37
Dave,
I've been trying to use the new build system to setup the regex lib, but so
far haven't got much beyond first base.
With the prebuilt Win32 FTJam executable:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
OK, installation is no problem.
I can build the regex lib as a static lib with msvc OK - but I see a lot of
spurious output at the end:
msvc-Archive-action
libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\lib
boost_regex.lib
D:\boost\develop\boost>if exist
"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\li
bboost_regex.lib" set
_libboost_regex_="libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtim
e-link-dynamic\libboost_regex.lib"
D:\boost\develop\boost> link /lib
/out:"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynam
ic\libboost_regex.lib"
"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\li
bboost_regex.lib"
"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\c_
regex_traits.obj"
"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\c_
regex_traits_common.obj"
"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\cp
p_regex_traits.obj"
"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\cr
egex.obj"
"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\fi
leiter.obj"
"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\po
six_api.obj"
"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\re
gex.obj"
Microsoft (R) Library Manager Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
Replacing
libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\c_r
egex_traits.obj
Replacing
libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\c_r
egex_traits_common.obj
Replacing
libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\cpp
_regex_traits.obj
Replacing
libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\cre
gex.obj
Replacing
libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\fil
eiter.obj
Replacing
libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\pos
ix_api.obj
Replacing
libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\reg
ex.obj
D:\boost\develop\boost>
msvc-Archive-action
libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\lib
boost_regex.lib
D:\boost\develop\boost>if exist
"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\li
bboost_regex.lib" set
_libboost_regex_="libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtim
e-link-dynamic\libboost_regex.lib"
D:\boost\develop\boost> link /lib
/out:"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynam
ic\libboost_regex.lib"
"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\li
bboost_regex.lib"
"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\re
gex_debug.obj"
"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\re
gex_synch.obj"
"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\w3
2_regex_traits.obj"
"libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\wi
de_posix_api.obj"
Microsoft (R) Library Manager Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
Replacing
libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\reg
ex_debug.obj
Replacing
libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\reg
ex_synch.obj
Replacing
libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\w32
_regex_traits.obj
Replacing
libs\regex\build\bin\libboost_regex.lib\msvc\debug\runtime-link-dynamic\wid
e_posix_api.obj
D:\boost\develop\boost>
Note the apparent command.com command prompts here - I'm running this under
bash!
Trying to build the regex lib as a dll (see updated regex Jamfile) fails
because the command line is longer than Jam's internal limit:
msvc-Link-action actions too long (max 996)!
Now the regex lib doesn't have that many object files, and if this is going
to overflow the command line, we have a real problem. The ideal solution
is to use a command file: "cl @commands.txt", but that requires support
from jam - does it support "here files" at all?
I then added a Jamfile to libs/regex/example/ with just one test example so
far - really just to see if I can link to the one library I did manage to
build - unfortunately I get an access violation inside jam here, ouch.
One final note, if I build with -sTOOLS=gcc then cygwin creates
libboost_regex.lib - shouldn't that be libboost_regex.a ??
Building the sources under Cywin:
~~~~~~~~~~~~~~~~~~~~~~
As a workaround for the command line length problem I tried building the
sources with cygwin, it took me a while to figure out that I had to edit
the makefile and uncomment some cygwin specific defines, once I did that I
at least got jam0.exe to build, but then it all goes horribly wrong, here's
what I see:
./jam0
don't know how to make ./yyacc.exe
...found 162 targets...
...using 22 temp targets...
...updating 2 targets...
...can't find 1 target...
...can't make 8 targets...
...using command.o...
...using compile.o...
...using execunix.o...
...using fileunix.o...
...using pathunix.o...
...skipped jamgram.y for lack of ./yyacc.exe...
...skipped jamgram.h for lack of jamgram.y...
...skipped jamgram.c for lack of jamgram.y...
...skipped jamgram.o for lack of jamgram.c...
...using expand.o...
...using glob.o...
...using hash.o...
...using headers.o...
...using hdrmacro.o...
...using lists.o...
...using make.o...
...using make1.o...
...using newstr.o...
...using option.o...
...using parse.o...
...using regexp.o...
...using rules.o...
...skipped jamgramtab.h for lack of ./yyacc.exe...
...skipped scan.o for lack of scan.c...
...using search.o...
...using subst.o...
...using timestamp.o...
...using variable.o...
...skipped libjam.a for lack of libjam.a(jamgram.o)...
GenFile1 jambase.c
Cc bin.cygwinx86/jambase.o
...skipped jam.exe for lack of libjam.a...
...skipped 8 targets...
...updated 2 targets...
make: *** [all] Error 1
Further investigation suggested that the problem was the dependency on
./yyacc which is getting a misplaced .exe suffix added by jam, deleting
that dependency from the Jamfile and I see:
./jam0
...found 161 targets...
...using 22 temp targets...
...updating 6 targets...
...using command.o...
...using compile.o...
...using execunix.o...
...using fileunix.o...
...using pathunix.o...
Yacc1 jamgram.c jamgram.h
YaccMv jamgram.c jamgram.h
mv: cannot stat `y.tab.c': No such file or directory
mv: cannot stat `y.tab.h': No such file or directory
mv -f y.tab.c jamgram.c
mv -f y.tab.h jamgram.h
...failed YaccMv jamgram.c jamgram.h ...
...removing jamgram.c
...removing jamgram.h
...skipped jamgram.c for lack of jamgram.h...
...skipped jamgram.o for lack of jamgram.c...
...using expand.o...
...using glob.o...
...using hash.o...
...using headers.o...
...using hdrmacro.o...
...using lists.o...
...using make.o...
...using make1.o...
...using newstr.o...
...using option.o...
...using parse.o...
...using regexp.o...
...using rules.o...
...skipped scan.o for lack of scan.c...
...using search.o...
...using subst.o...
...using timestamp.o...
...using variable.o...
...skipped libjam.a for lack of libjam.a(jamgram.o)...
...skipped jam.exe for lack of libjam.a...
...failed updating 1 target...
...skipped 5 targets...
make: *** [all] Error 1
At which point I gave up.
I also tried using the intermediate jam0.exe executable as jam with boost
and that was really really bad (include paths completely screwed up), gave
up again.
Anyway I hope you have some insights into all this :-(
- John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk