Re: Re: compiling boost with mingw in winxp
Hi, 1) g++ is in the path. Doing the g++ --version displays the version information: C:\opt\boost_1_31_0>g++ --version g++ (GCC) 3.2.3 (mingw special 20030504-1) Copyright (C) 2002 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 2) Mingw is installed in the default directory: c:\mingw Does the fact that I got a warning about spawnvp function when I built bjam has something to do with this? C:\opt\boost-jam-3.1.10>.\bootstrap.mingw\jam0 -f build.jam --toolset=mingw "--t oolset-root= " ...found 83 targets... ...updating 4 targets... .cc. bin.ntx86\yyacc.exe .cc. bin.ntx86\mkjambase.exe .cc. bin.ntx86\jam.exe execnt.c: In function `execcmd': execnt.c:651: warning: passing arg 3 of `spawnvp' from incompatible pointer type execnt.c:682: warning: passing arg 3 of `spawnvp' from incompatible pointer type .link. bin.ntx86\bjam.exe 1 file(s) copied. ...updated 4 targets... I read somewhere something about different signatures for the spawn function and this indicates the one used by bjam is not the one that mingw supports. Why would spawn fail? Is this an OS issue or a compiler thing? Is bjam the program that fails? Or is it a python script that fails? How can I trace this error? I really appreciate your help, Alex ===== Programming Tutorial: In Python: To do this, do this In Perl: To do this, do this or this or this or this... In C: To do this, do this, but be careful In C++: To do this, do this, but don't do this, be careful of this, watch out for this, and whatever you do, don't do this __________________________________ Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! http://promotions.yahoo.com/new_mail
Alexis H. Rivera-Rios wrote:
1) g++ is in the path. Doing the g++ --version displays the version information: C:\opt\boost_1_31_0>g++ --version g++ (GCC) 3.2.3 (mingw special 20030504-1)
2) Mingw is installed in the default directory: c:\mingw
Does the fact that I got a warning about spawnvp function when I built bjam has something to do with this?
Don't know right now. I'll try and do the same compile you did and post about that later tonight (I always use the VC71 compiled version).
I read somewhere something about different signatures for the spawn function and this indicates the one used by bjam is not the one that mingw supports.
Interesting, I'll have to look into this. Do you have pointer to more information about that?
Why would spawn fail?
Many reasons.. But the immediate one can only be either what you mention about spawn incompatibility. Or if the name of the command we are passing in a not understood somehow (like not finding it in the PATH or a typo).
Is this an OS issue or a compiler thing? Is bjam the program that fails? Or is it a python script that fails? How can I trace this error?
:-) Answers... Not likely; Yes; No; Not easily.
I really appreciate your help,
Here are some things you can try to get this working... 1. With the MinGW built bjam, specify the mingw path to the build: bjam -sTOOLS=mingw -sMINGW_ROOT_DIRECTORY=c:\mingw 2. Download the prebuilt bjam 3.1.10 version, which is built with VC7.1, to see if it's a problem with the mingw built bjam only. (See SourceForge for the files) 3. With the vc71 built bjam try both with and without -sMINGW_ROOT_DIRECTORY specified. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq
Rene Rivera wrote:
Alexis H. Rivera-Rios wrote:
Does the fact that I got a warning about spawnvp function when I built bjam has something to do with this?
Don't know right now. I'll try and do the same compile you did and post about that later tonight (I always use the VC71 compiled version).
And the answer is... I'm just out of ideas as to what might be wrong on your end. I just tried what I understand to be the same sequence of steps you did and it works fine. Here's my run: ~~~~~~~~~ C:\CVSROOTs\Boost\bjam_src>build.bat mingw ### ### Using 'mingw' toolset. ### C:\CVSROOTs\Boost\bjam_src>rd /S /Q bootstrap.mingw C:\CVSROOTs\Boost\bjam_src>md bootstrap.mingw C:\CVSROOTs\Boost\bjam_src>gcc -DNT -o bootstrap.mingw\jam0.exe command.c compile.c execnt.c execunix.c execvms.c expand.c file nt.c fileos2.c fileunix.c filevms.c glob.c hash.c hdrmacro.c headers.c jam.c jambase.c jamgram.c lists.c make.c make1.c newstr.c option.c parse.c pathunix.c pathvms.c regexp.c rules.c scan.c search.c subst.c timestamp.c variable.c modules.c strings.c files ys.c builtins.c pwd.c class.c w32_getreg.c native.c modules/set.c modules/path.c modules/regex.c modules/property-set.c modules /sequence.c modules/order.c execnt.c: In function `execcmd': execnt.c:651: warning: passing arg 3 of `spawnvp' from incompatible pointer type execnt.c:682: warning: passing arg 3 of `spawnvp' from incompatible pointer type C:\CVSROOTs\Boost\bjam_src>.\bootstrap.mingw\jam0 -f build.jam --toolset=mingw "--toolset-root=C:\MinGW\ " clean ...found 1 target... ...updating 1 target... ...updated 1 target... C:\CVSROOTs\Boost\bjam_src>.\bootstrap.mingw\jam0 -f build.jam --toolset=mingw "--toolset-root=C:\MinGW\ " ...found 83 targets... ...updating 5 targets... .mkdir. bin.ntx86 .cc. bin.ntx86\yyacc.exe .cc. bin.ntx86\mkjambase.exe .cc. bin.ntx86\jam.exe execnt.c: In function `execcmd': execnt.c:651: warning: passing arg 3 of `spawnvp' from incompatible pointer type execnt.c:682: warning: passing arg 3 of `spawnvp' from incompatible pointer type .link. bin.ntx86\bjam.exe 1 file(s) copied. ...updated 5 targets... C:\CVSROOTs\Boost\bjam_src>cd c:\boost\boost_1_31_0 C:\Boost\boost_1_31_0>c:\cvsroots\boost\bjam_src\bin.ntx86\bjam -sTOOLS=mingw -sMINGW_ROOT_DIRECTORY=c:\MinGW install --------------------------------------------------------------------- skipping Boost.Python library build due to missing or incorrect configuration couldn't find Python.h in "c:/tools/python/include" You can configure the location of your python installation by setting: PYTHON_ROOT - currently "c:/tools/python" PYTHON_VERSION - The 2-part python Major.Minor version number (e.g. "2.2", NOT "2.2.1") - currently "2.2" The following are automatically configured from PYTHON_ROOT if not otherwise set: PYTHON_LIB_PATH - path to Python library object; currently "c:/tools/python/libs" --------------------------------------------------------------------- ...patience... ...found 7570 targets... ...updating 839 targets... MkDir1 bin MkDir1 bin\boost MkDir1 bin\boost\libs MkDir1 bin\boost\libs\date_time MkDir1 bin\boost\libs\date_time\build MkDir1 bin\boost\libs\date_time\build\boost_date_time.dll MkDir1 bin\boost\libs\date_time\build\boost_date_time.dll\mingw MkDir1 bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug gcc-C++-action bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\greg_month.obj gcc-C++-action bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\greg_weekday.obj gcc-C++-action bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\date_generators.obj gcc-Link-action bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\boost_date_time-mgw-d-1_31.dll bin\boost\libs\dat e_time\build\boost_date_time.dll\mingw\debug\boost_date_time-mgw-d-1_31.lib Creating library file: bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\boost_date_time-mgw-d-1_31.lib FileClone C:\Boost\lib\boost_date_time-mgw-d-1_31.dll 1 file(s) copied. FileClone C:\Boost\lib\boost_date_time-mgw-d-1_31.lib 1 file(s) copied. MkDir1 bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\threading-multi gcc-C++-action bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\threading-multi\greg_month.obj gcc-C++-action bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\threading-multi\greg_weekday.obj gcc-C++-action bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\threading-multi\date_generators.obj gcc-Link-action bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\threading-multi\boost_date_time-mgw-mt-d-1_31.dll bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\threading-multi\boost_date_time-mgw-mt-d-1_31.lib Creating library file: bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\threading-multi\boost_date_time-mgw-mt-d-1 _31.lib FileClone C:\Boost\lib\boost_date_time-mgw-mt-d-1_31.dll 1 file(s) copied. FileClone C:\Boost\lib\boost_date_time-mgw-mt-d-1_31.lib 1 file(s) copied. ~~~~~~~~~ And so on for a long time. I even tried running it without c:\MinGW\bin in the PATH and I do get an error. But not the spawn error: ~~~~~~~~~ C:\Boost\boost_1_31_0>c:\cvsroots\boost\bjam_src\bin.ntx86\bjam -sTOOLS=mingw install --------------------------------------------------------------------- skipping Boost.Python library build due to missing or incorrect configuration couldn't find Python.h in "c:/tools/python/include" You can configure the location of your python installation by setting: PYTHON_ROOT - currently "c:/tools/python" PYTHON_VERSION - The 2-part python Major.Minor version number (e.g. "2.2", NOT "2.2.1") - currently "2.2" The following are automatically configured from PYTHON_ROOT if not otherwise set: PYTHON_LIB_PATH - path to Python library object; currently "c:/tools/python/libs" --------------------------------------------------------------------- ...patience... ...found 7570 targets... ...updating 798 targets... FileClone C:\Boost\lib\boost_date_time-mgw-d-1_31.lib 1 file(s) copied. FileClone C:\Boost\lib\boost_date_time-mgw-mt-d-1_31.lib 1 file(s) copied. gcc-C++-action bin\boost\libs\date_time\build\libboost_date_time.lib\mingw\debug\runtime-link-static\greg_month.obj 'g++' is not recognized as an internal or external command, operable program or batch file. g++ -c -Wall -ftemplate-depth-100 -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG -DBOOST_DATE_TIME_STATIC_LINK -g -O0 -fno-inli ne -mno-cygwin -I"bin\boost\libs\date_time\build" -I "C:\Boost\boost_1_31_0" -o "bin\boost\libs\date_time\build\libboost_dat e_time.lib\mingw\debug\runtime-link-static\greg_month.obj" "C:/Boost/boost_1_31_0/libs/date_time/build/../src/gregorian/greg_mo nth.cpp" ...failed gcc-C++-action bin\boost\libs\date_time\build\libboost_date_time.lib\mingw\debug\runtime-link-static\greg_month.obj... ~~~~~~~~~ Etc... **OK** On further investigation I found one difference that is pertinent from my runs. When I run bjam with mingw it runs command with temporary batch files. Which one can see with the -d+4 option as "Executing through .bat file" debug messages. If I run bjam with -sJAMSHELL=%, which is what makes it run commands directly I get: C:\Boost\boost_1_31_0>c:\cvsroots\boost\bjam_src\bin.ntx86\bjam -sTOOLS=mingw -sMINGW_ROOT_DIRECTORY=c:\MinGW -d+4 -sJAMSHELL=% install Executing raw command directly Executing command [copy] ["bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\boost_date_time-mgw-d-1_31.lib"] ["C:\ Boost\lib\boost_date_time-mgw-d-1_31.lib"] spawn: No such file or directory Which is only a slightly nicer error than yours, but equivalent. So the big question is now; Do you have JAMSHELL set to "%" ?? -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org - grafik/redshift-software.com - 102708583/icq
Rene Rivera wrote: [snip]
On further investigation I found one difference that is pertinent from my runs. When I run bjam with mingw it runs command with temporary batch files. Which one can see with the -d+4 option as "Executing through .bat file" debug messages.
It's not true. There's fragment from my bjam -d+4 output: ... Executing through .bat file Executing command [cmd.exe] [/Q/C] [C:\DOCUME~1\JANUSZ~1\USTAWI~1\Temp\jam1752-00.bat] Executing through .bat file Executing command [cmd.exe] [/Q/C] [C:\DOCUME~1\JANUSZ~1\USTAWI~1\Temp\jam1752-00.bat] Executing raw command directly Executing command [g++] [-Wl,--exclude-symbols,_bss_end__:_bss_start__:_data_end__:_data_start__] [-Wl,--out-implib,bin\boost\libs\date_time\build\boost_date_time.dll\mingw\d ebug\boost_date_time-mgw-d-1_31.lib] [-g] [-shared] [-mno-cygwin] [-o] ["bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\boost_date_ time-mgw-d-1_31.dll"] ["bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\greg_month. obj"] ["bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\greg_weekda y.obj"] ["bin\boost\libs\date_time\build\boost_date_time.dll\mingw\debug\date_genera tors.obj"] Executing through .bat file Executing command [cmd.exe] [/Q/C] [C:\DOCUME~1\JANUSZ~1\USTAWI~1\Temp\jam1752-00.bat] Executing through .bat file Executing command [cmd.exe] [/Q/C] [C:\DOCUME~1\JANUSZ~1\USTAWI~1\Temp\jam1752-00.bat] ... Linking is executed "raw". But "spawn: invalid argument" message means _mode_ invalid argument, which is P_NOWAIT(valid) in this case. It's something wrong with mingw. Alexis, try update runtime library, or, as Rene writes, vc version of bjam. Regards, Janusz
participants (3)
-
Alexis H. Rivera-Rios
-
Janusz Piwowarski
-
Rene Rivera