Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 931939 - dev-perl/Wx-0.993.200-r3 fails to compile
Summary: dev-perl/Wx-0.993.200-r3 fails to compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Perl team
URL:
Whiteboard:
Keywords: PATCH, PullRequest
: 932260 937547 (view as bug list)
Depends on:
Blocks: parallel-make
  Show dependency tree
 
Reported: 2024-05-15 08:56 UTC by Attila Tóth
Modified: 2024-09-05 19:33 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch to force gcc compile .c files as c++ (Wx-0.993.200-r3.ebuild.patch,282 bytes, patch)
2024-05-29 12:21 UTC, Robert Wolf
Details | Diff
emerge --info (emerge-info.txt,7.55 KB, text/plain)
2024-05-29 13:24 UTC, Robert Wolf
Details
build.log for failed compilation (build.log.failed.txt,141.45 KB, text/plain)
2024-05-29 13:25 UTC, Robert Wolf
Details
build.log for .c compiled as c++ (build.log.compiled-as-cpp.txt,89.44 KB, text/plain)
2024-05-29 13:25 UTC, Robert Wolf
Details
build.log for -j1 (wx.1-j1.build.log,106.30 KB, text/plain)
2024-07-31 08:09 UTC, Robert Wolf
Details
environment for -j1 (wx.1-j1.environment.txt,98.56 KB, text/plain)
2024-07-31 08:09 UTC, Robert Wolf
Details
emerge --info for -j1 (wx.1-j1.emerge-info.txt,7.61 KB, text/plain)
2024-07-31 08:10 UTC, Robert Wolf
Details
build.log for -j1 and patch (wx.2-patch.build.log,106.39 KB, text/plain)
2024-07-31 08:10 UTC, Robert Wolf
Details
environment for -j1 and patch (wx.2-patch.environment.txt,98.69 KB, text/plain)
2024-07-31 08:10 UTC, Robert Wolf
Details
emerge --info for -j1 and patch (wx.2-patch.emerge-info.txt,7.61 KB, text/plain)
2024-07-31 08:11 UTC, Robert Wolf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Attila Tóth 2024-05-15 08:56:37 UTC
x86_64-pc-linux-gnu-gcc -c  -I. -I. -I/usr/lib64/wx/include/gtk3-unicode-3.2-gtk3 -I/usr/include/wx-3.2-gtk3  -O2 -march=native -pipe -fno-strict-aliasing -DNO_PERL_RAND_SEED -fwrapv -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -march=native -pipe   -DVERSION=\"0.9932\" -DXS_VERSION=\"0.9932\" -fPIC "-I/usr/lib64/perl5/5.38/x86_64-linux-quadmath/CORE"  -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__   Constant.c
make[1]: Entering directory '/var/tmp/portage/dev-perl/Wx-0.993.200-r3/work/Wx-0.9932/ext'
"/usr/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- Wx.bs blib/arch/auto/Wx/Wx.bs 644
"/usr/bin/perl" "/usr/lib64/perl5/5.38/ExtUtils/xsubpp"  -nolinenumbers -noprototypes  -typemap '/usr/lib64/perl5/5.38/ExtUtils/typemap' -typemap '/var/tmp/portage/dev-perl/Wx-0.993.200-r3/work/Wx-0.9932/typemap'  Controls.xs > Controls.xsc
make[2]: Entering directory '/var/tmp/portage/dev-perl/Wx-0.993.200-r3/work/Wx-0.9932/ext/html'
In file included from /usr/include/wx-3.2-gtk3/wx/strconv.h:17,
                 from /usr/include/wx-3.2-gtk3/wx/strvararg.h:17,
                 from /usr/include/wx-3.2-gtk3/wx/string.h:37,
                 from /usr/include/wx-3.2-gtk3/wx/memory.h:15,
                 from /usr/include/wx-3.2-gtk3/wx/object.h:19,
                 from /usr/include/wx-3.2-gtk3/wx/event.h:16,
                 from /usr/include/wx-3.2-gtk3/wx/window.h:18,
                 from /usr/include/wx-3.2-gtk3/wx/nonownedwnd.h:14,
                 from /usr/include/wx-3.2-gtk3/wx/toplevel.h:20,
                 from /usr/include/wx-3.2-gtk3/wx/dialog.h:14,
                 from /usr/include/wx-3.2-gtk3/wx/filedlg.h:18,
                 from Constant.c:31:
/usr/include/wx-3.2-gtk3/wx/buffer.h:19:1: error: unknown type name ‘class’
   19 | class WXDLLIMPEXP_FWD_BASE wxCStrData;
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/buffer.h:27:1: error: unknown type name ‘namespace’
   27 | namespace wxPrivate
      | ^~~~~~~~~
/usr/include/wx-3.2-gtk3/wx/buffer.h:28:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
   28 | {
      | ^
/usr/include/wx-3.2-gtk3/wx/buffer.h:65:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
   65 | template <typename T>
      |          ^
/usr/include/wx-3.2-gtk3/wx/buffer.h:241:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
  241 | typedef wxScopedCharTypeBuffer<char> wxScopedCharBuffer;
      |                               ^
/usr/include/wx-3.2-gtk3/wx/buffer.h:242:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
  242 | typedef wxScopedCharTypeBuffer<wchar_t> wxScopedWCharBuffer;
      |                               ^
/usr/include/wx-3.2-gtk3/wx/buffer.h:246:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
  246 | template <typename T>
      |          ^
/usr/include/wx-3.2-gtk3/wx/buffer.h:357:1: error: unknown type name ‘class’
  357 | class wxCharBuffer : public wxCharTypeBuffer<char>
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/buffer.h:357:20: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
  357 | class wxCharBuffer : public wxCharTypeBuffer<char>
      |                    ^
/usr/include/wx-3.2-gtk3/wx/buffer.h:374:1: error: unknown type name ‘class’
  374 | class wxWCharBuffer : public wxCharTypeBuffer<wchar_t>
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/buffer.h:374:21: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘:’ token
  374 | class wxWCharBuffer : public wxCharTypeBuffer<wchar_t>
      |                     ^
/usr/include/wx-3.2-gtk3/wx/buffer.h:392:10: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
  392 | template <typename T>
      |          ^
/usr/include/wx-3.2-gtk3/wx/buffer.h:410:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
  410 | typedef wxWritableCharTypeBuffer<char> wxWritableCharBuffer;
      |                                 ^
/usr/include/wx-3.2-gtk3/wx/buffer.h:411:33: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
  411 | typedef wxWritableCharTypeBuffer<wchar_t> wxWritableWCharBuffer;
      |                                 ^
/usr/include/wx-3.2-gtk3/wx/buffer.h:440:1: error: unknown type name ‘class’
  440 | class wxMemoryBufferData
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/buffer.h:441:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
  441 | {
      | ^
/usr/include/wx-3.2-gtk3/wx/buffer.h:516:1: error: unknown type name ‘class’
  516 | class wxMemoryBuffer
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/buffer.h:517:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’ token
  517 | {
      | ^
/usr/include/wx-3.2-gtk3/wx/strconv.h:21:1: error: unknown type name ‘class’
   21 | class WXDLLIMPEXP_FWD_BASE wxString;
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:41:1: warning: data definition has no type or storage class
   41 | class WXDLLIMPEXP_BASE wxMBConv
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:41:1: warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]
/usr/include/wx-3.2-gtk3/wx/strconv.h:41:24: error: expected ‘,’ or ‘;’ before ‘wxMBConv’
   41 | class WXDLLIMPEXP_BASE wxMBConv
      |                        ^~~~~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:186:1: warning: data definition has no type or storage class
  186 | class WXDLLIMPEXP_BASE wxMBConvLibc : public wxMBConv
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:186:1: warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]
/usr/include/wx-3.2-gtk3/wx/strconv.h:186:24: error: expected ‘,’ or ‘;’ before ‘wxMBConvLibc’
  186 | class WXDLLIMPEXP_BASE wxMBConvLibc : public wxMBConv
      |                        ^~~~~~~~~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:206:1: warning: data definition has no type or storage class
  206 | class WXDLLIMPEXP_BASE wxConvBrokenFileNames : public wxMBConv
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:206:1: warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]
/usr/include/wx-3.2-gtk3/wx/strconv.h:206:24: error: expected ‘,’ or ‘;’ before ‘wxConvBrokenFileNames’
  206 | class WXDLLIMPEXP_BASE wxConvBrokenFileNames : public wxMBConv
      |                        ^~~~~~~~~~~~~~~~~~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:250:1: warning: data definition has no type or storage class
  250 | class WXDLLIMPEXP_BASE wxMBConvUTF7 : public wxMBConv
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:250:1: warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]
/usr/include/wx-3.2-gtk3/wx/strconv.h:250:24: error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF7’
  250 | class WXDLLIMPEXP_BASE wxMBConvUTF7 : public wxMBConv
      |                        ^~~~~~~~~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:342:1: warning: data definition has no type or storage class
  342 | class WXDLLIMPEXP_BASE wxMBConvStrictUTF8 : public wxMBConv
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:342:1: warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]
/usr/include/wx-3.2-gtk3/wx/strconv.h:342:24: error: expected ‘,’ or ‘;’ before ‘wxMBConvStrictUTF8’
  342 | class WXDLLIMPEXP_BASE wxMBConvStrictUTF8 : public wxMBConv
      |                        ^~~~~~~~~~~~~~~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:361:1: warning: data definition has no type or storage class
  361 | class WXDLLIMPEXP_BASE wxMBConvUTF8 : public wxMBConvStrictUTF8
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:361:1: warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]
/usr/include/wx-3.2-gtk3/wx/strconv.h:361:24: error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF8’
  361 | class WXDLLIMPEXP_BASE wxMBConvUTF8 : public wxMBConvStrictUTF8
      |                        ^~~~~~~~~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:394:1: warning: data definition has no type or storage class
  394 | class WXDLLIMPEXP_BASE wxMBConvUTF16Base : public wxMBConv
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:394:1: warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]
/usr/include/wx-3.2-gtk3/wx/strconv.h:394:24: error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF16Base’
  394 | class WXDLLIMPEXP_BASE wxMBConvUTF16Base : public wxMBConv
      |                        ^~~~~~~~~~~~~~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:413:1: warning: data definition has no type or storage class
  413 | class WXDLLIMPEXP_BASE wxMBConvUTF16LE : public wxMBConvUTF16Base
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:413:1: warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]
/usr/include/wx-3.2-gtk3/wx/strconv.h:413:24: error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF16LE’
  413 | class WXDLLIMPEXP_BASE wxMBConvUTF16LE : public wxMBConvUTF16Base
      |                        ^~~~~~~~~~~~~~~
cp lib/Wx/Loader.pod blib/lib/Wx/Loader.pod
/usr/include/wx-3.2-gtk3/wx/strconv.h:428:1: warning: data definition has no type or storage class
  428 | class WXDLLIMPEXP_BASE wxMBConvUTF16BE : public wxMBConvUTF16Base
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:428:1: warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]
cp lib/Wx/ArtProvider.pm blib/lib/Wx/ArtProvider.pm
/usr/include/wx-3.2-gtk3/wx/strconv.h:428:24: error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF16BE’
  428 | class WXDLLIMPEXP_BASE wxMBConvUTF16BE : public wxMBConvUTF16Base
      |                        ^~~~~~~~~~~~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:443:1: warning: data definition has no type or storage class
  443 | class WXDLLIMPEXP_BASE wxMBConvUTF32Base : public wxMBConv
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:443:1: warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]
/usr/include/wx-3.2-gtk3/wx/strconv.h:443:24: error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF32Base’
  443 | class WXDLLIMPEXP_BASE wxMBConvUTF32Base : public wxMBConv
      |                        ^~~~~~~~~~~~~~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:461:1: warning: data definition has no type or storage class
  461 | class WXDLLIMPEXP_BASE wxMBConvUTF32LE : public wxMBConvUTF32Base
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:461:1: warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]
/usr/include/wx-3.2-gtk3/wx/strconv.h:461:24: error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF32LE’
  461 | class WXDLLIMPEXP_BASE wxMBConvUTF32LE : public wxMBConvUTF32Base
      |                        ^~~~~~~~~~~~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:476:1: warning: data definition has no type or storage class
  476 | class WXDLLIMPEXP_BASE wxMBConvUTF32BE : public wxMBConvUTF32Base
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:476:1: warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]
/usr/include/wx-3.2-gtk3/wx/strconv.h:476:24: error: expected ‘,’ or ‘;’ before ‘wxMBConvUTF32BE’
  476 | class WXDLLIMPEXP_BASE wxMBConvUTF32BE : public wxMBConvUTF32Base
      |                        ^~~~~~~~~~~~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:493:1: warning: data definition has no type or storage class
  493 | class WXDLLIMPEXP_BASE wxCSConv : public wxMBConv
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:493:1: warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]
/usr/include/wx-3.2-gtk3/wx/strconv.h:493:24: error: expected ‘,’ or ‘;’ before ‘wxCSConv’
  493 | class WXDLLIMPEXP_BASE wxCSConv : public wxMBConv
      |                        ^~~~~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:561:1: warning: data definition has no type or storage class
  561 | class WXDLLIMPEXP_BASE wxWhateverWorksConv : public wxMBConv
      | ^~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:561:1: warning: type defaults to ‘int’ in declaration of ‘class’ [-Wimplicit-int]
/usr/include/wx-3.2-gtk3/wx/strconv.h:561:24: error: expected ‘,’ or ‘;’ before ‘wxWhateverWorksConv’
  561 | class WXDLLIMPEXP_BASE wxWhateverWorksConv : public wxMBConv
      |                        ^~~~~~~~~~~~~~~~~~~
cp Wx.pm blib/lib/Wx.pm
cp lib/Wx/Locale.pm blib/lib/Wx/Locale.pm
In file included from /usr/include/wx-3.2-gtk3/wx/defs.h:550,
                 from Constant.c:29:
/usr/include/wx-3.2-gtk3/wx/strconv.h:616:24: error: unknown type name ‘wxMBConv’
  616 | WX_DECLARE_GLOBAL_CONV(wxMBConv, wxConvLibc)
      |                        ^~~~~~~~
/usr/include/wx-3.2-gtk3/wx/dlimpexp.h:103:50: note: in definition of macro ‘WXDLLIMPEXP_DATA_BASE’
  103 | #    define WXDLLIMPEXP_DATA_BASE(type) WXIMPORT type
      |                                                  ^~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:616:1: note: in expansion of macro ‘WX_DECLARE_GLOBAL_CONV’
  616 | WX_DECLARE_GLOBAL_CONV(wxMBConv, wxConvLibc)
      | ^~~~~~~~~~~~~~~~~~~~~~
cp lib/Wx/Mini.pm blib/lib/Wx/Mini.pm
/usr/include/wx-3.2-gtk3/wx/strconv.h:616:24: error: unknown type name ‘wxMBConv’
  616 | WX_DECLARE_GLOBAL_CONV(wxMBConv, wxConvLibc)
      |                        ^~~~~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:605:29: note: in definition of macro ‘WX_DECLARE_GLOBAL_CONV’
  605 |     extern WXDLLIMPEXP_BASE klass* wxGet_##name##Ptr();                 \
      |                             ^~~~~
cp build/Wx/build/MakeMaker/Core.pm blib/lib/Wx/build/MakeMaker/Core.pm
/usr/include/wx-3.2-gtk3/wx/strconv.h:606:17: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘&’ token
  606 |     inline klass& wxGet_##name()                                        \
      |                 ^
/usr/include/wx-3.2-gtk3/wx/strconv.h:616:1: note: in expansion of macro ‘WX_DECLARE_GLOBAL_CONV’
  616 | WX_DECLARE_GLOBAL_CONV(wxMBConv, wxConvLibc)
      | ^~~~~~~~~~~~~~~~~~~~~~
cp build/Wx/build/Options.pm blib/lib/Wx/build/Options.pm
/usr/include/wx-3.2-gtk3/wx/strconv.h:620:24: error: unknown type name ‘wxCSConv’
  620 | WX_DECLARE_GLOBAL_CONV(wxCSConv, wxConvISO8859_1)
      |                        ^~~~~~~~
/usr/include/wx-3.2-gtk3/wx/dlimpexp.h:103:50: note: in definition of macro ‘WXDLLIMPEXP_DATA_BASE’
  103 | #    define WXDLLIMPEXP_DATA_BASE(type) WXIMPORT type
      |                                                  ^~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:620:1: note: in expansion of macro ‘WX_DECLARE_GLOBAL_CONV’
  620 | WX_DECLARE_GLOBAL_CONV(wxCSConv, wxConvISO8859_1)
      | ^~~~~~~~~~~~~~~~~~~~~~
cp build/Wx/build/Utils.pm blib/lib/Wx/build/Utils.pm
/usr/include/wx-3.2-gtk3/wx/strconv.h:620:24: error: unknown type name ‘wxCSConv’
  620 | WX_DECLARE_GLOBAL_CONV(wxCSConv, wxConvISO8859_1)
      |                        ^~~~~~~~
/usr/include/wx-3.2-gtk3/wx/strconv.h:605:29: note: in definition of macro ‘WX_DECLARE_GLOBAL_CONV’
  605 |     extern WXDLLIMPEXP_BASE klass* wxGet_##name##Ptr();                 \
      |                             ^~~~~


Reproducible: Always




replacing the include <wx/defs.h> to "cpp/wxapi.h" seems to work for Constant.c, but a bunch of other failures pop up.
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-16 03:20:23 UTC
Full build.log please?
Comment 2 Robert Wolf 2024-05-29 11:23:54 UTC
Hello,

the problem is, that Wx.c is compiled as "C" code, not as "C++" code. If the file would be named Wx.cpp, the gcc could compile it as C++. Gcc can be forced to compile as C++ using -x c++.

======================================================================
# x86_64-pc-linux-gnu-gcc -c  -I. -I. -I/usr/lib64/wx/include/gtk3-unicode-3.2-gtk3 -I/usr/include/wx-3.2-gtk3  -O2 -pipe -fomit-frame-pointer -fno-strict-aliasing -DNO_PERL_RAND_SEED -fwrapv -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -pipe -fomit-frame-pointer   -DVERSION=\"0.9932\" -DXS_VERSION=\"0.9932\" -fPIC "-I/usr/lib64/perl5/5.38/x86_64-linux/CORE"  -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__  Wx.c ; echo "GCC error code $?" ; ls -l Wx.o
In file included from /usr/include/wx-3.2-gtk3/wx/strconv.h:17,
                 from /usr/include/wx-3.2-gtk3/wx/strvararg.h:17,
                 from /usr/include/wx-3.2-gtk3/wx/string.h:37,
                 from /usr/include/wx-3.2-gtk3/wx/memory.h:15,
                 from /usr/include/wx-3.2-gtk3/wx/object.h:19,
                 from ./cpp/helpers.h:16,
                 from cpp/wxapi.h:170,
                 from Wx.c:32:
/usr/include/wx-3.2-gtk3/wx/buffer.h:19:1: error: unknown type name ‘class’; did you mean ‘OPclass’?
   19 | class WXDLLIMPEXP_FWD_BASE wxCStrData;
      | ^~~~~
      | OPclass
....
GCC error code 1
ls: cannot access 'Wx.o': No such file or directory
======================================================================

Using "-x c++" option compiles without error (only with warnings):

======================================================================
# x86_64-pc-linux-gnu-gcc -c  -I. -I. -I/usr/lib64/wx/include/gtk3-unicode-3.2-gtk3 -I/usr/include/wx-3.2-gtk3  -O2 -pipe -fomit-frame-pointer -fno-strict-aliasing -DNO_PERL_RAND_SEED -fwrapv -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -pipe -fomit-frame-pointer   -DVERSION=\"0.9932\" -DXS_VERSION=\"0.9932\" -fPIC "-I/usr/lib64/perl5/5.38/x86_64-linux/CORE"  -D_FILE_OFFSET_BITS=64 -DWXUSINGDLL -D__WXGTK__  -x c++ Wx.c ; echo "GCC error code $?" ; ls -l Wx.o
In file included from cpp/v_cback.h:782,
                 from Wx.c:67:
cpp/tipprovider.h: In member function ‘wxString wxPliTipProvider::PreprocessTip(const wxString&)’:
./cpp/v_cback_def.h:443:103: warning: ‘wxString wxTipProvider::PreprocessTip(const wxString&)’ is deprecated: this method does nothing, simply don't call it [-Wdeprecated-declarations]
  443 |     DEF_V_CBACK_ANY__WXSTRING_( wxString, wxPli_sv_2_wxString( aTHX_ ret ), CLASS, return BASE::METHOD(p1), METHOD, wxPli_NOCONST )
./cpp/v_cback_def.h:204:13: note: in definition of macro ‘DEF_V_CBACK_ANY__WXSTRING_’
  204 |             CALLBASE;                                                         \
      |             ^~~~~~~~
cpp/tipprovider.h:35:1: note: in expansion of macro ‘DEF_V_CBACK_WXSTRING__WXSTRING’
   35 | DEF_V_CBACK_WXSTRING__WXSTRING( wxPliTipProvider, wxTipProvider, PreprocessTip );
      | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from Wx.c:3928:
/usr/include/wx-3.2-gtk3/wx/tipdlg.h:53:14: note: declared here
   53 |     wxString PreprocessTip(const wxString& tip) { return tip; }
      |              ^~~~~~~~~~~~~
Wx.c: In function ‘void XS_Wx__TipProvider_PreprocessTip(CV*)’:
Wx.c:5066:37: warning: ‘wxString wxTipProvider::PreprocessTip(const wxString&)’ is deprecated: this method does nothing, simply don't call it [-Wdeprecated-declarations]
 5066 |         RETVAL = THIS->PreprocessTip(tip);
      |                  ~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/wx-3.2-gtk3/wx/tipdlg.h:53:14: note: declared here
   53 |     wxString PreprocessTip(const wxString& tip) { return tip; }
      |              ^~~~~~~~~~~~~
Wx.c: In function ‘void XS_Wx__Variant_GetList(CV*)’:
Wx.c:20517:23: warning: ‘wxListBase::operator const wxList&() const’ is deprecated [-Wdeprecated-declarations]
20517 |     wxPli_objlist_push( aTHX_ lst );
      |     ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
In file included from ./cpp/helpers.h:17,
                 from cpp/wxapi.h:170,
                 from Wx.c:32:
/usr/include/wx-3.2-gtk3/wx/list.h:1208:8: note: declared here
 1208 | inline wxListBase::operator const wxList&() const { return *static_cast<const wxList*>(this); }
      |        ^~~~~~~~~~
GCC error code 0
-rw-r--r-- 1 root root 1331072 May 29 13:22 Wx.o
======================================================================

Could you somehow add the "-x c++" option?

Thank you.

Regards,

Robert.
Comment 3 Robert Wolf 2024-05-29 12:21:30 UTC
Created attachment 894598 [details, diff]
patch to force gcc compile .c files as c++

with this ebuild patch I can successfully compile Wx

Maybe this ebuild patch is not correct solution, but the error is probably caused by gcc compiling .c files as C code instead of C++. I am not sure if the gcc should be forced to compile .c files as C++ or the files should be renamed to .cpp or somehow else gcc should be informed about compiling these files as C++.

Thank you.

Regards,

Robert.
Comment 4 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-05-29 12:22:44 UTC
Can you please include the build.log and emerge --info? I'd like to know why this works for me.
Comment 5 Robert Wolf 2024-05-29 13:24:49 UTC
Created attachment 894602 [details]
emerge --info
Comment 6 Robert Wolf 2024-05-29 13:25:29 UTC
Created attachment 894603 [details]
build.log for failed compilation
Comment 7 Robert Wolf 2024-05-29 13:25:57 UTC
Created attachment 894604 [details]
build.log for .c compiled as c++
Comment 8 Robert Wolf 2024-05-29 13:27:46 UTC
Do you see any crucial difference?
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-15 01:31:41 UTC
*** Bug 932260 has been marked as a duplicate of this bug. ***
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-07-15 02:43:28 UTC
I wonder if it's a parallelism thing.

Could you perhaps:
1) give me both logs with MAKEOPTS="-j1"
2) try https://sources.debian.org/patches/libwx-perl/1:0.9932-8/0001-fix-incomplete-Wx_Exp.pm-due-to-missing-dependecy-in.patch/?
Comment 11 Robert Wolf 2024-07-31 08:09:20 UTC
Created attachment 898683 [details]
build.log for -j1
Comment 12 Robert Wolf 2024-07-31 08:09:41 UTC
Created attachment 898684 [details]
environment for -j1
Comment 13 Robert Wolf 2024-07-31 08:10:00 UTC
Created attachment 898685 [details]
emerge --info for -j1
Comment 14 Robert Wolf 2024-07-31 08:10:22 UTC
Created attachment 898686 [details]
build.log for -j1 and patch
Comment 15 Robert Wolf 2024-07-31 08:10:46 UTC
Created attachment 898687 [details]
environment for -j1 and patch
Comment 16 Robert Wolf 2024-07-31 08:11:03 UTC
Created attachment 898688 [details]
emerge --info for -j1 and patch
Comment 17 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-08-31 02:18:11 UTC
*** Bug 937547 has been marked as a duplicate of this bug. ***
Comment 18 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2024-09-05 04:33:32 UTC
parona, mind looking?
Comment 19 Larry the Git Cow gentoo-dev 2024-09-05 19:33:28 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=df72bb6d4a18a552c6ef7d989bf477e56bb1109f

commit df72bb6d4a18a552c6ef7d989bf477e56bb1109f
Author:     Alfred Wingate <parona@protonmail.com>
AuthorDate: 2024-09-05 16:50:59 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2024-09-05 19:32:48 +0000

    dev-perl/Wx: export CC as CXX due to xspp expectations
    
    Previous eclass change modified behavior to explicitly set CC. This
    broke expectiations for xspp as Wx was setting CC to CXX in a weak way.
    
    https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a650e223a09b0616a4e619c73cc033478fb7a61
    https://metacpan.org/release/MDOOTSON/Wx-0.9932/source/build/Wx/build/MakeMaker/Any_wx_config.pm#L27
    
    Closes: https://bugs.gentoo.org/931939
    Signed-off-by: Alfred Wingate <parona@protonmail.com>
    Signed-off-by: Sam James <sam@gentoo.org>

 dev-perl/Wx/Wx-0.993.200-r3.ebuild | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)