Problem with compiling DC++ using MinGW

Asked by helmorn

Hello, I am currently trying to compile DC++ again. My old post (https://answers.launchpad.net/dcplusplus/+question/70423) already expired because I had already given up on it.

First off, tools and libraries used:

SCons by Steven Knight et al.:
        engine: v1.2.0.d20090223.r4043, 2009/02/23 09:06:45, by scons on scons-dev
Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons Foundation

Bazaar (bzr) 1.14.1
  Python interpreter: C:\Program Files (x86)\Bazaar\python25.dll 2.5.2
  Python standard library: C:\Program Files (x86)\Bazaar\lib\library.zip
  bzrlib: C:\Program Files (x86)\Bazaar\lib\library.zip\bzrlib
  Bazaar configuration: C:\Users\binrapt\AppData\Roaming\bazaar\2.0
  Bazaar log file: C:\Users\binrapt\Documents\.bzr.log

Copyright 2005, 2006, 2007, 2008, 2009 Canonical Ltd.
http://bazaar-vcs.org/

bzr comes with ABSOLUTELY NO WARRANTY. bzr is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 2 or later.

g++ (GCC) 4.3.0 20080305 (alpha-testing) mingw-20080502
Copyright (C) 2008 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.

As poy suggested I got more recent code using "bzr branch lp:dcplusplus" and I am no longer using MSVC for this, as Pietry recommended. I followed Pietry's tutorial:

http://dcpp.wordpress.com/2007/09/04/compiling-dc-in-new-format/

I got cygwin and made STLport-5.1.3 in the specified manner. Compilation fails due to a misconfigured MinGW installation I suspect:

B:\Downloads\DCPlusPlus\BZR\dcplusplus>scons tools=mingw mode=release
scons: Reading SConscript files ...
hhc.exe not found, skipping chm build
scons: done reading SConscript files.
scons: Building targets ...
Compiling build\release-mingw\win32\stdafx.gch (static precompiled header)
In file included from b:\mingw\bin\../lib/gcc/mingw32/4.3.0/../../../../include/
winsock2.h:22,
                 from ./dcpp/stdinc.h:81,
                 from win32\stdafx.h:22:
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/../../../../include/windows.h:47:20: error
: stdarg.h: No such file or directory
In file included from b:\mingw\bin\../lib/gcc/mingw32/4.3.0/../../../../include/
winnt.h:37,
                 from b:\mingw\bin\../lib/gcc/mingw32/4.3.0/../../../../include/
windef.h:253,
                 from b:\mingw\bin\../lib/gcc/mingw32/4.3.0/../../../../include/
windows.h:48,
                 from b:\mingw\bin\../lib/gcc/mingw32/4.3.0/../../../../include/
winsock2.h:22,
                 from ./dcpp/stdinc.h:81,
                 from win32\stdafx.h:22:
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/../../../../include/string.h:24:20: error:
 stddef.h: No such file or directory
In file included from boost/boost/tr1/detail/config_all.hpp:43,
                 from boost\boost\tr1\tr1/algorithm:16,
                 from ./dcpp/stdinc.h:110,
                 from win32\stdafx.h:22:
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/cstddef:48: internal compiler
error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://www.mingw.org/bugs.shtml> for instructions.
scons: *** [build\release-mingw\win32\stdafx.gch] Error 1
scons: building terminated because of errors.

B:\Downloads\DCPlusPlus\BZR\dcplusplus>

I thought I had installed everything necessary but I haven't figured it out yet. The problem is "error: stdarg.h: No such file or directory". I checked my MinGW installation and I could only find B:\MinGW\lib\gcc\mingw32\4.3.0\include\c++\tr1\stdarg.h which is apparently not used. Am I missing some package? Do I need to configure some additional stuff so it uses the tr1 headers or so?

Question information

Language:
English Edit question
Status:
Solved
For:
DC++ Edit question
Assignee:
No assignee Edit question
Solved by:
helmorn
Solved:
Last query:
Last reply:
Revision history for this message
helmorn (binrapt) said :
#1

Ah, I didn't know which package I had originally downloaded so I copied the stuff from gcc-4.3.0-20080502-mingw32-alpha-bin.7z over it and the stdarg.h issue disappeared, now it fails with:

B:\Downloads\DCPlusPlus\BZR\dcplusplus>scons tools=mingw mode=release
scons: Reading SConscript files ...
hhc.exe not found, skipping chm build
scons: done reading SConscript files.
scons: Building targets ...
Compiling build\release-mingw\win32\stdafx.gch (static precompiled header)
In file included from win32\stdafx.h:48:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Generating help\cshelp.h
Compiling build\release-mingw\win32\AboutDlg.o (static)
In file included from win32\/stdafx.h:48,
                 from win32\AboutDlg.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\ADLSearchFrame.o (static)
In file included from win32\/stdafx.h:48,
                 from win32\ADLSearchFrame.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\ADLSProperties.o (static)
In file included from win32\/stdafx.h:48,
                 from win32\ADLSProperties.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\Advanced3Page.o (static)
In file included from win32\/stdafx.h:48,
                 from win32\Advanced3Page.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\AdvancedPage.o (static)
In file included from win32\/stdafx.h:48,
                 from win32\AdvancedPage.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\Appearance2Page.o (static)
In file included from win32\/stdafx.h:48,
                 from win32\Appearance2Page.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\AppearancePage.o (static)
In file included from win32\/stdafx.h:48,
                 from win32\AppearancePage.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\CertificatesPage.o (static)
In file included from win32\/stdafx.h:48,
                 from win32\CertificatesPage.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\ComboBox.o (static)
In file included from win32\/stdafx.h:48,
                 from win32\ComboBox.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\CommandDlg.o (static)
In file included from win32\/stdafx.h:48,
                 from win32\CommandDlg.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\DirectoryListingFrame.o (static)
In file included from win32\/stdafx.h:48,
                 from win32\DirectoryListingFrame.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
In file included from win32\/IRecent.h:22,
                 from win32\/DirectoryListingFrame.h:23,
                 from win32\DirectoryListingFrame.cpp:21:
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h: At
 global scope:
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h: In
 instantiation of '__gnu_cxx::_SGIAssignableConcept<dcpp::WindowInfo>':
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/stl_vector.h:179: insta
ntiated from 'std::vector<dcpp::WindowInfo, std::allocator<dcpp::WindowInfo> >'
./dcpp/WindowManager.h:55: instantiated from here
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:216
: error: '__gnu_cxx::_SGIAssignableConcept<_Tp>::__a' has incomplete type
./dcpp/forward.h:106: error: forward declaration of 'struct dcpp::WindowInfo'
win32\DirectoryListingFrame.cpp: In member function 'bool DirectoryListingFrame:
:handleXMouseUp(const dwt::MouseEvent&)':
win32\DirectoryListingFrame.cpp:1006: warning: enumeration value 'OTHER' not han
dled in switch
win32\DirectoryListingFrame.cpp:1006: warning: enumeration value 'LEFT' not hand
led in switch
win32\DirectoryListingFrame.cpp:1006: warning: enumeration value 'RIGHT' not han
dled in switch
win32\DirectoryListingFrame.cpp:1006: warning: enumeration value 'MIDDLE' not ha
ndled in switch
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h: In
 member function 'void __gnu_cxx::_SGIAssignableConcept<_Tp>::__constraints() [w
ith _Tp = dcpp::WindowInfo]':
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/stl_vector.h:179: insta
ntiated from 'std::vector<dcpp::WindowInfo, std::allocator<dcpp::WindowInfo> >'
./dcpp/WindowManager.h:55: instantiated from here
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:208
: error: using invalid field '__gnu_cxx::_SGIAssignableConcept<_Tp>::__a'
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:209
: error: using invalid field '__gnu_cxx::_SGIAssignableConcept<_Tp>::__a'
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:209
: error: using invalid field '__gnu_cxx::_SGIAssignableConcept<_Tp>::__a'
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/stl_vector.h:179: insta
ntiated from 'std::vector<dcpp::WindowInfo, std::allocator<dcpp::WindowInfo> >'
./dcpp/WindowManager.h:55: instantiated from here
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:210
: error: using invalid field '__gnu_cxx::_SGIAssignableConcept<_Tp>::__a'
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h: In
 member function 'void __gnu_cxx::_SGIAssignableConcept<_Tp>::__const_constraint
s(const _Tp&) [with _Tp = dcpp::WindowInfo]':
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:210
: instantiated from 'void __gnu_cxx::_SGIAssignableConcept<_Tp>::__constraints
() [with _Tp = dcpp::WindowInfo]'
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/stl_vector.h:179: insta
ntiated from 'std::vector<dcpp::WindowInfo, std::allocator<dcpp::WindowInfo> >'
./dcpp/WindowManager.h:55: instantiated from here
b:\mingw\bin\../lib/gcc/mingw32/4.3.0/include/c++/bits/boost_concept_check.h:214
: error: using invalid field '__gnu_cxx::_SGIAssignableConcept<_Tp>::__a'
scons: *** [build\release-mingw\win32\DirectoryListingFrame.o] Error 1
scons: building terminated because of errors.

B:\Downloads\DCPlusPlus\BZR\dcplusplus>

Revision history for this message
Pietry (pietry) said :
#2

Im not sure, but it might be a problem with gcc 4.3.0, i use mingw 4.2. Im also not sure if latest bzr will be using mingw, since arne said he wants to move to gcc 4.4 ( tdm )

Your errors are very strange, something is definitely missing.
You also need gettext to complete compiling ( it wasnt necesary when i made the tutorial )
Try again with gcc 4.2. dwarf2

Revision history for this message
helmorn (binrapt) said :
#3

It got further with 4.2, I think:

tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\AppearancePage.o (static)
In file included from win32\stdafx.h:48,
                 from win32\AppearancePage.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\CertificatesPage.o (static)
In file included from win32\stdafx.h:48,
                 from win32\CertificatesPage.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\ComboBox.o (static)
In file included from win32\stdafx.h:48,
                 from win32\ComboBox.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\CommandDlg.o (static)
In file included from win32\stdafx.h:48,
                 from win32\CommandDlg.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\DirectoryListingFrame.o (static)
In file included from win32\stdafx.h:48,
                 from win32\DirectoryListingFrame.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
win32\DirectoryListingFrame.cpp: In member function 'bool DirectoryListingFrame:
:handleXMouseUp(const dwt::MouseEvent&)':
win32\DirectoryListingFrame.cpp:1006: warning: enumeration value 'OTHER' not han
dled in switch
win32\DirectoryListingFrame.cpp:1006: warning: enumeration value 'LEFT' not hand
led in switch
win32\DirectoryListingFrame.cpp:1006: warning: enumeration value 'RIGHT' not han
dled in switch
win32\DirectoryListingFrame.cpp:1006: warning: enumeration value 'MIDDLE' not ha
ndled in switch
Compiling build\release-mingw\win32\DownloadPage.o (static)
In file included from win32\stdafx.h:48,
                 from win32\DownloadPage.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\FavHubProperties.o (static)
In file included from win32\stdafx.h:48,
                 from win32\FavHubProperties.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\FavHubsFrame.o (static)
In file included from win32\stdafx.h:48,
                 from win32\FavHubsFrame.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
In file included from win32\HubFrame.h:24,
                 from win32\FavHubsFrame.cpp:26:
boost/boost/lambda/detail/lambda_functors.hpp: At global scope:
boost/boost/lambda/detail/lambda_functors.hpp: In instantiation of 'boost::lambd
a::lambda_functor<boost::lambda::identity<const char> >':
boost/boost/lambda/detail/lambda_functor_base.hpp:164: instantiated from 'boos
t::lambda::detail::deduce_argument_types_<boost::tuples::cons<const char, boost:
:tuples::null_type>, boost::tuples::null_type>'
boost/boost/lambda/detail/lambda_functor_base.hpp:170: instantiated from 'boos
t::lambda::detail::deduce_argument_types_<boost::tuples::tuple<boost::lambda::la
mbda_functor<boost::lambda::placeholder<1> >, const char, boost::tuples::null_ty
pe, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type
, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type>, boost::tuples::null_type>'
boost/boost/lambda/detail/lambda_functor_base.hpp:213: instantiated from 'boos
t::lambda::detail::deduce_argument_types<boost::tuples::tuple<boost::lambda::lam
bda_functor<boost::lambda::placeholder<1> >, const char, boost::tuples::null_typ
e, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
 boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, b
oost::tuples::null_type>, boost::tuples::null_type>'
boost/boost/lambda/detail/operator_lambda_func_base.hpp:60: instantiated from
'boost::lambda::detail::binary_rt<boost::lambda::relational_action<boost::lambda
::equal_action>, boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambd
a::placeholder<1> >, const char, boost::tuples::null_type, boost::tuples::null_t
ype, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_typ
e, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>
, boost::tuples::null_type>'
boost/boost/lambda/detail/operator_lambda_func_base.hpp:222: instantiated from
 'boost::lambda::lambda_functor_base<boost::lambda::relational_action<boost::lam
bda::equal_action>, boost::tuples::tuple<boost::lambda::lambda_functor<boost::la
mbda::placeholder<1> >, const char, boost::tuples::null_type, boost::tuples::nul
l_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_
type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_ty
pe> >::sig<boost::tuples::null_type>'
boost/boost/lambda/detail/lambda_functors.hpp:135: instantiated from 'boost::l
ambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::relation
al_action<boost::lambda::equal_action>, boost::tuples::tuple<boost::lambda::lamb
da_functor<boost::lambda::placeholder<1> >, const char, boost::tuples::null_type
, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, bo
ost::tuples::null_type> > >'
win32\AspectChat.h:75: instantiated from here
boost/boost/lambda/detail/lambda_functors.hpp:137: warning: type qualifiers igno
red on function return type
Compiling build\release-mingw\win32\FavoriteDirsPage.o (static)
In file included from win32\stdafx.h:48,
                 from win32\FavoriteDirsPage.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\FinishedDLFrame.o (static)
In file included from win32\stdafx.h:48,
                 from win32\FinishedDLFrame.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\FinishedULFrame.o (static)
In file included from win32\stdafx.h:48,
                 from win32\FinishedULFrame.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\GeneralPage.o (static)
In file included from win32\stdafx.h:48,
                 from win32\GeneralPage.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\HashProgressDlg.o (static)
In file included from win32\stdafx.h:48,
                 from win32\HashProgressDlg.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\HubFrame.o (static)
In file included from win32\stdafx.h:48,
                 from win32\HubFrame.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
In file included from win32\HubFrame.h:24,
                 from win32\HubFrame.cpp:21:
boost/boost/lambda/detail/lambda_functors.hpp: At global scope:
boost/boost/lambda/detail/lambda_functors.hpp: In instantiation of 'boost::lambd
a::lambda_functor<boost::lambda::identity<const char> >':
boost/boost/lambda/detail/lambda_functor_base.hpp:164: instantiated from 'boos
t::lambda::detail::deduce_argument_types_<boost::tuples::cons<const char, boost:
:tuples::null_type>, boost::tuples::null_type>'
boost/boost/lambda/detail/lambda_functor_base.hpp:170: instantiated from 'boos
t::lambda::detail::deduce_argument_types_<boost::tuples::tuple<boost::lambda::la
mbda_functor<boost::lambda::placeholder<1> >, const char, boost::tuples::null_ty
pe, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type
, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type>, boost::tuples::null_type>'
boost/boost/lambda/detail/lambda_functor_base.hpp:213: instantiated from 'boos
t::lambda::detail::deduce_argument_types<boost::tuples::tuple<boost::lambda::lam
bda_functor<boost::lambda::placeholder<1> >, const char, boost::tuples::null_typ
e, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
 boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, b
oost::tuples::null_type>, boost::tuples::null_type>'
boost/boost/lambda/detail/operator_lambda_func_base.hpp:60: instantiated from
'boost::lambda::detail::binary_rt<boost::lambda::relational_action<boost::lambda
::equal_action>, boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambd
a::placeholder<1> >, const char, boost::tuples::null_type, boost::tuples::null_t
ype, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_typ
e, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>
, boost::tuples::null_type>'
boost/boost/lambda/detail/operator_lambda_func_base.hpp:222: instantiated from
 'boost::lambda::lambda_functor_base<boost::lambda::relational_action<boost::lam
bda::equal_action>, boost::tuples::tuple<boost::lambda::lambda_functor<boost::la
mbda::placeholder<1> >, const char, boost::tuples::null_type, boost::tuples::nul
l_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_
type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_ty
pe> >::sig<boost::tuples::null_type>'
boost/boost/lambda/detail/lambda_functors.hpp:135: instantiated from 'boost::l
ambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::relation
al_action<boost::lambda::equal_action>, boost::tuples::tuple<boost::lambda::lamb
da_functor<boost::lambda::placeholder<1> >, const char, boost::tuples::null_type
, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, bo
ost::tuples::null_type> > >'
win32\AspectChat.h:75: instantiated from here
boost/boost/lambda/detail/lambda_functors.hpp:137: warning: type qualifiers igno
red on function return type
dwt\include/dwt/widgets/../aspects/AspectScrollable.h: In member function 'bool
dwt::AspectScrollable<WidgetType>::scrollIsAtEnd() [with WidgetType = dwt::TextB
oxBase]':
win32\HubFrame.cpp:228: instantiated from here
dwt\include/dwt/widgets/../aspects/AspectScrollable.h:99: warning: unused variab
le 'ret'
Compiling build\release-mingw\win32\HubListsDlg.o (static)
In file included from win32\stdafx.h:48,
                 from win32\HubListsDlg.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\LineDlg.o (static)
In file included from win32\stdafx.h:48,
                 from win32\LineDlg.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\LogPage.o (static)
In file included from win32\stdafx.h:48,
                 from win32\LogPage.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\MagnetDlg.o (static)
In file included from win32\stdafx.h:48,
                 from win32\MagnetDlg.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\main.o (static)
In file included from win32\stdafx.h:48,
                 from win32\main.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\MainWindow.o (static)
In file included from win32\MainWindow.cpp:30:
win32\UPnP.h:27:21: error: natupnp.h: No such file or directory
In file included from win32\stdafx.h:48,
                 from win32\MainWindow.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
In file included from win32\MainWindow.cpp:30:
win32\UPnP.h: At global scope:
win32\UPnP.h:44: error: ISO C++ forbids declaration of 'IUPnPNAT' with no type
win32\UPnP.h:44: error: expected ';' before '*' token
In file included from win32\HubFrame.h:24,
                 from win32\MainWindow.cpp:32:
boost/boost/lambda/detail/lambda_functors.hpp: In instantiation of 'boost::lambd
a::lambda_functor<boost::lambda::identity<const char> >':
boost/boost/lambda/detail/lambda_functor_base.hpp:164: instantiated from 'boos
t::lambda::detail::deduce_argument_types_<boost::tuples::cons<const char, boost:
:tuples::null_type>, boost::tuples::null_type>'
boost/boost/lambda/detail/lambda_functor_base.hpp:170: instantiated from 'boos
t::lambda::detail::deduce_argument_types_<boost::tuples::tuple<boost::lambda::la
mbda_functor<boost::lambda::placeholder<1> >, const char, boost::tuples::null_ty
pe, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type
, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type>, boost::tuples::null_type>'
boost/boost/lambda/detail/lambda_functor_base.hpp:213: instantiated from 'boos
t::lambda::detail::deduce_argument_types<boost::tuples::tuple<boost::lambda::lam
bda_functor<boost::lambda::placeholder<1> >, const char, boost::tuples::null_typ
e, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
 boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, b
oost::tuples::null_type>, boost::tuples::null_type>'
boost/boost/lambda/detail/operator_lambda_func_base.hpp:60: instantiated from
'boost::lambda::detail::binary_rt<boost::lambda::relational_action<boost::lambda
::equal_action>, boost::tuples::tuple<boost::lambda::lambda_functor<boost::lambd
a::placeholder<1> >, const char, boost::tuples::null_type, boost::tuples::null_t
ype, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_typ
e, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type>
, boost::tuples::null_type>'
boost/boost/lambda/detail/operator_lambda_func_base.hpp:222: instantiated from
 'boost::lambda::lambda_functor_base<boost::lambda::relational_action<boost::lam
bda::equal_action>, boost::tuples::tuple<boost::lambda::lambda_functor<boost::la
mbda::placeholder<1> >, const char, boost::tuples::null_type, boost::tuples::nul
l_type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_
type, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_ty
pe> >::sig<boost::tuples::null_type>'
boost/boost/lambda/detail/lambda_functors.hpp:135: instantiated from 'boost::l
ambda::lambda_functor<boost::lambda::lambda_functor_base<boost::lambda::relation
al_action<boost::lambda::equal_action>, boost::tuples::tuple<boost::lambda::lamb
da_functor<boost::lambda::placeholder<1> >, const char, boost::tuples::null_type
, boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type,
boost::tuples::null_type, boost::tuples::null_type, boost::tuples::null_type, bo
ost::tuples::null_type> > >'
win32\AspectChat.h:75: instantiated from here
boost/boost/lambda/detail/lambda_functors.hpp:137: warning: type qualifiers igno
red on function return type
scons: *** [build\release-mingw\win32\MainWindow.o] Error 1
scons: building terminated because of errors.

Great, as it turns out this wasn't even 4.2, it's a misnamed 4.3.3 dwarf 2 (?):

B:\Downloads\DCPlusPlus\BZR\dcplusplus>g++ --version
g++ (GCC) 4.3.3-dw2-tdm-1
Copyright (C) 2008 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.

Random Google hit from http://nuwen.net/files/mingw/mingw-4.2.tar.bz2.

Couldn't be arsed to compile 4.2 from source from the SF files...
I have problems finding a version marked as "dwarf 2" - which actual version is that? Do you happen to have a link for that? There appear to be at least three (or two?) named versions of 4.2.1 and I have no idea how they differ:

http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=241304 (for example)

Revision history for this message
helmorn (binrapt) said :
#4

I can't even find instructions on how to build that source. README refers to INSTALL directory, INSTALL directory contains a placeholder and refers to index.html, HTML documentation says this is only an FAQ and doesn't contain building instructions. The MinGW site assumes you use a binary dist. mingw-make doesn't find makefiles in the gcc src root. Hm. I assume it's probably much easier to find the right binary release.

Revision history for this message
helmorn (binrapt) said :
#5

I found the following binaries:

http://mozilla.ntua.gr/pub/pc/mingw/gcc-g++-4.2.1-dw2-2.tar.gz
http://mozilla.ntua.gr/pub/pc/mingw/gcc-core-4.2.1-dw2-2.tar.gz

Unluckily the binaries have -dw2- in their name and don't work with scons so I renamed a few binaries to see what would happen:

B:\Downloads\DCPlusPlus\BZR\dcplusplus>g++ --version
g++ (GCC) 4.2.1-dw2 (mingw32-2)
Copyright (C) 2007 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.

B:\Downloads\DCPlusPlus\BZR\dcplusplus>scons tools=mingw mode=release
scons: Reading SConscript files ...
hhc.exe not found, skipping chm build
scons: done reading SConscript files.
scons: Building targets ...
Compiling build\release-mingw\win32\stdafx.gch (static precompiled header)
In file included from win32\stdafx.h:48:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules
Compiling build\release-mingw\win32\AboutDlg.o (static)
g++: CreateProcess: No such file or directory
scons: *** [build\release-mingw\win32\AboutDlg.o] Error 1
scons: building terminated because of errors.

B:\Downloads\DCPlusPlus\BZR\dcplusplus>In file included from win32\/stdafx.h:48,

                 from win32\AboutDlg.cpp:19:
dwt\include/dwt/widgets/Tree.h: In member function 'dwt::Rectangle dwt::Tree::ge
tItemRect(_TREEITEM*)':
dwt\include/dwt/widgets/Tree.h:332: warning: dereferencing type-punned pointer w
ill break strict-aliasing rules

"g++: CreateProcess: No such file or directory" <- I can only guess how this happened. Currently using the following combination of packages:

gcc-g++-4.2.1-dw2-2.tar.gz
gcc-core-4.2.1-dw2-2.tar.gz
mingwrt-3.15.2-mingw32-dev.tar.gz
mingw32-make-3.81-20080326-2.tar.gz
w32api-3.13-mingw32-dev.tar.gz

Revision history for this message
helmorn (binrapt) said :
#6

http://switch.dl.sourceforge.net/sourceforge/tdm-gcc/tdm-mingw-1.905.0-4.4.0-2.exe works like a charm! The 2008 natupnp.h didn't work for me, btw. I had to copy the one from the SDK if I recall correctly. First it failed to link DCPlusPlus.exe due to -lhtmlhelp. I thought I had to find a tool to convert Microsoft .lib to gcc .a (I had heard of one) but copying htmlhelp.lib to gcc/lib worked for some reason. Can TDM handle .lib?! Awesome! DCPlusPlus.exe is 70.4 MiB in size with scons tools=mingw mode=release.

After that it crashed though:

B:\Downloads\DCPlusPlus\BZR\dcplusplus>scons tools=mingw mode=release
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
Linking build\release-mingw\bin\DCPlusPlus.exe (static)
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Warning: .drectve `-defaultlib:uuid.lib ' unrecognized
Updating translation help\po\ar.po from help\po\dcpp-help.pot
scons: *** [help\po\ar.po] Error -1073741515
scons: building terminated because of errors.

Crash due to:

msgmerge.exe: Missing intl.dll
(GPLEd stopped working blah blah)

Thanks a lot for your help anyways! The binary even works this time! This is SJSJ unwinding btw, not Dwarf 2. Now, could you please tell me how to get rid of the 63 megabytes of debug symbols or whatever it contains?

Revision history for this message
poy (poy) said :
#7

read the "Compile.txt" file, it contains all the problems you mentioned and would have saved you a lot of trouble... use the "strip" command to remove the debug symbols, but there's no reason you should have to do that unless you plan on distributing your binary.

Revision history for this message
helmorn (binrapt) said :
#8

Yeah I started out with "Compile.txt" weeks ago, but none of it really worked. I managed to compile one of the previous DC++ versions with scons and MSVC but the binary would crash for unknown reasons, haha. The key to this was the TDM remark really, I had never heard of this release before. Apparently 4.2 works for him, 4.3 doesn't, 4.4 works again? Oh and the STLPort used isn't mentioned in Compile.txt either, newer versions break something somebody said on Pietry's blog. I strongly suggest that the exact configuration (version numbers for EVERY tool and EVERY library involved) be posted in future Compile.txts.

Thanks!

Revision history for this message
Pietry (pietry) said :
#9

Well, why are you looking for strange mingw versions ? The mingw sourceforge page provides the exact binaries you need, here is a link for you :
http://sourceforge.net/project/showfiles.php?group_id=2435&package_id=241304&release_id=532062
with gcc 4.2 set jump/long jump which is fully compatible with dwarf2 but potentially slower ( should not be a problem )
The new sf.net interface is quite difficult i wasnt able to find dwarf2 download page =)