Copy to list. -----Original Message----- From: Mark Dootson Sent: 27 February 2012 20:13
Hi Steve, The warning : duplicate function definition 'SetSelection' detected in XS/ComboBox.xs, line 176 is not what kills your install - or shouldn't be. As far as ExtUtils::XSpp output is concerned there should be more than one definition and it will cause a warning. Whilst parsing the C++ code, all '#ifdef' blocks are parsed without checking the conditions so there may well be duplicate defs at that point. Later, the C compiler applies the #ifdef conditions so only one gets used at compile time. I think the error is either, you are not building in a clean tree - or there's something amiss with your ExtUtils::ParseXS / ExtUtils::XSpp install. Anyhow, lets get this sorted out for you. Let me know which Kununtu/Unbuntu version you are working on currently and I shall work on an environment and some scripts for you so that you can setup and switch between Wx and wxWidgets versions easily. First we need to check that your Perl environment isn't hosed in some way. So, if you could try the following first: (note - we are deleting the directories and exporting SVN). rm -rf Alien-wxWidgets cd Alien-wxWidgets svn export https://wxperl.svn.sourceforge.net/svnroot/wxperl/Alien-wxWidgets/trunk Alien-wxWidgets cd Alien-wxWidgets perl Build.PL --wxWidgets-extraflags="--enable-graphics_ctx --disable-compat26 --enable-mediactrl --with-libjpeg=builtin --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin --with-zlib=builtin --with-expat=builtin --with-libxpm=builtin" --wxWidgets-build='yes' --wxWidgets-source='tar.gz' --wxWidgets-unicode=1 --wxWidgets-build-opengl=0 --wxWidgets-version=2.8.12 perl Build sudo perl Build install cd ../ rm -rf wxPerl svn export https://wxperl.svn.sourceforge.net/svnroot/wxperl/wxPerl/trunk wxPerl cd wxPerl perl Makefile.PL make make test sudo make install It should all work OK. If not, post the errors and we'll take it from there. Note, there is no need to run ldconfig. Aline doesn't install wxWidgets in standard dirs anyway. On 27/02/2012 20:40, Steve Cookson wrote: > Hi Mark, > > I'm now up against that old favourite "Error 1" see below. > > **************************** > in /usr/bin/perl -MExtUtils::XSpp::Cmd -e xspp -- -t typemap.xsp > interface/wx/headerctrl.h, line 534 > Warning: duplicate function definition 'SetSelection' detected in > XS/ComboBox.xs, line 176 > make: ** [Controls.c] Error 1 > **************************** > > At the moment, I'm using a very convoluted way if installing widgets: > 1) Install Alien with wxWidgets and compile widgets. > 2) Update the MediaCtrl wxWidgets c++ source files with my required mods. > 3) Recompile wxWidgets > 4) Download and compile wxPerl from sourceforge - it crashes with the above > error. > 5) Do a 'cpan -i Wx', which somehow carries on from the above install and > fixes everything. > > See below for details. > > 6) Anyhow, I have successfully interupted the cpan install and updated it > with the required changes the wrapping seems to work. > > So, let me do some more testing, but I'd like to submit a patch for this > wrapping. As you may have seen I'm probably going to try to update the wrap > for wxPdfDocument, so any practice I can get is good. > > Secondly, can I raise a bug for the above crash, again, how should I do > this? > > Regards > > Steve > > svn co > https://wxperl.svn.sourceforge.net/svnroot/wxperl/Alien-wxWidgets/trunk > <https://wxperl.svn.sourceforge.net/svnroot/wxperl/Alien-wxWidgets/trunk> > Alien-wxWidgets > > cd Alien-wxWidgets > perl Build.PL --wxWidgets-extraflags="--enable-graphics_ctx > --disable-compat26 --enable-mediactrl --with-libjpeg=builtin > --with-libpng=builtin --with-regex=builtin --with-libtiff=builtin > --with-zlib=builtin --with-expat=builtin --with-libxpm=builtin" > --wxWidgets-build='yes' --wxWidgets-source='tar.gz' --wxWidgets-unicode=1 > --wxWidgets-build-opengl=0 --wxWidgets-version=2.8.11 > perl Build > perl Build install > ldconfig > cd .. > > svn co https://wxperl.svn.sourceforge.net/svnroot/wxperl/wxPerl/trunk > <https://wxperl.svn.sourceforge.net/svnroot/wxperl/wxPerl/trunk> wxPerl > cd wxPerl > perl Makefile.PL > make > make test > make install > cd .. > > cpan -i Wx >