Boost logo

Boost-Build :

Subject: [Boost-build] Boost build in Cygwin 1_36_0 vs 1_38_0 msvc dll build wierdness
From: Brian Davis (bitminer_at_[hidden])
Date: 2009-03-26 16:49:55


I am using just about the latest version of Cygwin. I have used it it the
past to build in Windows for gcc and msvc sucessfully as it allows me to do
both simutanesously for all versions of compilers installed. Cygwin has
provided a good platform for me to test these compilers in the past. I have
downloaded and began using 1.38.0 and have come accross some wierndess in
the builds of dlls between these versions where 1.36.0 works as expected and
1.38.0 is ... broken.

I have trimed my versions to focus on the issue.

Jamroot:

===================================================
import project ;
import package ;

path-constant TOP : . ;

local HOSTNAME = [ modules.peek : HOSTNAME ] ;
local USER = [ modules.peek : USER ] ;
local PATH = [ modules.peek : PATH ] ;

local THIRD_PARTY_SRC = $(TOP)/source/3rdParty/Win32 ;

local BOOST_ROOT = [ modules.peek : BOOST_ROOT ] ;

# Below is commented in and out based on version that I am buildign /
testing against and my
# PATH variable modified with ${BOOST_ROOT}\tools\jam\stage\bin.cygwinx86
where
# BOOST_ROOT is ${THIRD_PARTY_SRC}\boost\boost_1_38_0 and
# THIRD_PARTY is ${project_loc}\source\3rdParty\Win32 in Eclipse
# boost_1_36_0 is modified in eclpse to use the correct path and hence
# the correct version of bjam in bin.cygwinx86

local BOOST_ROOT = $(THIRD_PARTY_SRC)/boost/boost_1_38_0 ;
#local BOOST_ROOT = $(THIRD_PARTY_SRC)/boost/boost_1_34_0 ;
#local BOOST_ROOT = $(THIRD_PARTY_SRC)/boost/boost_1_36_0 ;

echo "PATH = $(PATH)" ;
echo "BOOST_ROOT = $(BOOST_ROOT)" ;

use-project boost : $(BOOST_ROOT) ;
use-project /Win32 : source/common/Win32/build ;
use-project /glut : source/common/lib/glut/build ;

build-project /glut ;

===================================================

Jamfile.v2 for glut:

===================================================

SRC = ../src/libglut.cpp ;

project libglut
    : requirements
        <source>/Win32//Win32
        <include>../include
        <include>.
    ;

lib glut32
    :
        $(SRC)
    :
        <link>shared

    ;

===================================================

Output below if for 1.38.0

===================================================
**** Build of configuration Debug for project 3D_DSA ****

bjam -d+2 toolset=msvc
PATH =
/cygdrive/e/source/3rdParty/Win32/boost/boost_1_38_0/tools/jam/stage/bin.cygwinx86
PATH = /usr/bin PATH = /cygdrive/c/Program Files/Java/jre6/bin/client PATH =
/cygdrive/c/Program Files/Java/jre6/bin PATH =
/cygdrive/e/projects/Quantumspex/projects/3D_DSA/source/3rdParty/Win32/boost/boost_1_38_0/tools/jam/stage/bin.cygwinx86
PATH = /usr/local/bin PATH = /usr/X11R6/bin PATH =
/cygdrive/c/WINDOWS/system32 PATH = /cygdrive/c/WINDOWS PATH =
/cygdrive/c/WINDOWS/System32/Wbem PATH = /cygdrive/c/Program Files/Common
Files/GTK/2.0/bin PATH = /cygdrive/c/Program Files/QuickTime/QTSystem/ PATH
= /cygdrive/c/msys/1.0 PATH = /cygdrive/c/msys/1.0/bin PATH =
/cygdrive/c/Program Files/Microsoft SQL Server/90/Tools/binn/ PATH =
/cygdrive/c/Program Files/TortoiseSVN/bin PATH = /cygdrive/c/Program
Files/ATI Technologies/ATI.ACE/Core-Static PATH = /cygdrive/c/CUDA/bin PATH
= /cygdrive/c/Program Files/IMSI/FloorPlan 3D v8/Program PATH =
/usr/X11R6/bin PATH = /usr/X11R6/bin PATH = /usr/lib/lapack
BOOST_ROOT =
/cygdrive/e/projects/Quantumspex/projects/3D_DSA/source/3rdParty/Win32/boost/boost_1_38_0
common.mkdir build/badboy/source/common/lib/glut/build/msvc-9.0express/debug

        mkdir -p
"build/badboy/source/common/lib/glut/build/msvc-9.0express/debug"

common.mkdir
build/badboy/source/common/lib/glut/build/msvc-9.0express/debug/threading-multi

        mkdir -p
"build/badboy/source/common/lib/glut/build/msvc-9.0express/debug/threading-multi"

file
build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\libglut.obj.rsp
"source\common\lib\glut\src\libglut.cpp"
 -Fo"build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\libglut.obj"
   -TP
 /Z7
 /Od
 /Ob0
 /W3
 /GR
 /MDd
 /Zc:forScope
 /Zc:wchar_t
 /wd4675
 /EHs
 -c

"-Isource\common\Win32\include"

"-Isource\common\lib\glut\build"

"-Isource\common\lib\glut\include"

compile-c-c++
build/badboy/source/common/lib/glut/build/msvc-9.0express/debug/threading-multi/libglut.obj

    cmd.exe /S /C call "C:\Program Files\Microsoft Visual Studio
9.0\VC\vcvarsall.bat" x86 ">nul" "&&" cl /Zm800 -nologo
@"build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\libglut.obj.rsp"

libglut.cpp

file
build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\glut32.so.rsp

"build/badboy/source/common/lib/glut/build/msvc-9.0express/debug/threading-multi/libglut.obj"

msvc.link.dll
build/badboy/source/common/lib/glut/build/msvc-9.0express/debug/threading-multi/glut32.so

        cmd.exe /S /C call "C:\Program Files\Microsoft Visual Studio
9.0\VC\vcvarsall.bat" x86 ">nul" "&&" link /NOLOGO /INCREMENTAL:NO /DLL
/DEBUG /subsystem:console
/out:"build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\glut32.so"
/IMPLIB:"build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\glut32.lib"
@"build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\glut32.so.rsp"

msvc.manifest.dll
build/badboy/source/common/lib/glut/build/msvc-9.0express/debug/threading-multi/glut32.so

        if test -e
"build/badboy/source/common/lib/glut/build/msvc-9.0express/debug/threading-multi/glut32.so.manifest";
then
          cmd.exe /S /C call "C:\Program Files\Microsoft Visual Studio
9.0\VC\vcvarsall.bat" x86 ">nul" "&&" mt -nologo -manifest
"build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\glut32.so.manifest"
"-outputresource:build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\glut32.so;2"
        fi
===================================================

Notice the glut32.so....? What is this? Why is a msvc build now creating a
.so?

Now for 1.36.0 build output

Changing to use 1.36

#local BOOST_ROOT = $(THIRD_PARTY_SRC)/boost/boost_1_38_0 ;
#local BOOST_ROOT = $(THIRD_PARTY_SRC)/boost/boost_1_34_0 ;
local BOOST_ROOT = $(THIRD_PARTY_SRC)/boost/boost_1_36_0 ;

And modifying ${THIRD_PARTY_SRC}\boost\boost_1_38_0 to
${THIRD_PARTY_SRC}\boost\boost_1_36_0 in Eclipse environment

Ensure to clean the directory and rebuild!

I get :

===================================================

**** Build of configuration Debug for project 3D_DSA ****

bjam -d+2 toolset=msvc
PATH =
/cygdrive/e/source/3rdParty/Win32/boost/boost_1_36_0/tools/jam/stage/bin.cygwinx86
PATH = /usr/bin PATH = /cygdrive/c/Program Files/Java/jre6/bin/client PATH =
/cygdrive/c/Program Files/Java/jre6/bin PATH =
/cygdrive/e/projects/Quantumspex/projects/3D_DSA/source/3rdParty/Win32/boost/boost_1_38_0/tools/jam/stage/bin.cygwinx86
PATH = /usr/local/bin PATH = /usr/X11R6/bin PATH =
/cygdrive/c/WINDOWS/system32 PATH = /cygdrive/c/WINDOWS PATH =
/cygdrive/c/WINDOWS/System32/Wbem PATH = /cygdrive/c/Program Files/Common
Files/GTK/2.0/bin PATH = /cygdrive/c/Program Files/QuickTime/QTSystem/ PATH
= /cygdrive/c/msys/1.0 PATH = /cygdrive/c/msys/1.0/bin PATH =
/cygdrive/c/Program Files/Microsoft SQL Server/90/Tools/binn/ PATH =
/cygdrive/c/Program Files/TortoiseSVN/bin PATH = /cygdrive/c/Program
Files/ATI Technologies/ATI.ACE/Core-Static PATH = /cygdrive/c/CUDA/bin PATH
= /cygdrive/c/Program Files/IMSI/FloorPlan 3D v8/Program PATH =
/usr/X11R6/bin PATH = /usr/X11R6/bin PATH = /usr/lib/lapack
BOOST_ROOT =
/cygdrive/e/projects/Quantumspex/projects/3D_DSA/source/3rdParty/Win32/boost/boost_1_36_0
warning: Graph library does not contain optional GraphML reader.
note: to enable GraphML support, set EXPAT_INCLUDE and EXPAT_LIBPATH to the
note: directories containing the Expat headers and libraries, respectively.
warning: skipping optional Message Passing Interface (MPI) library.
note: to enable MPI support, add "using mpi ;" to user-config.jam.
note: to suppress this message, pass "--without-mpi" to bjam.
note: otherwise, you can safely ignore this message.
Building Boost.Regex with the optional Unicode/ICU support disabled.
Please refer to the Boost.Regex documentation for more information
(don't panic: this is a strictly optional feature).
MkDir1-quick-fix-for-unix build/badboy/source/common/lib/glut/build

    mkdir -p "build/badboy/source/common/lib/glut/build"

MkDir1-quick-fix-for-unix
build/badboy/source/common/lib/glut/build/msvc-9.0express

    mkdir -p "build/badboy/source/common/lib/glut/build/msvc-9.0express"

MkDir1-quick-fix-for-unix
build/badboy/source/common/lib/glut/build/msvc-9.0express/debug

    mkdir -p
"build/badboy/source/common/lib/glut/build/msvc-9.0express/debug"

MkDir1-quick-fix-for-unix
build/badboy/source/common/lib/glut/build/msvc-9.0express/debug/threading-multi

    mkdir -p
"build/badboy/source/common/lib/glut/build/msvc-9.0express/debug/threading-multi"

file
build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\libglut.obj.rsp
"source\common\lib\glut\src\libglut.cpp"
 -Fo"build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\libglut.obj"
   -TP
 /Z7
 /Od
 /Ob0
 /W3
 /GR
 /MDd
 /Zc:forScope
 /Zc:wchar_t
 /wd4675
 /EHs
 -c

"-Isource\common\Win32\include"

"-Isource\common\lib\glut\build"

"-Isource\common\lib\glut\include"

compile-c-c++
build/badboy/source/common/lib/glut/build/msvc-9.0express/debug/threading-multi/libglut.obj

    cmd.exe /S /C call "C:\Program Files\Microsoft Visual Studio
9.0\VC\vcvarsall.bat" x86 ">nul" "&&" cl /Zm800 -nologo
@"build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\libglut.obj.rsp"

libglut.cpp

file
build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\glut32.dll.rsp

"build/badboy/source/common/lib/glut/build/msvc-9.0express/debug/threading-multi/libglut.obj"

msvc.link.dll
build/badboy/source/common/lib/glut/build/msvc-9.0express/debug/threading-multi/glut32.dll

        cmd.exe /S /C call "C:\Program Files\Microsoft Visual Studio
9.0\VC\vcvarsall.bat" x86 ">nul" "&&" link /NOLOGO /INCREMENTAL:NO /DLL
/DEBUG /subsystem:console
/out:"build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\glut32.dll"
/IMPLIB:"build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\glut32.lib"
@"build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\glut32.dll.rsp"
        if test -e
"build/badboy/source/common/lib/glut/build/msvc-9.0express/debug/threading-multi/glut32.dll.manifest";
then
            cmd.exe /S /C call "C:\Program Files\Microsoft Visual Studio
9.0\VC\vcvarsall.bat" x86 ">nul" "&&" mt -nologo -manifest
"build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\glut32.dll.manifest"
"-outputresource:build\badboy\source\common\lib\glut\build\msvc-9.0express\debug\threading-multi\glut32.dll;2"
        fi
===================================================

And presto chango we get a dll. What I would expect.

Any ideas? Are the genearators messed up for the compiler or are there new
ways of fixing this?

Brian



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