make: ** [Controls.c] Error 1

View: New views
4 Messages — Rating Filter:   Alert me  

make: ** [Controls.c] Error 1

by Steve_Bz :: Rate this Message:

| View Threaded | Show Only this Message

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


Parent Message unknown RE: make: ** [Controls.c] Error 1

by Steve_Bz :: Rate this Message:

| View Threaded | Show Only this Message

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
>


RE: make: ** [Controls.c] Error 1

by Steve_Bz :: Rate this Message:

| View Threaded | Show Only this Message

Hi Mark,

Well I've just run your script, which I changed for version 2.8.11 and it
worked fine.

Two observations.

1) The only apparent differences between my script and yours was
        a) The compile flags
        b) I use 'svn co' and you use 'svn export'
2) Secondly, when I run wxperl_demo.pl, I still get:

10:53:59: Warning: Skipping module 'Wx::DemoModules::wxHeaderCtrlSimple'
10:53:59: Warning: Base class package "Wx::HeaderCtrlSimple" is empty.

Which looks suspiciously related to that missing line in the patch I sent
you.

Anyway there is nothing urgent here and I shall continue testing.  Really
I'd like to move to 2.9.2, and upgrade my Kubuntu, so this at least looks
like an oportunity to upgrade my wxWidgets version.

Thanks for the flags you sent, I shall use that syntax in future.

If I encounter any more issues I'll post them.

Regards

Steve

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.11
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



Re: make: ** [Controls.c] Error 1

by Mark Dootson :: Rate this Message:

| View Threaded | Show Only this Message

Hi,

Glad it worked. The flags, I just copied from your original post though
I may have sent them in the past. They are mostly what I use although
the reason is that I am usually creating one sort of binary distribution
or another so reducing dependencies is the goal. I doubt they are
actually helping you compile.

The useful ones are probably

--wxWidgets-extraflags="--enable-graphics_ctx
--disable-compat26 --enable-mediactrl"
--wxWidgets-unicode=1 --wxWidgets-build-opengl=1

Assuming you have freeglut installed, may as well build OpenGL.

The flags --wxWidgets-build='yes' --wxWidgets-source='tar.gz'
--wxWidgets-version=2.8.12

just allow an automated build without prompts.

I think the bit that made it work is deleting the existing directories.
Something had been changed in your source at some point.

On 28/02/2012 13:59, Steve Cookson wrote:

> 2) Secondly, when I run wxperl_demo.pl, I still get:
>
> 10:53:59: Warning: Skipping module 'Wx::DemoModules::wxHeaderCtrlSimple'
> 10:53:59: Warning: Base class package "Wx::HeaderCtrlSimple" is empty.
>
> Which looks suspiciously related to that missing line in the patch I sent
> you.

This is normal. Wx::HeaderCtrlSimple is only available in wxWidgets
2.9.x. The demo handles this by simply failing to load with warnings as
above.

Regards

Mark