|
Boost-Build : |
Subject: Re: [Boost-build] b2/bjam trying to use GCC 6.1.1 missing zlib1.dll
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2016-08-10 13:45:13
> -----Original Message-----
> From: Edward Diener [mailto:eldiener_at_[hidden]]
> Sent: 10 August 2016 01:04
> To: boost-build_at_[hidden]
> Subject: Re: [Boost-build] b2/bjam trying to use GCC 6.1.1 missing zlib1.dll
>
> On 8/9/2016 1:35 PM, Paul A. Bristow wrote:
> >
> >
> >> -----Original Message-----
> >> From: Edward Diener [mailto:eldiener_at_[hidden]]
> >> Sent: 08 August 2016 21:45
> >> To: boost-build_at_[hidden]
> >> Subject: Re: [Boost-build] b2/bjam trying to use GCC 6.1.1 missing zlib1.dll
> >>
> >> On 8/8/2016 2:14 PM, Paul A. Bristow wrote:
> >>> I can run gcc 5.3.0 OK with this in my user-config.com
> >>>
> >>> using gcc
> >>> : # version
> >>> 5.3.0
> >>> : # compiler exe location
> >>> "C:\\Program Files\\mingw-w64\\x86_64-5.3.0-win32-seh-rt_v4-rev0\\mingw64\\bin\\g++.exe"
> >>> : # options
> >>> ;
> >>> # b2 -a toolset=gcc-5.3.0 says 64-bit and x86 and compiles a simple 'hello_worldly' program OK.
> >>>
> >>> I:\modular-boost\libs\quickdox\example>b2 -a toolset=gcc-5.3.0
> >>> Performing configuration checks
> >>>
> >>> - 32-bit : no (cached)
> >>> - 64-bit : yes (cached)
> >>> - arm : no (cached)
> >>> - mips1 : no (cached)
> >>> - power : no (cached)
> >>> - sparc : no (cached)
> >>> - x86 : yes (cached)
> >>> - symlinks supported : yes
> >>> ...found 19 targets...
> >>> ...updating 7 targets...
> >>> common.mkdir ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-5.3.0
> >>> common.mkdir ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-5.3.0\debug
> >>> link.mklink ..\..\..\boost\quickdox\quick_auto_dox_index.hpp
> >>> symbolic link created for ..\..\..\boost\quickdox\quick_auto_dox_index.hpp <<===>>
> >>> ..\..\libs\quickdox\include\boost\quickdox\quick_auto_dox_index.hpp
> >>> gcc.compile.c++ ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-
> >> 5.3.0\debug\quick_auto_dox_index.o
> >>> gcc.link ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-
> >> 5.3.0\debug\quick_auto_dox_index.exe
> >>> testing.capture-output
> >>> ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-5.3.0\debug\quick_auto_dox_index.run
> >>> 1 file(s) copied.
> >>> **passed** ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-
> >> 5.3.0\debug\quick_auto_dox_index.test
> >>> ...updated 7 targets...
> >>>
> >>> and I also have gcc 6.1.1 installed (and working with Codeblocks IDE)
> >>>
> >>> C:\Program Files\gcc-6-win64\bin>g++ -v
> >>> Using built-in specs.
> >>> COLLECT_GCC=g++
> >>> COLLECT_LTO_WRAPPER=c:/program\ files/gcc-6-win64/bin/../libexec/gcc/x86_64-w64-mingw32/6.1.1/lto-
> wrapper.exe
> >>> Target: x86_64-w64-mingw32
> >>> Configured with: /home/cauchy/vcs/svn/gcc/branches/gcc-6-branch/configure --prefix=/home/cauchy/native/gcc-6-
> >> win64
> >>> --with-sysroot=/home/cauchy/native/gcc-6-win64 --build=x86_64-unknown-linux-gnu --host=x86_64-w64-mingw32
> >>> --target=x86_64-w64-mingw32 --disable-gcov-tool --disable-multilib --disable-nls --disable-win32-registry --enable-
> >> checking=release
> >>> --enable-languages=c,c++,fortran --enable-fully-dynamic-string --with-arch=core2 --with-tune=generic
> >>> Thread model: win32
> >>> gcc version 6.1.1 20160609 (GCC)
> >>>
> >>> but now I want to use with b2/bjam so I have added this to my user-config.jam
> >>>
> >>> using gcc
> >>> : # version
> >>> 6.1.1
> >>> : # compiler exe location C:\Program Files\gcc-6-win64\bin\g++.exe
> >>> "C:\\Program Files\\gcc-6-win64\\bin\\g++.exe"
> >>> : # options
> >>> ;
> >>> # Call with b2 -a toolset=gcc-6.1.1
> >>>
> >>> and it fails missing zip1.dll
> >>>
> >>> However this file is in the same \bin directory as g++.exe (and
> >>>
> >>> x86_64-w64-mingw32-c++.exe
> >>> x86_64-w64-mingw32-g++.exe
> >>> ...
> >>>
> >>> I also note that in the config info is it different as says no for 32-bit, 64-bit and x86
> >>>
> >>> I:\modular-boost\libs\quickdox\example>b2 -a toolset=gcc-6.1.1
> >>> Performing configuration checks
> >>>
> >>> - 32-bit : no (cached)
> >>> - 64-bit : no (cached)
> >>> - arm : no (cached)
> >>> - mips1 : no (cached)
> >>> - power : no (cached)
> >>> - sparc : no (cached)
> >>> - x86 : no (cached)
> >>> - combined : no (cached)
> >>> - symlinks supported : yes (cached)
> >>> ...found 23 targets...
> >>> ...updating 5 targets...
> >>> link.mklink ..\..\..\boost\quickdox\quick_auto_dox_index.hpp
> >>> symbolic link created for ..\..\..\boost\quickdox\quick_auto_dox_index.hpp <<===>>
> >>> ..\..\libs\quickdox\include\boost\quickdox\quick_auto_dox_index.hpp
> >>> gcc.compile.c++ ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-
> >> 6.1.1\debug\quick_auto_dox_index.o
> >>>
> >>> "C:\Program Files\gcc-6-win64\bin\g++.exe" -ftemplate-depth-128 -O0 -fno-inline -Wall -g -Wno-missing-braces
> >>> -Wno-unused-local-typedefs -DBOOST_ALL_NO_LIB=1 -I"..\..\.." -I"..\include" -c -o
> >>> "..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-6.1.1\debug\quick_auto_dox_index.o"
> >>> "quick_auto_dox_index.cpp"
> >>>
> >>> ...failed gcc.compile.c++
> >>> ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-6.1.1\debug\quick_auto_dox_index.o...
> >>> ...skipped <p..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-
> >> 6.1.1\debug>quick_auto_dox_index.exe for lack
> >>> of <p..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-
> >> 6.1.1\debug>quick_auto_dox_index.o...
> >>> ...skipped <p..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-
> >> 6.1.1\debug>quick_auto_dox_index.run for lack
> >>> of <p..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-
> >> 6.1.1\debug>quick_auto_dox_index.exe...
> >>> ...failed updating 1 target...
> >>> ...skipped 3 targets...
> >>> ...updated 1 target...
> >>>
> >>> What do I need to do differently for the GCC 6.1.1 compiler?
> >>
> >> The mingw(-64)/gcc implementations needs the gcc directory to be in your
> >> PATH, both while compiling and linking. Why ? Because they decided this
> >> was superior to simply looking for the needed DLLs and static libs in
> >> the same directory as the compiler !!! In other words, they're idiots
> >> but if you tell them that ( in civilized terms of course ) they will
> >> defend how gcc works no matter what you say, ie. because "Microsoft does
> >> it that way", because the world is round, because they are going to stay
> >> in the 19th century ( BC ) no matter how hard you want to drag them into
> >> the present 21st century.
> >
> > OK I have added that, but how does this work when one has several GCC versions?
>
> You need to add each version to the PATH as part of the execution of the
> gcc command. You can do this in one of two ways:
>
> 1) Have the gcc command be a batch file which sets the PATH and then
> executes the g++ command, rather than be just the g++ command.
>
> 2) Execute a batch file which sets a 'user-config.jam' containing only
> the 'using gcc ... etc.' invocation you want, sets the PATH for that gcc
> invocation and then calls 'b2 ...etc.' to run bjam.
>
> Yes, either way is an incredible PITA but what can you do when dealing
> with the "brilliant" ( dripping with sarcasm ) programmers who have
> setup mingw(-64)/gcc for us.
>
> >
> > I've added "C:\Program Files\gcc-6-win64\bin" to PATH expecting that to give access to the appropriate matching version
> zlib1.dll
> >
> > and it appears to do so:
> >
> > I:\modular-boost\libs\quickdox\example>b2 -a toolset=gcc-6.1.1
> > Performing configuration checks
> >
> > - 32-bit : no (cached)
> > - 64-bit : no (cached)
> > - arm : no (cached)
> > - mips1 : no (cached)
> > - power : no (cached)
> > - sparc : no (cached)
> > - x86 : no (cached)
> > - combined : no (cached)
> > - symlinks supported : yes (cached)
> > ...found 23 targets...
> > ...updating 5 targets...
> > link.mklink ..\..\..\boost\quickdox\quick_auto_dox_index.hpp
> > symbolic link created for ..\..\..\boost\quickdox\quick_auto_dox_index.hpp <<===>>
> > ..\..\libs\quickdox\include\boost\quickdox\quick_auto_dox_index.hpp
> > gcc.compile.c++ ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-
> 6.1.1\debug\quick_auto_dox_index.o
> > gcc.link ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-
> 6.1.1\debug\quick_auto_dox_index.exe
> > testing.capture-output
> > ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-6.1.1\debug\quick_auto_dox_index.run
> > 1 file(s) copied.
> > **passed** ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-
> 6.1.1\debug\quick_auto_dox_index.test
> > ...updated 5 targets...
>
> Yay !
>
> >
> > But it looks significant that both 32-bit and 64-bit and x86 all say "no".
>
> Ypu need to pass 'address-model=64' on the b2 command line for 64-bit
> compiles.
>
> >
> > whereas
> >
> > I:\modular-boost\libs\quickdox\example>b2 -a toolset=gcc-5.3.0
> > Performing configuration checks
> >
> > - 32-bit : no (cached)
> > - 64-bit : yes (cached)
> > - arm : no (cached)
> > - mips1 : no (cached)
> > - power : no (cached)
> > - sparc : no (cached)
> > - x86 : yes (cached)
> > - symlinks supported : yes (cached)
> > ...found 23 targets...
> > ...updating 5 targets...
> > link.mklink ..\..\..\boost\quickdox\quick_auto_dox_index.hpp
> > symbolic link created for ..\..\..\boost\quickdox\quick_auto_dox_index.hpp <<===>>
> > ..\..\libs\quickdox\include\boost\quickdox\quick_auto_dox_index.hpp
> > gcc.compile.c++ ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-
> 5.3.0\debug\quick_auto_dox_index.o
> > gcc.link ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-
> 5.3.0\debug\quick_auto_dox_index.exe
> > testing.capture-output
> > ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-5.3.0\debug\quick_auto_dox_index.run
> > 1 file(s) copied.
> > **passed** ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-
> 5.3.0\debug\quick_auto_dox_index.test
> > ...updated 5 targets...
> >
> > I suspect this means I am doing sometime simply wrong, (again - sigh!) but I can't see what.
> >
> > Or do I need to specify both architecture and address model explicitly for gcc 6.1.1?
> >
>
> Just address model works for me for 64-bit builds.
I needed to use --reconfigure to avoid being deluded by the misleading cached values.
b2 -a --reconfigure toolset=gcc-6.1.1 address-model=64 architecture=x86
Performing configuration checks
- 32-bit : no
- 64-bit : yes
- arm : no
- mips1 : no
- power : no
- sparc : no
- x86 : yes
- symlinks supported : yes
...found 19 targets...
...updating 5 targets...
link.mklink ..\..\..\boost\quickdox\quick_auto_dox_index.hpp
symbolic link created for ..\..\..\boost\quickdox\quick_auto_dox_index.hpp <<===>>
..\..\libs\quickdox\include\boost\quickdox\quick_auto_dox_index.hpp
gcc.compile.c++ ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-6.1.1\debug\quick_auto_dox_index.o
gcc.link ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-6.1.1\debug\quick_auto_dox_index.exe
testing.capture-output
..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-6.1.1\debug\quick_auto_dox_index.run
1 file(s) copied.
**passed** ..\..\..\bin.v2\libs\quickdox\example\quick_auto_dox_index.test\gcc-mingw-6.1.1\debug\quick_auto_dox_index.test
...updated 5 targets...
as expected.
But now I need to RTFM to add address-model=64 architecture=x86 to the user-config.jam so I only need to type b2 toolset=gcc-6.1.1
(and even make it the default).
Thanks.
Paul
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