duplicate section ... has a different size

1,887 views
Skip to first unread message

The Devils Jester

unread,
Oct 25, 2012, 12:14:18 AM10/25/12
to wx-u...@googlegroups.com
When I compile my application in Windows (recently) I am getting about 300 errors during compile that seem to be benign but I am not entirely sure.

They are all in the format: *** C:/Users/leto/Desktop/wxWidgets-2.9.4/lib/gcc_lib/libwxmsw29u_core.a(corelib_helpchm.o): duplicate section `.rdata$_ZTV20wxObjectEventFunctor[__ZTV20wxObjectEventFunctor]' has different size

It seems to be going through every single object in wxWidgets complaining about each of them having a different size.

I recompiled wxWidgets on a different install of Windows 7 (native) and recompiled it on a different Windows 7 install (virtual machine), with the same results.  (Recompiling my app entirely each time).  This does not happen on Linux or OS X

Does anyone know what is going on?  What can I do to fix these?

I am running wxWidgets 2.9.4 on Windows 7, 32 bit

Eric Jensen

unread,
Oct 25, 2012, 12:46:32 AM10/25/12
to The Devils Jester
Hello The,

Thursday, October 25, 2012, 6:14:18 AM, you wrote:

TDJ> When I compile my application in Windows (recently) I am getting about 300
TDJ> errors during compile that seem to be benign but I am not entirely sure.

TDJ> They are all in the format: ***
TDJ> C:/Users/leto/Desktop/wxWidgets-2.9.4/lib/gcc_lib/libwxmsw29u_core.a(corelib_helpchm.o):
TDJ> duplicate section
TDJ> `.rdata$_ZTV20wxObjectEventFunctor[__ZTV20wxObjectEventFunctor]' has
TDJ> different size

TDJ> It seems to be going through every single object in wxWidgets complaining
TDJ> about each of them having a different size.

TDJ> I recompiled wxWidgets on a different install of Windows 7 (native) and
TDJ> recompiled it on a different Windows 7 install (virtual machine), with the
TDJ> same results. (Recompiling my app entirely each time). This does not
TDJ> happen on Linux or OS X

TDJ> Does anyone know what is going on? What can I do to fix these?

TDJ> I am running wxWidgets 2.9.4 on Windows 7, 32 bit

Try rebuilding the wx libs too and make sure you use the same settings
as for your application.

If you're using wxDev-C++, this might be relevant:
http://forums.wxwidgets.org/viewtopic.php?p=147037#p147037

Eric


The Devils Jester

unread,
Oct 25, 2012, 12:50:12 AM10/25/12
to wx-u...@googlegroups.com
I did recompile wxWidgets already, multiple times on native and virtual installs.

I am not using wxDevC++ I am using MinGW bundled with DialogBlocks.  This has always worked in the past, without these errors.



Eric


--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to wx-users+u...@googlegroups.com
or visit http://groups.google.com/group/wx-users

Eric Jensen

unread,
Oct 25, 2012, 1:04:09 AM10/25/12
to The Devils Jester
Hello The,

Thursday, October 25, 2012, 6:50:12 AM, you wrote:

TDJ> I did recompile wxWidgets already, multiple times on native and virtual
TDJ> installs.

TDJ> I am not using wxDevC++ I am using MinGW bundled with DialogBlocks. This
TDJ> has always worked in the past, without these errors.
Usually i'd say that you're application either includes a different
setup.h than the one that was used building the libs, or you're
linking old libs from a previous build.

But when you already did this on clean machines, i have no
explanation, sorry.

Eric


Vadim Zeitlin

unread,
Oct 25, 2012, 6:42:30 AM10/25/12
to wx-u...@googlegroups.com
On Wed, 24 Oct 2012 21:14:18 -0700 The Devils Jester wrote:

TDJ> When I compile my application in Windows (recently) I am getting about 300
TDJ> errors during compile that seem to be benign but I am not entirely sure.
TDJ>
TDJ> They are all in the format: ***
TDJ> C:/Users/leto/Desktop/wxWidgets-2.9.4/lib/gcc_lib/libwxmsw29u_core.a(corelib_helpchm.o):
TDJ> duplicate section
TDJ> `.rdata$_ZTV20wxObjectEventFunctor[__ZTV20wxObjectEventFunctor]' has
TDJ> different size

This is definitely not benign. You do mix object files from different
library versions or compiled with different options and the only possible
result is going to be mysterious crashes during run-time.

TDJ> Does anyone know what is going on? What can I do to fix these?

Check include path for stray setup.h copies.

Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
http://www.tt-solutions.com/

The Devils Jester

unread,
Oct 25, 2012, 3:09:25 PM10/25/12
to wx-u...@googlegroups.com

Fresh copy of the OS (nothing but my dev environment) , only one copy of wxwidgets and both that and my app are compiled with the same settings with DialogBlocks controlling the setup.h creation as well as the settings for my app (all coming from the same source).  In both situations I cleaned and recompiled both wxwidgets and my app. 

I will try a few other things,  I should not that my app does compile and appears to function correctly.

The Devils Jester

unread,
Oct 25, 2012, 8:51:00 PM10/25/12
to wx-u...@googlegroups.com
I just installed a new version of the compiler, completely deleted wxWidgets from my computer, downloaded it fresh, and compiled it, recompiled my application, and I still get the same messages, 310 of them.

There is no conflicting version of wxWidgets and no build settings being different, on a freshly installed OS, with a freshly installed compiler, using a freshly downloaded wxWidgets 2.9.4 source.

As I said in my previous post, it does not appear  to have any ill effects on my application, but they wouldnt give 310 warning like this if there were not a reason for it.  

Does anyone have any other ideas to attempt to trace this?

Joshua Chen

unread,
Oct 14, 2014, 1:14:55 AM10/14/14
to wx-u...@googlegroups.com
Hi, I don't know whether you have solved this problem or not, but I meet exactly the same problem and figure out the reason and solution finally.
So I'd like to leave a comment to help someone meet this issue in the future.
It is causing by "different compiler optimize option" between building the static library and your wx application(linking against the static wx library).
Generally, if you build the static wx library with "-Os" compiling option and compile your wx program with "-O2", some classes like wxObjectEventFunctor in .rdata section of your object files might be in a size other than in the library sections.
To solve this issue, what you need to do is just use same compiler optimize option when you building wx library and compiling your wx program.
Reply all
Reply to author
Forward
0 new messages