Menu

#41 Problem compiling wx widgets 2.9.0

open
nobody
5
2010-07-02
2010-07-02
Anonymous
No

First of all my system is windows xp sp3 32 bit running on a Pentium 4, Prescott with 4GB RAM. I tried to compile wx widgets 2.9.0 and I run on some issues. First of all I had to make a copy of i686-w64-mingw32-windres.exe to windres.exe. the same for ar and set the compilers.

Ooops First : windress is expecting gcc.exe and not i686-w64-mingw32-gcc.exe
Oops Second : I used the mingw make from mingw project.

Oops third in the linking phase, after consuming 2.5GB of memory

"monodll_textdlgg.o gcc_mswudll\monodll_tipwin.o gcc_mswudll\monodll_toolbkg.o gc
c_mswudll\monodll_treectlg.o gcc_mswudll\monodll_treebkg.o gcc_mswudll\monodll_v
lbox.o gcc_mswudll\monodll_vscroll.o gcc_mswudll\monodll_animatecmn.o gcc_mswudl
l\monodll_bmpcboxcmn.o gcc_mswudll\monodll_calctrlcmn.o gcc_mswudll\monodll_data
vcmn.o gcc_mswudll\monodll_hyperlnkcmn.o gcc_mswudll\monodll_aboutdlgg.o gcc_msw
udll\monodll_bmpcboxg.o gcc_mswudll\monodll_calctrlg.o gcc_mswudll\monodll_datav
gen.o gcc_mswudll\monodll_datectlg.o gcc_mswudll\monodll_editlbox.o gcc_mswudll\ monodll_grid.o gcc_mswudll\monodll_gridctrl.o gcc_mswudll\monodll_grideditors.o
gcc_mswudll\monodll_gridsel.o gcc_mswudll\monodll_helpext.o gcc_mswudll\monodll_
hyperlinkg.o gcc_mswudll\monodll_laywin.o gcc_mswudll\monodll_notifmsgg.o gcc_ms
wudll\monodll_odcombo.o gcc_mswudll\monodll_propdlg.o gcc_mswudll\monodll_sashwi
n.o gcc_mswudll\monodll_splash.o gcc_mswudll\monodll_tipdlg.o gcc_mswudll\monodl
l_wizard.o gcc_mswudll\monodll_taskbarcmn.o gcc_mswudll\monodll_aboutdlg.o gcc_m
swudll\monodll_notifmsg.o gcc_mswudll\monodll_sound.o gcc_mswudll\monodll_taskba
r.o gcc_mswudll\monodll_joystick.o gcc_mswudll\monodll_animateg.o gcc_mswudll\mo
nodll_bmpcbox.o gcc_mswudll\monodll_calctrl.o gcc_mswudll\monodll_datecontrols.o
gcc_mswudll\monodll_datectrl.o gcc_mswudll\monodll_mediactrlcmn.o gcc_mswudll\m
onodll_mediactrl_am.o gcc_mswudll\monodll_mediactrl_wmp10.o gcc_mswudll\monodll_
mediactrl_qt.o gcc_mswudll\monodll_helpbest.o gcc_mswudll\monodll_helpctrl.o gcc
_mswudll\monodll_helpdata.o gcc_mswudll\monodll_helpdlg.o gcc_mswudll\monodll_he
lpfrm.o gcc_mswudll\monodll_helpwnd.o gcc_mswudll\monodll_htmlcell.o gcc_mswudll
\monodll_htmlfilt.o gcc_mswudll\monodll_htmlpars.o gcc_mswudll\monodll_htmltag.o
gcc_mswudll\monodll_htmlwin.o gcc_mswudll\monodll_htmprint.o gcc_mswudll\monodl
l_m_dflist.o gcc_mswudll\monodll_m_fonts.o gcc_mswudll\monodll_m_hline.o gcc_msw
udll\monodll_m_image.o gcc_mswudll\monodll_m_layout.o gcc_mswudll\monodll_m_link
s.o gcc_mswudll\monodll_m_list.o gcc_mswudll\monodll_m_pre.o gcc_mswudll\monodll
_m_style.o gcc_mswudll\monodll_m_tables.o gcc_mswudll\monodll_winpars.o gcc_mswu
dll\monodll_htmllbox.o gcc_mswudll\monodll_debugrpt.o gcc_mswudll\monodll_dbgrpt
g.o gcc_mswudll\monodll_xh_animatctrl.o gcc_mswudll\monodll_xh_bmp.o gcc_mswudll
\monodll_xh_bmpcbox.o gcc_mswudll\monodll_xh_bmpbt.o gcc_mswudll\monodll_xh_bttn
.o gcc_mswudll\monodll_xh_cald.o gcc_mswudll\monodll_xh_chckb.o gcc_mswudll\mono
dll_xh_chckl.o gcc_mswudll\monodll_xh_choic.o gcc_mswudll\monodll_xh_choicbk.o g
cc_mswudll\monodll_xh_clrpicker.o gcc_mswudll\monodll_xh_collpane.o gcc_mswudll\ monodll_xh_combo.o gcc_mswudll\monodll_xh_comboctrl.o gcc_mswudll\monodll_xh_dat
ectrl.o gcc_mswudll\monodll_xh_dirpicker.o gcc_mswudll\monodll_xh_dlg.o gcc_mswu
dll\monodll_xh_frame.o gcc_mswudll\monodll_xh_mdi.o gcc_mswudll\monodll_xh_filep
icker.o gcc_mswudll\monodll_xh_fontpicker.o gcc_mswudll\monodll_xh_gauge.o gcc_m
swudll\monodll_xh_gdctl.o gcc_mswudll\monodll_xh_grid.o gcc_mswudll\monodll_xh_h
tml.o gcc_mswudll\monodll_xh_hyperlink.o gcc_mswudll\monodll_xh_listb.o gcc_mswu
dll\monodll_xh_listbk.o gcc_mswudll\monodll_xh_listc.o gcc_mswudll\monodll_xh_me
nu.o gcc_mswudll\monodll_xh_notbk.o gcc_mswudll\monodll_xh_odcombo.o gcc_mswudll
\monodll_xh_panel.o gcc_mswudll\monodll_xh_propdlg.o gcc_mswudll\monodll_xh_radb
t.o gcc_mswudll\monodll_xh_radbx.o gcc_mswudll\monodll_xh_scrol.o gcc_mswudll\mo
nodll_xh_scwin.o gcc_mswudll\monodll_xh_htmllbox.o gcc_mswudll\monodll_xh_sizer.
o gcc_mswudll\monodll_xh_slidr.o gcc_mswudll\monodll_xh_spin.o gcc_mswudll\monod
ll_xh_split.o gcc_mswudll\monodll_xh_srchctrl.o gcc_mswudll\monodll_xh_statbar.o
gcc_mswudll\monodll_xh_stbmp.o gcc_mswudll\monodll_xh_stbox.o gcc_mswudll\monod
ll_xh_stlin.o gcc_mswudll\monodll_xh_sttxt.o gcc_mswudll\monodll_xh_text.o gcc_m
swudll\monodll_xh_tglbtn.o gcc_mswudll\monodll_xh_toolb.o gcc_mswudll\monodll_xh
_tree.o gcc_mswudll\monodll_xh_treebk.o gcc_mswudll\monodll_xh_unkwn.o gcc_mswud
ll\monodll_xh_wizrd.o gcc_mswudll\monodll_xmlres.o gcc_mswudll\monodll_xmladv.o
gcc_mswudll\monodll_xmlrsall.o gcc_mswudll\monodll_framemanager.o gcc_mswudll\mo
nodll_dockart.o gcc_mswudll\monodll_floatpane.o gcc_mswudll\monodll_auibook.o gc
c_mswudll\monodll_auibar.o gcc_mswudll\monodll_tabmdi.o gcc_mswudll\monodll_advp
rops.o gcc_mswudll\monodll_editors.o gcc_mswudll\monodll_manager.o gcc_mswudll\m
onodll_property.o gcc_mswudll\monodll_propgrid.o gcc_mswudll\monodll_propgridifa
ce.o gcc_mswudll\monodll_propgridpagestate.o gcc_mswudll\monodll_props.o gcc_msw
udll\monodll_richtextctrl.o gcc_mswudll\monodll_richtextbuffer.o gcc_mswudll\mon
odll_richtextstyles.o gcc_mswudll\monodll_richtextxml.o gcc_mswudll\monodll_rich
texthtml.o gcc_mswudll\monodll_richtextformatdlg.o gcc_mswudll\monodll_richtexts
ymboldlg.o gcc_mswudll\monodll_richtextstyledlg.o gcc_mswudll\monodll_richtextpr
int.o gcc_mswudll\monodll_stc.o gcc_mswudll\monodll_PlatWX.o gcc_mswudll\monodll
_ScintillaWX.o gcc_mswudll\monodll_xml.o gcc_mswudll\monodll_xtixml.o gcc_mswudl
l\monodll_version_rc.o -mthreads -L..\..\lib\gcc_dll -Wl,--out-implib=..\..\li
b\gcc_dll\libwxmsw29u.a -lwxtiff -lwxjpeg -lwxpng -lwxzlib -lwxregexu -lwxexp
at -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lwinspool -lwinmm -lshell32 -lcomc
tl32 -lole32 -loleaut32 -luuid -lrpcrt4 -ladvapi32 -lwsock32 -lwininet ..\..
\lib\gcc_dll\libwxscintilla.a
c:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.5.1/../../../../i686-w64-mingw32/bi
n/ld.exe: BFD (GNU Binutils) 2.20.51.20100618 internal error, aborting at ../../
../../build/binutils/src/bfd/coffcode.h line 1817 in coff_set_alignment_hook

c:/mingw32/bin/../lib/gcc/i686-w64-mingw32/4.5.1/../../../../i686-w64-mingw32/bi
n/ld.exe: Please report this bug.

collect2: ld returned 1 exit status
mingw32-make: *** [..\..\lib\gcc_dll\wxmsw290u_gcc_custom.dll] Error 1

C:\winpackages\opensource\Developer\MINGW\source_paks\wxWidgets-2.9.0\build\msw>"

I used mingw-w32-1.0-bin_i686-mingw_20100618.zip
and
wxMSW-2.9.0-Setup.exe

Vasileios Anagnostopoulos

Discussion

  • FITHIS

    FITHIS - 2010-07-02

    Just a small update :
    I used in build\msw

    Step 1
    mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release

    Step 2
    mingw32-make -f makefile.gcc MONOLITHIC=1 SHARED=1 UNICODE=1 BUILD=release

     
  • Ozkan Sezer

    Ozkan Sezer - 2010-07-02

    Since you are using mingw-w32-1.0-bin_i686-mingw_20100618, and I do assume binutils in that package is from the CVS, I looked at coffcode.h r1.165 (May 11 2010) at the cvs, its line 1817 is:
    1814 section->used_by_bfd = bfd_zalloc (abfd, amt);
    1815 if (section->used_by_bfd == NULL)
    1816 /* FIXME: Return error. */
    1817 abort ();

    ... and abort is defined as _bfd_abort in libbfd.h who output that message.

    In short, bfd_zalloc() seems to failed allocating memory. IIRC (I may be wrong here), g++-4.5 is memory hungry, creating extra large object files, which may be the reason that you ran out of memory, but others here may have more to say on the matter.

     
  • FITHIS

    FITHIS - 2010-07-02

    I also believe that it is an out of memeory error hidden somewhere. But 2.5GB for linking are way too much. I tried with
    mingw-w32-bin-i686-20100605.7z from http://code.google.com/p/mingw-w64-dgn/ and the compiler crashed. (Segmentation fault).

     
  • Anonymous

    Anonymous - 2010-07-02

    If I may provide my experiences with this:
    There is also an out of memory error when building QtGuid4.dll with GCC 4.5+ with ld.exe. I worked around this by temporarily replacing the ld.exe (don't know if it's in /bin or somewhere deeper) by a 64-bit version. I do not know if this is relevant, but it let me continue compilation of QtGui4d.dll. The crash seemed to occur at the 2GB memory limit for 32-bit programs in Windows.
    I understand a x64 ld.exe might not be an option, and this problem should be solved and not worked around. I at least suggest to ensure ld.exe (or all of GCC+binutils) is compiled with --large-address-aware as an ld option, so that the limit is boosted a bit, and at least the 32-bit ld.exe won't error out of memory on x64 windows. Just my 2 cents. There's also a discussion here: http://comments.gmane.org/gmane.comp.gnu.mingw.devel/3728 pertaining to wxwidgets+GCC 4.5

     
  • Nobody/Anonymous

    I compiled without MONOLITHIC=1 and now after using 1.45GB at the linking phase it works with the steup I DESCRIBED. But I wouldn't try it on my laptop yet, it has only 768MB. I am still investigating. Thanks "rubenvb" for the link you provided. Is the issue closed? You decide.

     

Log in to post a comment.