[wxPython] out of memory link trouble under VC 6.0

Well, the last build problem was due to make clean only cleaning up
debug objects. Hmmm.

But now I have an out-of-memory problem at link time, though I've told
my MSDOS window to take as much memory as it can. I tried rebuilding
without USE_GLCANVAS, but no luck. Can't figure out how to get this
to build under cygwin, I suspect that does better with the memory.
Any thoughts?

This is Python 2.0, Windows 98, WXWindows and WXPython 2.2.5, VC 6.0:

nmake -f makefile.vc dll pch FINAL=hybrid >outfile

results in:

  nmake -f makefile.vc all FINAL=hybrid DLL=1 WXMAKINGDLL=1 NEW_WXLIBNAME=
  cd C:\PJH\CODING\WXW\src\png
  nmake -f makefile.vc FINAL=hybrid DLL=1 WXMAKINGDLL=1 CRTFLAG=/MD
  cd C:\PJH\CODING\WXW\src\msw
  cd C:\PJH\CODING\WXW\src\zlib
  nmake -f makefile.vc FINAL=hybrid DLL=1 WXMAKINGDLL=1 CRTFLAG=/MD
  cd C:\PJH\CODING\WXW\src\msw
  cd C:\PJH\CODING\WXW\src\xpm
  nmake -f makefile.vc FINAL=hybrid DLL=1 WXMAKINGDLL=1 CRTFLAG=/MD
  cd C:\PJH\CODING\WXW\src\msw
  cd C:\PJH\CODING\WXW\src\jpeg
  nmake -f makefile.vc FINAL=hybrid DLL=1 WXMAKINGDLL=1 CRTFLAG=/MD all
  cd C:\PJH\CODING\WXW\src\msw
  cd C:\PJH\CODING\WXW\src\tiff
  nmake -f makefile.vc FINAL=hybrid DLL=1 WXMAKINGDLL=1 CRTFLAG=/MD all
  cd C:\PJH\CODING\WXW\src\msw
  link @c:\windows\TEMP\nma42625.
Microsoft (R) Incremental Linker Version 6.00.8168
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

-debug:full -debugtype:cv -machine:i386 -subsystem:windows,3.50 -dll
-out:C:\PJH\CODING\WXW\lib\wx22_5h.dll
HybridDLL\dummydll.obj ..\common\HybridDLL\y_tab.obj ..\common\HybridDLL\appcmn.obj ..\common\HybridDLL\choiccmn.obj ..\common\HybridDLL\clipcmn.obj ..\common\HybridDLL\cmdline.obj ..\common\HybridDLL\cmndata.obj ..\common\HybridDLL\config.obj ..\common\HybridDLL\ctrlcmn.obj ..\common\HybridDLL\ctrlsub.obj ..\common\HybridDLL\datetime.obj ..\common\HybridDLL\datstrm.obj ..\common\HybridDLL\db.obj ..\common\HybridDLL\dbtable.obj ..\common\HybridDLL\dcbase.obj ..\common\HybridDLL\dlgcmn.obj ..\common\HybridDLL\dndcmn.obj ..\common\HybridDLL\dobjcmn.obj ..\common\HybridDLL\docmdi.obj ..\common\HybridDLL\docview.obj ..\common\HybridDLL\dynarray.obj ..\common\HybridDLL\dynlib.obj ..\common\HybridDLL\encconv.obj ..\common\HybridDLL\event.obj ..\common\HybridDLL\extended.obj ..\common\HybridDLL\ffile.obj ..\common\HybridDLL\file.obj ..\common\HybridDLL\fileconf.obj ..\common\HybridDLL\filefn.obj ..\common\HybridDLL\filesys.obj ..\common\HybridDLL\fontcmn.obj ..\common\HybridDLL\fon!
tmap.obj ..\common\HybridDLL\framecmn.obj ..\common\HybridDLL\fs_inet.obj ..\common\HybridDLL\fs_mem.obj ..\common\HybridDLL\fs_zip.obj ..\common\HybridDLL\ftp.obj ..\common\HybridDLL\gdicmn.obj ..\common\HybridDLL\geometry.obj ..\common\HybridDLL\gifdecod.obj ..\common\HybridDLL\hash.obj ..\common\HybridDLL\helpbase.obj ..\common\HybridDLL\http.obj ..\common\HybridDLL\imagall.obj ..\common\HybridDLL\imagbmp.obj ..\common\HybridDLL\image.obj ..\common\HybridDLL\imaggif.obj ..\common\HybridDLL\imagjpeg.obj ..\common\HybridDLL\imagpcx.obj ..\common\HybridDLL\imagpng.obj ..\common\HybridDLL\imagpnm.obj ..\common\HybridDLL\imagtiff.obj ..\common\HybridDLL\intl.obj ..\common\HybridDLL\ipcbase.obj ..\common\HybridDLL\layout.obj ..\common\HybridDLL\lboxcmn.obj ..\common\HybridDLL\list.obj ..\common\HybridDLL\log.obj ..\common\HybridDLL\longlong.obj ..\common\HybridDLL\memory.obj ..\common\HybridDLL\menucmn.obj ..\common\HybridDLL\mimecmn.obj ..\common\HybridDLL\module.obj ..\common!
\HybridDLL\mstream.obj ..\common\HybridDLL\object.obj ..\common\HybridDLL\objstrm.obj ..\common\HybridDLL\odbc.obj ..\common\HybridDLL\paper.obj ..\common\HybridDLL\prntbase.obj ..\common\HybridDLL\process.obj ..\common\HybridDLL\protocol.obj ..\common\HybridDLL\resource.obj ..\common\HybridDLL\sckaddr.obj ..\common\HybridDLL\sckfile.obj ..\common\HybridDLL\sckipc.obj ..\common\HybridDLL\sckstrm.obj ..\common\HybridDLL\serbase.obj ..\common\HybridDLL\sizer.obj ..\common\HybridDLL\socket.obj ..\common\HybridDLL\strconv.obj ..\common\HybridDLL\stream.obj ..\common\HybridDLL\string.obj ..\common\HybridDLL\tbarbase.obj ..\common\HybridDLL\textcmn.obj ..\common\HybridDLL\textfile.obj ..\common\HybridDLL\timercmn.obj ..\common\HybridDLL\tokenzr.obj ..\common\HybridDLL\txtstrm.obj ..\common\HybridDLL\unzip.obj ..\common\HybridDLL\url.obj ..\common\HybridDLL\utilscmn.obj ..\common\HybridDLL\valgen.obj ..\common\HybridDLL\validate.obj ..\common\HybridDLL\valtext.obj ..\common\HybridD!
LL\variant.obj ..\common\HybridDLL\wfstream.obj ..\common\HybridDLL\wincmn.obj ..\common\HybridDLL\wxchar.obj ..\common\HybridDLL\wxexpr.obj ..\common\HybridDLL\zipstrm.obj ..\common\HybridDLL\zstream.obj ..\generic\HybridDLL\busyinfo.obj ..\generic\HybridDLL\calctrl.obj ..\generic\HybridDLL\choicdgg.obj ..\generic\HybridDLL\dragimgg.obj ..\generic\HybridDLL\grid.obj ..\generic\HybridDLL\gridsel.obj ..\generic\HybridDLL\laywin.obj ..\generic\HybridDLL\logg.obj ..\generic\HybridDLL\numdlgg.obj ..\generic\HybridDLL\panelg.obj ..\generic\HybridDLL\plot.obj ..\generic\HybridDLL\progdlgg.obj ..\generic\HybridDLL\prop.obj ..\generic\HybridDLL\propform.obj ..\generic\HybridDLL\proplist.obj ..\generic\HybridDLL\sashwin.obj ..\generic\HybridDLL\scrolwin.obj ..\generic\HybridDLL\splitter.obj ..\generic\HybridDLL\statusbr.obj ..\generic\HybridDLL\tabg.obj ..\generic\HybridDLL\tbarsmpl.obj ..\generic\HybridDLL\textdlgg.obj ..\generic\HybridDLL\tipdlg.obj ..\generic\HybridDLL\treelay.obj!
..\generic\HybridDLL\wizard.obj ..\msw\HybridDLL\accel.obj ..\msw\HybridDLL\app.obj ..\msw\ole\HybridDLL\automtn.obj ..\msw\HybridDLL\bitmap.obj ..\msw\HybridDLL\bmpbuttn.obj ..\msw\HybridDLL\brush.obj ..\msw\HybridDLL\button.obj ..\msw\HybridDLL\caret.obj ..\msw\HybridDLL\checkbox.obj ..\msw\HybridDLL\checklst.obj ..\msw\HybridDLL\choice.obj ..\msw\HybridDLL\clipbrd.obj ..\msw\HybridDLL\colordlg.obj ..\msw\HybridDLL\colour.obj ..\msw\HybridDLL\combobox.obj ..\msw\HybridDLL\control.obj ..\msw\HybridDLL\curico.obj ..\msw\HybridDLL\cursor.obj ..\msw\HybridDLL\data.obj ..\msw\ole\HybridDLL\dataobj.obj ..\msw\HybridDLL\dc.obj ..\msw\HybridDLL\dcclient.obj ..\msw\HybridDLL\dcmemory.obj ..\msw\HybridDLL\dcprint.obj ..\msw\HybridDLL\dcscreen.obj ..\msw\HybridDLL\dde.obj ..\msw\HybridDLL\dialog.obj ..\msw\HybridDLL\dialup.obj ..\msw\HybridDLL\dib.obj ..\msw\HybridDLL\dibutils.obj ..\msw\HybridDLL\dir.obj ..\msw\HybridDLL\dirdlg.obj ..\msw\HybridDLL\dragimag.obj ..\msw\ole\HybridDLL!
\dropsrc.obj ..\msw\ole\HybridDLL\droptgt.obj ..\msw\HybridDLL\enhmeta.obj ..\msw\HybridDLL\filedlg.obj ..\msw\HybridDLL\font.obj ..\msw\HybridDLL\fontdlg.obj ..\msw\HybridDLL\fontenum.obj ..\msw\HybridDLL\fontutil.obj ..\msw\HybridDLL\frame.obj ..\msw\HybridDLL\gauge95.obj ..\msw\HybridDLL\gdiimage.obj ..\msw\HybridDLL\gdiobj.obj ..\msw\HybridDLL\glcanvas.obj ..\msw\HybridDLL\gsocket.obj ..\msw\HybridDLL\gsockmsw.obj ..\msw\HybridDLL\helpchm.obj ..\msw\HybridDLL\helpwin.obj ..\msw\HybridDLL\icon.obj ..\msw\HybridDLL\imaglist.obj ..\msw\HybridDLL\joystick.obj ..\msw\HybridDLL\listbox.obj ..\msw\HybridDLL\listctrl.obj ..\msw\HybridDLL\main.obj ..\msw\HybridDLL\mdi.obj ..\msw\HybridDLL\menu.obj ..\msw\HybridDLL\menuitem.obj ..\msw\HybridDLL\metafile.obj ..\msw\HybridDLL\mimetype.obj ..\msw\HybridDLL\minifram.obj ..\msw\HybridDLL\msgdlg.obj ..\msw\HybridDLL\nativdlg.obj ..\msw\HybridDLL\notebook.obj ..\msw\ole\HybridDLL\oleutils.obj ..\msw\HybridDLL\ownerdrw.obj ..\msw\HybridDL!
L\palette.obj ..\msw\HybridDLL\pen.obj ..\msw\HybridDLL\penwin.obj ..\msw\HybridDLL\printdlg.obj ..\msw\HybridDLL\printwin.obj ..\msw\HybridDLL\radiobox.obj ..\msw\HybridDLL\radiobut.obj ..\msw\HybridDLL\regconf.obj ..\msw\HybridDLL\region.obj ..\msw\HybridDLL\registry.obj ..\msw\HybridDLL\scrolbar.obj ..\msw\HybridDLL\settings.obj ..\msw\HybridDLL\slider95.obj ..\msw\HybridDLL\spinbutt.obj ..\msw\HybridDLL\spinctrl.obj ..\msw\HybridDLL\statbmp.obj ..\msw\HybridDLL\statbox.obj ..\msw\HybridDLL\statbr95.obj ..\msw\HybridDLL\statline.obj ..\msw\HybridDLL\stattext.obj ..\msw\HybridDLL\tabctrl.obj ..\msw\HybridDLL\taskbar.obj ..\msw\HybridDLL\tbar95.obj ..\msw\HybridDLL\textctrl.obj ..\msw\HybridDLL\thread.obj ..\msw\HybridDLL\timer.obj ..\msw\HybridDLL\tooltip.obj ..\msw\HybridDLL\treectrl.obj ..\msw\HybridDLL\utils.obj ..\msw\HybridDLL\utilsexc.obj ..\msw\ole\HybridDLL\uuid.obj ..\msw\HybridDLL\wave.obj ..\msw\HybridDLL\window.obj ..\msw\HybridDLL\xpmhand.obj ..\html\HybridDLL!
\helpctrl.obj ..\html\HybridDLL\helpdata.obj ..\html\HybridDLL\helpfrm.obj ..\html\HybridDLL\htmlcell.obj ..\html\HybridDLL\htmlfilt.obj ..\html\HybridDLL\htmlpars.obj ..\html\HybridDLL\htmltag.obj ..\html\HybridDLL\htmlwin.obj ..\html\HybridDLL\htmprint.obj ..\html\HybridDLL\m_dflist.obj ..\html\HybridDLL\m_fonts.obj ..\html\HybridDLL\m_hline.obj ..\html\HybridDLL\m_image.obj ..\html\HybridDLL\m_layout.obj ..\html\HybridDLL\m_links.obj ..\html\HybridDLL\m_list.obj ..\html\HybridDLL\m_meta.obj ..\html\HybridDLL\m_pre.obj ..\html\HybridDLL\m_tables.obj ..\html\HybridDLL\winpars.obj msvcrt.lib oldnames.lib kernel32.lib ws2_32.lib mswsock.lib advapi32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib shell32.lib comctl32.lib ctl3d32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib odbc32.lib advapi32.lib winmm.lib opengl32.lib glu32.lib C:\PJH\CODING\WXW\lib\pngh.lib C:\PJH\CODING\WXW\lib\zlibh.lib C:\PJH\CODING\WXW\lib\xpmh.lib C:\PJH\CODING\WXW\lib\jpegh.lib C:\PJH\CODING\WXW\!
lib\tiffh.lib
delayimp.lib
/delayload:ws2_32.dll /delayload:advapi32.dll /delayload:user32.dll /delayload:gdi32.dll
/delayload:comdlg32.dll /delayload:shell32.dll /delayload:comctl32.dll /delayload:ole32.dll
/delayload:oleaut32.dll /delayload:rpcrt4.dll
   Creating library C:\PJH\CODING\WXW\lib\wx22_5h.lib and object C:\PJH\CODING\WXW\lib\wx22_5h.exp
LINK : fatal error LNK1102: out of memory

Hello Patricia,

Wednesday, May 16, 2001, 1:27:17, you wrote:

[...]

   Creating library C:\PJH\CODING\WXW\lib\wx22_5h.lib and object C:\PJH\CODING\WXW\lib\wx22_5h.exp
LINK : fatal error LNK1102: out of memory

try to increase size of pagefile (swap)

···

--
regards,
Niki Spahiev

Hello Patricia,
Wednesday, May 16, 2001, 1:27:17, you wrote:

[...]
Creating library C:\PJH\CODING\WXW\lib\wx22_5h.lib and object C:\PJH\CODING\WXW\lib\wx22_5h.exp
LINK : fatal error LNK1102: out of memory

try to increase size of pagefile (swap)

This is DOS. It doesn't know about swap. Still, you'd think 267 meg
of memory would be ENOUGH.

> Creating library C:\PJH\CODING\WXW\lib\wx22_5h.lib and object

C:\PJH\CODING\WXW\lib\wx22_5h.exp

> LINK : fatal error LNK1102: out of memory

> try to increase size of pagefile (swap)

This is DOS. It doesn't know about swap. Still, you'd think 267 meg
of memory would be ENOUGH.

Not necessarily. If I remember correctly, win9x only uses something less
than 64M (was it 32? 40 seems to be what pops into my mind...) of RAM for
actual OS and program memory. Everything else is used only for disk cache.
Can anybody confirm this?

Anyway, not much we can do about the linker running out of memory except
give it more memory (which you may not be able to do without switching to NT
or win2k) or to change wxWin to link several smaller DLLs instead of one
large one, but that wont happen for 2.2.x and only has a slight chance for
2.3. It has been discussed a few times but everytime somebody tries it they
run into dependency problems.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

Creating library C:\PJH\CODING\WXW\lib\wx22_5h.lib and object
C:\PJH\CODING\WXW\lib\wx22_5h.exp
LINK : fatal error LNK1102: out of memory

try to increase size of pagefile (swap)

This is DOS. It doesn't know about swap. Still, you'd think 267 meg
of memory would be ENOUGH.

Not necessarily. If I remember correctly, win9x only uses something less
than 64M (was it 32? 40 seems to be what pops into my mind...) of RAM for
actual OS and program memory. Everything else is used only for disk cache.
Can anybody confirm this?

Judging from the mem /d display, it will only use conventional memory
for programs, which is 64M, but some of that gets used up by system
stuff. So say 50M.

Anyway, not much we can do about the linker running out of memory
except give it more memory (which you may not be able to do
without switching to NT or win2k) or to change wxWin to link
several smaller DLLs instead of one large one, but that wont
happen for 2.2.x and only has a slight chance for 2.3. It has
been discussed a few times but everytime somebody tries it they
run into dependency problems.

Well, thanks, anyway.

--Patricia

> Not necessarily. If I remember correctly, win9x only uses something

less

> than 64M (was it 32? 40 seems to be what pops into my mind...) of RAM

for

> actual OS and program memory. Everything else is used only for disk

cache.

> Can anybody confirm this?

Judging from the mem /d display, it will only use conventional memory
for programs, which is 64M, but some of that gets used up by system
stuff. So say 50M.

IIRC, that just shows the types and amounts of memory available to DOS apps,
and the conventional memory figure you're looking at is actually 640K. The
MS command line tools are probably using the varioius DOS tricks (XMS, DPMI,
etc.) to get at all that other memory, but IIRC there is a limit that win9x
will assign to DOS sessions and it is going to be *a lot* smaller than your
256M.

> Anyway, not much we can do about the linker running out of memory
> except give it more memory (which you may not be able to do
> without switching to NT or win2k) or to change wxWin to link
> several smaller DLLs instead of one large one, but that wont
> happen for 2.2.x and only has a slight chance for 2.3. It has
> been discussed a few times but everytime somebody tries it they
> run into dependency problems.

Well, thanks, anyway.

Since win32 apps get an address space that's laid out differently then I
suppose another option for you is to build the wx DLL with the VC++ IDE and
the project file supplied with wxWindows. I don't know if all the flags and
output names are the same as the ones used by the makefiles, but there was
some effort a while back to bring them into alignment so there may not be
that much tweaking you have to do.

Good luck.

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

2.2.x and only has a slight chance for 2.3. It has been discussed
a few times but everytime somebody tries it they run into
dependency problems.

Not really -- when *I* tried, I didn't run into dependency problems
but instead quickly realized it is a big, complicated and
excessively *boring* task. I realized at certain point that the best
thing to do will be to trash the build system in its entirety and
start from scratch, which was followed by a trivial observation that
I don't have enough time for *that*...

VS

> 2.2.x and only has a slight chance for 2.3. It has been discussed
> a few times but everytime somebody tries it they run into
> dependency problems.

Not really -- when *I* tried, I didn't run into dependency problems
but instead quickly realized it is a big, complicated and
excessively *boring* task. I realized at certain point that the best
thing to do will be to trash the build system in its entirety and
start from scratch, which was followed by a trivial observation that
I don't have enough time for *that*...

It's still a dependency issue. It depends on *time* and *interest* <wink>

···

--
Robin Dunn
Software Craftsman
robin@AllDunn.com Java give you jitters?
http://wxPython.org Relax with wxPython!

Thursday, May 17, 2001, 6:13:52 AM, Robin wrote:

[...]

Since win32 apps get an address space that's laid out differently then I
suppose another option for you is to build the wx DLL with the VC++ IDE and
the project file supplied with wxWindows. I don't know if all the flags and
output names are the same as the ones used by the makefiles, but there was
some effort a while back to bring them into alignment so there may not be
that much tweaking you have to do.

IIRC VC 6.0 has no dos executables. LINK is win32 console executable
and uses virtual memory.

···

--
regards,
Niki Spahiev

IIRC VC 6.0 has no dos executables. LINK is win32 console executable
and uses virtual memory.

Hey, wait a minute, since it's link that's failing, I can probably
just do link from VC instead of DOS, using the objects that I've
already built with the makefile in DOS. Thank you, thank you.

(I bet VC makes me BLEED to get that done, though.)

--Patricia