aMule Forum
English => Compilation problems => Topic started by: OldFrog on October 12, 2007, 08:55:14 AM
-
I always get the same issue :
...
amuleDlg.h: In member function ‘CamuleDlg::ZipCatalog_wxImplementation_HashTable::Node** CamuleDlg::ZipCatalog_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:
amuleDlg.h:228: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.8/wx/protocol/http.h: In member function ‘wxStringToStringHashMap_wxImplementation_HashTable::Node** wxStringToStringHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:
/usr/include/wx-2.8/wx/protocol/http.h:21: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.8/wx/image.h: In member function ‘wxImageHistogramBase_wxImplementation_HashTable::Node** wxImageHistogramBase_wxImplementation_HashTable::GetNodePtr(const long unsigned int&) const’:
/usr/include/wx-2.8/wx/image.h:136: warning: dereferencing type-punned pointer will break strict-aliasing rules
if g++ -DHAVE_CONFIG_H -I. -I. -I.. -DENABLE_UPNP=1 -I/usr/lib/wx/include/gtk2-unicode-release-2.8 -I/usr/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -pthread -DENABLE_IP2COUNTRY=1 -DENABLE_GEOIP=1 -I./libs -Ilibs -DUSE_EMBEDDED_CRYPTO -W -Wall -Wshadow -Wundef -O2 -pg -DUSE_WX_EXTENSIONS -MT amule-IP2Country.o -MD -MP -MF ".deps/amule-IP2Country.Tpo" -c -o amule-IP2Country.o `test -f 'IP2Country.cpp' || echo './'`IP2Country.cpp; \
then mv -f ".deps/amule-IP2Country.Tpo" ".deps/amule-IP2Country.Po"; else rm -f ".deps/amule-IP2Country.Tpo"; exit 1; fi
/usr/include/wx-2.8/wx/hashmap.h: In member function ‘wxLongToLongHashMap_wxImplementation_HashTable::Node** wxLongToLongHashMap_wxImplementation_HashTable::GetNodePtr(const long int&) const’:
/usr/include/wx-2.8/wx/hashmap.h:714: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.8/wx/gdicmn.h: In member function ‘wxStringToColourHashMap_wxImplementation_HashTable::Node** wxStringToColourHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:
/usr/include/wx-2.8/wx/gdicmn.h:544: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.8/wx/clntdata.h: In member function ‘wxShadowObjectMethods_wxImplementation_HashTable::Node** wxShadowObjectMethods_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:
/usr/include/wx-2.8/wx/clntdata.h:20: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.8/wx/clntdata.h: In member function ‘wxShadowObjectFields_wxImplementation_HashTable::Node** wxShadowObjectFields_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:
/usr/include/wx-2.8/wx/clntdata.h:25: warning: dereferencing type-punned pointer will break strict-aliasing rules
/usr/include/wx-2.8/wx/protocol/http.h: In member function ‘wxStringToStringHashMap_wxImplementation_HashTable::Node** wxStringToStringHashMap_wxImplementation_HashTable::GetNodePtr(const wxString&) const’:
/usr/include/wx-2.8/wx/protocol/http.h:21: warning: dereferencing type-punned pointer will break strict-aliasing rules
pixmaps/flags_xpm/CountryFlags.h: At global scope:
pixmaps/flags_xpm/CountryFlags.h:513: error: invalid conversion from ‘const char**’ to ‘char**’
pixmaps/flags_xpm/CountryFlags.h:513: error: invalid conversion from ‘const char**’ to ‘char**’
pixmaps/flags_xpm/CountryFlags.h:513: error: invalid conversion from ‘const char**’ to ‘char**’
.......
..... (Snip almost 50 same lines)
.......
pixmaps/flags_xpm/CountryFlags.h:513: error: invalid conversion from ‘const char**’ to ‘char**’
pixmaps/flags_xpm/CountryFlags.h:513: error: invalid conversion from ‘const char**’ to ‘char**’
pixmaps/flags_xpm/CountryFlags.h:513: error: invalid conversion from ‘const char**’ to ‘char**’
pixmaps/flags_xpm/CountryFlags.h:513: error: invalid conversion from ‘const char**’ to ‘char**’
/usr/include/wx-2.8/wx/image.h: In member function ‘wxImageHistogramBase_wxImplementation_HashTable::Node** wxImageHistogramBase_wxImplementation_HashTable::GetNodePtr(const long unsigned int&) const’:
/usr/include/wx-2.8/wx/image.h:136: warning: dereferencing type-punned pointer will break strict-aliasing rules
make[3]: *** [amule-IP2Country.o] Erreur 1
make[3]: quittant le répertoire « /usr/src/rpm/BUILD/amule-cvs/src »
make[2]: *** [all-recursive] Erreur 1
make[2]: quittant le répertoire « /usr/src/rpm/BUILD/amule-cvs/src »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /usr/src/rpm/BUILD/amule-cvs »
make: *** [all] Erreur 2
I still use the same spec file for my RPMS as for the last 300 sqnapshot. Maybe something changed, or a gcc bug ?
Here my settings
gcc --version
gcc (GCC) 4.1.2 20070302 (prerelease) (4.1.2-1mdv2007.1)
Copyright (C) 2006 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.
aMule enabled options:
**** aMule Core ****
Prefix where aMule should be installed? /usr/local
Should aMule be compiled with i18n support? yes
Should aMule be compiled in debug mode? no
Should aMule be compiled with profiling? yes
Should aMule be compiled with optimizations? yes
Should aMule be compiled with UPnP support? yes
Should aMule be compiled with IP2country support? yes
Should aMule monolithic application be built? yes
Should aMule daemon version be built? yes
Should aMule remote gui be built? (EXPERIMENTAL) yes
Crypto++ library/headers style? embedded
**** aMule TextClient ****
Should aMule Command Line Client be built? yes
**** aMule WebServer ****
Should aMule WebServer be built? yes
**** aMule ED2K Links Handler ****
Should aMule ED2K Links Handler be built? yes
**** aMuleLinkCreator ****
Should aMuleLinkCreator GUI version (alc) be built? yes
Should aMuleLinkCreator for console (alcc) be built? yes
**** aMule Statistics ****
Should C aMule Statistics (CAS) be built? yes
Should aMule GUI Statistics (wxCas) be built? yes
**** General Libraries and Tools ****
Should ccache support be enabled? yes
Libraries aMule will use to build:
wxWidgets 2.8.5 (gtk2,shared)
crypto++ embedded
libpng 1.2.13
libgd 2.0.34
zlib 1.2.3
geoip yes
./configure \
--prefix=%{_prefix} \
--disable-debug \
--enable-ccache \
--enable-optimize \
--enable-profile \
--enable-cas \
--enable-geoip \
--enable-wxcas \
--enable-amulecmd \
--enable-amule-gui \
--enable-webserver \
--enable-webservergui \
--enable-ccache \
--enable-kad-compile \
--enable-amulecmdgui \
--enable-amule-daemon \
--enable-embedded_crypto \
--enable-monolithic \
--enable-ed2k \
--enable-alc \
--enable-alcc \
--enable-systray \
--with-wx-config=`rpm -ql wxGTK-devel|grep 'wxgtk-2\.[0-9]-config'` \
--with-wxbase-config=`rpm -ql wxBase|grep 'wxbase-2\.[0-9]-config'`
-
WORKAROUND: To complete the compilation
1) launch compilation
2) when the error appears and stop compilation edit file src/src/pixmaps/flags_xpm/CountryFlags.h
3) change it from
[...]
#include "zm.xpm"
#include "zw.xpm"
struct FlagXPMCode
{
char **xpm;
char *code;
};
to
[...]
#include "zm.xpm"
#include "zw.xpm"
struct FlagXPMCode
{
const char **xpm; // added "const"
char *code;
};
4) run "make"
PLEASE NOTICE:
A - this worked for me, CVS 20071011 and wxWidgets 2.8.6
B - this is NOT a fix: I don't know the code, but I suspect that the file is regenarated every time you execute the build process from beginning.
Bye,
Mr Hyde
-
Fixed. Btw, I recommend you upgradet to gcc-4.2.
-
Sorry for the late answer, I had some V-A-C -A-T-I-O-N ! :-D
Fixed. Btw, I recommend you upgradet to gcc-4.2.
I agree, but, as far as I can, I try to keep the standard tools in my Distro. Mandriva 2007.1 is based on gcc-4.1.2, I wouldn't like to break other rpms I provide. And the only thying I upgraded is wxWidget, because 2.6.3 is a tryue nogo for aMule and is used only by some VLC skin (And different versions of wxWidget can coexist withpooiut that much harm).
Anyway, Manbdriva 2008 soon to be installed.
Thanks for the tips.