When building 1.1.0.6 on Arch Linux, the build fails with:
globalreplacedialog.cpp: In member function 'void GlobalReplaceDialog::OnOk(wxCommandEvent&)':
globalreplacedialog.cpp:116: error: 'auto_ptr' is not a member of 'std'
globalreplacedialog.cpp:116: error: expected primary-expression before '>' token
globalreplacedialog.cpp:119: error: 'wr' was not declared in this scope
make[1]: *** [globalreplacedialog.o] Error 1
make[1]: Leaving directory `/tmp/yaourt-tmp-igor/aur-xmlcopyeditor/xmlcopyeditor/src/xmlcopyeditor-1.1.0.6/src'
make: *** [all-recursive] Error 1
This has been reproduced by a second Arch user. Arch typically uses newer libraries than most Linux distributions. E.g., currently using
libxslt 1.1.23
wxgtk 2.8.7
gcc 4.3.0
Please let us know if there are any suggested workarounds, tests we could help perform, etc.
Logged In: YES
user_id=1298822
Originator: NO
Hi David, this is very odd: std::auto_ptr has been around for a very long time and it's not likely to have been disabled since then. (boost::shared_ptr is more likely to be an issue as it may or may not be integrated with C++0x.
Looking at the source I see the following:
112 if ( regex )
113 {
114 try
115 {
116 std::auto_ptr<WrapRegex> wr ( new WrapRegex (
117 findUtf8,
118 matchCase,
119 replaceUtf8 ) );
120 }
121 catch ( std::exception& e )
122 {
123 std::string pcreError ( e.what() );
124 wxString widePcreError =
125 wxString ( pcreError.c_str(), wxConvUTF8, pcreError.size() );
126 wxMessageBox (
127 _ ( "Cannot compile regular expression '" ) +
128 findCtrl->GetValue() +
129 _T ( "': " ) +
130 widePcreError,
131 _ ( "Global Find and Replace" ) );
132 return;
133 }
134 }
Line 116 looks fine to me and has compiled unchanged for quite some time. Is there any info on the std::auto_ptr template and how it has been affected by recent compiler updates?
Will try to re-build on my Ubuntu 8.04 laptop ASAP.
Best,
Gerald
Logged In: YES
user_id=1565020
Originator: YES
I'm just googling for things that I don't understand here, but these pages suggest to me that gcc 4.3 has changed the way includes are handled in the standard library, with more explicit inclusion required in order to reduce post-preprocessor bloat. The error messages are the same as we observed. For what it's worth, here are the links.
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=474872
http://osdir.com/ml/linux.debian.devel.games.devel/2007-04/msg00007.html
Logged In: YES
user_id=1298822
Originator: NO
This is a gcc 4.3.0 problem. The workaround is to add the #include directives gcc now requires (but didn't require before).
In globalreplacedialog.h, add the line
#include <memory>
In stringset.h, add the line
#include <string.h>
These errors will disappear when Ubuntu upgrades gcc and I can reproduce the problem on my laptop.
Logged In: YES
user_id=141198
Originator: NO
I slogged through and got it to compile on Gentoo with gcc 4.3.
Here is a link to the patch I wrote:
http://bugs.gentoo.org/attachment.cgi?id=159529
Logged In: YES
user_id=141198
Originator: NO
N.B. That patch applies for 1.1.0.6 and 1.1.0.7
Logged In: YES
user_id=2136254
Originator: NO
Hi Gerald, Ian and company:
As Ian has said, this bug is present in testing branch of gentoo[1] which uses gcc-4.3. If
I'm not wrong, it could be related to "Header dependency cleanup" documented in
http://gcc.gnu.org/gcc-4.3/porting_to.html.
I tested it in a Gentoo environment with gcc-4.3 and it compiles just fine with the patch provided
by Ian. Since the patch is not very intrusive and seems inoffensive, I'm applying it in Gentoo
to allow users of testing to compile the application.
Gerald, contact with me if you need more testing or even a account in one of our developers machine
and I will see can we do to don't have to wait for ubuntu :)
Thanks!
[1] https://bugs.gentoo.org/show_bug.cgi?id=230731
Arch Linux includes patch for gcc 4.3
Logged In: YES
user_id=1565020
Originator: YES
I created a patch based on Gerald's two suggested includes (memory and string.h) that fixes the compile-time errors with gcc 4.3 on Arch Linux. I think it is probably functionally equivalent to the Gentoo patch, although there are differences in the details. I'm going to go ahead and post the Arch Linux package for xmlcopyeditor 1.1.0.7 using this patch.
File Added: includesforgcc43.patch
Logged In: YES
user_id=1298822
Originator: NO
OK I have patched this using Ian's patch (thank you very much!) so hopefully it will compile ok in the future.
Best,
Gerald
Logged In: YES
user_id=1565020
Originator: YES
On Arch Linux, 1.2.0 builds without errors, so downstream patching for gcc 4.3.0 is no longer needed. Thanks.