Watch, Follow, &
Connect with Us

Welcome, Guest
Guest Settings
Help

Thread: C++ Seattle won't link win32 applications


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 5 - Last Post: May 17, 2017 10:56 AM Last Post By: Remy Lebeau (Te... Threads: [ Previous | Next ]
Barry Andrews

Posts: 71
Registered: 9/19/03
C++ Seattle won't link win32 applications  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 25, 2015 5:14 AM
I am running c++ seattle under windows 10 64 bit and it won't link windows 32 applications.
Even just the most basic VCL form compiles but won't link.
Multidevice application also fails to link windows 32 application.
This was all working under windows 8.1 64 bit
C++ builder XE7 on same notebook works correctly for both win32 and win64 applications.

Below is the error I get when trying to compile just a bulk basic VCL application with one form and no code written.
This compiles and runs fine as a windows 64 application.

I unistalled c++ Seattle and installed c++ Seattle Update 1, same result.

Checking project dependencies...
Compiling Project1.cbproj (Debug, Win32)
brcc32 command line for "Project1.vrc"
c:\program files (x86)\embarcadero\studio\17.0\bin\cgrc.exe -c65001 Project1.vrc -foProject1.res
ilink32 command line
c:\program files (x86)\embarcadero\studio\17.0\bin\ilink32.exe -G8 -L.\Win32\Debug;"c:\program files (x86)\embarcadero\studio\17.0\lib\Win32\debug";
"c:\program files (x86)\embarcadero\studio\17.0\lib\win32\release";"c:\program files (x86)\embarcadero\studio\17.0\lib\win32\release\psdk";
C:\Users\Public\Documents\Embarcadero\Studio\17.0\DCP -j.\Win32\Debug;"c:\program files (x86)\embarcadero\studio\17.0\lib\Win32\debug";"c:\program
files (x86)\embarcadero\studio\17.0\lib\win32\release";"c:\program files (x86)\embarcadero\studio\17.0\lib\win32\release\psdk";
C:\Users\Public\Documents\Embarcadero\Studio\17.0\DCP -l.\Win32\Debug -v
-GA"C:\Users\Barry\AppData\Local\Temp\vfsC6D3.tmp"="C:\Users\Barry\Documents\Embarcadero\Studio\Projects\Unit1.dfm" -aa -V5.0 -Tpe c0w32w rtl.bpi
vcl.bpi memmgr.lib sysinit.obj .\Win32\Debug\Project1.obj .\Win32\Debug\Unit1.obj , .\Win32\Debug\Project1.exe , .\Win32\Debug\Project1.map ,
import32.lib cp32mti.lib , , Project1.res
[ilink32 Warning] Warning: C:/Users/Barry/Documents/Embarcadero/Studio/Projects/Win32/Debug/Project1.ilc: 0x00010000 / 0x08000000
[ilink32 Warning] Warning: C:/Users/Barry/Documents/Embarcadero/Studio/Projects/Win32/Debug/Project1.ild: 0x00010000 / 0x08000000
[ilink32 Warning] Warning: C:/Users/Barry/Documents/Embarcadero/Studio/Projects/Win32/Debug/Project1.ilf: 0x00010000 / 0x0a000000
[ilink32 Warning] Warning: C:/Users/Barry/Documents/Embarcadero/Studio/Projects/Win32/Debug/Project1.ils: 0x00040000 / 0x08000000
[ilink32 Warning] Warning: unknown heap name : 0x08000000 / 0x08000000
[ilink32 Warning] Warning: Error detected (LME288)
[ilink32 Warning] Warning: Unable to perform incremental link - performing full link...
[ilink32 Warning] Warning: C:/Users/Barry/Documents/Embarcadero/Studio/Projects/Win32/Debug/Project1.ilc: 0x00010000 / 0x08000000
[ilink32 Warning] Warning: C:/Users/Barry/Documents/Embarcadero/Studio/Projects/Win32/Debug/Project1.ild: 0x00010000 / 0x08000000
[ilink32 Warning] Warning: C:/Users/Barry/Documents/Embarcadero/Studio/Projects/Win32/Debug/Project1.ilf: 0x00010000 / 0x0a000000
[ilink32 Warning] Warning: C:/Users/Barry/Documents/Embarcadero/Studio/Projects/Win32/Debug/Project1.ils: 0x00040000 / 0x08000000
[ilink32 Warning] Warning: unknown heap name : 0x08000000 / 0x08000000
[ilink32 Warning] Warning: C:/Users/Barry/Documents/Embarcadero/Studio/Projects/Win32/Debug/Project1.ilc: 0x00010000 / 0x08000000
[ilink32 Warning] Warning: C:/Users/Barry/Documents/Embarcadero/Studio/Projects/Win32/Debug/Project1.ild: 0x00010000 / 0x08000000
[ilink32 Warning] Warning: C:/Users/Barry/Documents/Embarcadero/Studio/Projects/Win32/Debug/Project1.ilf: 0x00010000 / 0x0a000000
[ilink32 Warning] Warning: C:/Users/Barry/Documents/Embarcadero/Studio/Projects/Win32/Debug/Project1.ils: 0x00040000 / 0x08000000
[ilink32 Warning] Warning: unknown heap name : 0x08000000 / 0x08000000
[ilink32 Warning] Warning: Error detected (LME288)
[ilink32 Error] Error: Unable to perform link
Failed
Elapsed time: 00:00:00.4
Barry Andrews

Posts: 71
Registered: 9/19/03
Re: C++ Seattle won't link win32 applications  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Dec 25, 2015 6:05 PM   in response to: Barry Andrews in response to: Barry Andrews
After some experimenting I found this linker error only occurs when the project compiler options "Use Classic Borland Compiler" is checked (Which it is by default).
So now doing some research as to why this should cause a linker failure?

This worked for 2 of my projects, multi platform target built under c++ seattle previously and brand new single form application built under c++ Seattle.

Other much more complicated VCL application converted from XE7 still doesn't link

[ilink32 Warning] Warning: C:/Users/Barry/Documents/RAD Studio/Projects 10/sk8calc/Win32/Debug/sk8calc.ilc: 0x00010000 / 0x08000000
[ilink32 Warning] Warning: C:/Users/Barry/Documents/RAD Studio/Projects 10/sk8calc/Win32/Debug/sk8calc.ild: 0x00010000 / 0x08000000
[ilink32 Warning] Warning: C:/Users/Barry/Documents/RAD Studio/Projects 10/sk8calc/Win32/Debug/sk8calc.ilf: 0x00010000 / 0x0a000000
[ilink32 Warning] Warning: C:/Users/Barry/Documents/RAD Studio/Projects 10/sk8calc/Win32/Debug/sk8calc.ils: 0x0003b000 / 0x08000000
[ilink32 Warning] Warning: unknown heap name : 0x08000000 / 0x08000000
[ilink32 Warning] Warning: Error detected (LME288)
[ilink32 Error] Error: Unable to perform link

Edited by: Barry Andrews on Dec 25, 2015 6:26 PM
John Borchers

Posts: 42
Registered: 9/23/10
Re: C++ Seattle won't link win32 applications  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 3, 2016 4:50 PM   in response to: Barry Andrews in response to: Barry Andrews
Barry Andrews wrote:
After some experimenting I found this linker error only occurs when the project compiler options "Use Classic Borland Compiler" is checked (Which it is by default).
So now doing some research as to why this should cause a linker failure?

This worked for 2 of my projects, multi platform target built under c++ seattle previously and brand new single form application built under c++ Seattle.

Other much more complicated VCL application converted from XE7 still doesn't link

[ilink32 Warning] Warning: C:/Users/Barry/Documents/RAD Studio/Projects 10/sk8calc/Win32/Debug/sk8calc.ilc: 0x00010000 / 0x08000000
[ilink32 Warning] Warning: C:/Users/Barry/Documents/RAD Studio/Projects 10/sk8calc/Win32/Debug/sk8calc.ild: 0x00010000 / 0x08000000
[ilink32 Warning] Warning: C:/Users/Barry/Documents/RAD Studio/Projects 10/sk8calc/Win32/Debug/sk8calc.ilf: 0x00010000 / 0x0a000000
[ilink32 Warning] Warning: C:/Users/Barry/Documents/RAD Studio/Projects 10/sk8calc/Win32/Debug/sk8calc.ils: 0x0003b000 / 0x08000000
[ilink32 Warning] Warning: unknown heap name : 0x08000000 / 0x08000000
[ilink32 Warning] Warning: Error detected (LME288)
[ilink32 Error] Error: Unable to perform link

Edited by: Barry Andrews on Dec 25, 2015 6:26 PM

Hi Barry,

I've had this happen before too. I'm not sure the root cause but for me anyway I found not opening the project from the Windows explorer made a difference. When I instead started the IDE and then opened the project I didn't get this error. It would be interesting if this also works for you. Although I haven't seen this behavior yet in Seattle I did see it in XE8.

John
Barry Andrews

Posts: 71
Registered: 9/19/03
Re: C++ Seattle won't link win32 applications  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 3, 2016 6:09 PM   in response to: John Borchers in response to: John Borchers
Hello John

Thanks for the feedback.
I have never just opened a project from the file explorer, always gone through the IDE.
So I have the error even opening the project in the IDE (As that's the way I always do it).

I have googled the linker error which many say is a result of just copying a project into the new IDE folders and this often causes the issue.
However I have rebuilt the project from scratch and included the files so that the project file is a clean slate for the new IDE, still the same issue.

It is most frustrating that you cannot simply change from one version of C++ Builder to the next without massive amounts of time trying to solve issues between the versions.
Almost getting to the tipping point where I need to look at an alternative as the new versions come out very quickly but I am very afraid to move forward to the new release as it usually means my code won't work anymore.

Regards
Barry
Wiktor Wandacho...

Posts: 2
Registered: 12/18/14
Re: C++ Seattle won't link win32 applications  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 17, 2017 7:05 AM   in response to: Barry Andrews in response to: Barry Andrews
Barry Andrews wrote:
I am running c++ seattle under windows 10 64 bit and it won't link windows 32 applications.
Even just the most basic VCL form compiles but won't link.
Multidevice application also fails to link windows 32 application.
This was all working under windows 8.1 64 bit
C++ builder XE7 on same notebook works correctly for both win32 and win64 applications.

[cut]

See this thread: https://forums.embarcadero.com/thread.jspa?messageID=886280
Solution below:

Adam Weles wrote:
Grzegorz Majcher wrote:
Borja Serrano wrote:
Have you tried to make ilink32 LARGEADDRESSAWARE? You can use this tool: http://cc.embarcadero.com/Item/30459

I tried it and it worked like magic!


LAMarker how to use? Plaease help me.


For RAD Studio 10.2 - as Administrator run in command prompt:

LAMarker.exe -M -F"C:\Program Files (x86)\Embarcadero\Studio\19.0\bin\ilink32.exe"

Works like a charm in Windows 10 64-bit :)
Remy Lebeau (Te...


Posts: 8,641
Registered: 12/23/01
Re: C++ Seattle won't link win32 applications  
Click to report abuse...   Click to reply to this thread Reply
  Posted: May 17, 2017 10:56 AM   in response to: Barry Andrews in response to: Barry Andrews
Barry Andrews wrote:
[ilink32 Warning] Warning: unknown heap name : 0x08000000 / 0x08000000

That is a LONG standing issue! It has been around for many years, with many reports in QC and QP.

Embarcadero FINALLY addressed the problem (but did not actually fix the root cause) in XE3 Update 1, by introducing a -GH switch in the linker so users can tweak the sizes of the various heaps that ilink32 uses.

https://forums.embarcadero.com/thread.jspa?threadID=150393#771819

I got some information on this from Embarcadero which may help.

"The error is an "out of memory", error. The reason for "Out Of Memory" errors (which come in different guises) in the linker, is that the linker has to pre-allocate memory in contiguous heaps that it then uses as it links, in the past these heaps could not be adjusted, we had to do a best guess, so in the new 64-bit linker (and has also been added to the 32-bit linker) we allowed people to be able adjust the size of these heaps manually when they needed to. Now the reason why these heaps can be problem is that not all systems are the same, some people use different software that map DLLs into the linker's address space like Windows Hook DLLs, antivirus software all these DLLs allocate memory INSIDE the linker's (any application really) address space and hence has an impact on the size of the heaps the linker can allocate. So we added this ability to adjust the heaps manually, but we also allocated the initial heaps quite big .

The 32bit linker has a new switch -GH, see below this is similar to the ilink64 switch.

The syntax for the switch is:

-GH<heap name>=<number of bytes for the heap> "

This option -GH exists from XE3 Update 1 onwards but evidently is not documented?

To see which heap is out of memory you can try from command line.

MSBuild /p:Platform=Win32 /v:diag XXXX.cbproj

This provides additional information such as:

Overrun on linker heap: code

Linker Heaps



info 0x002d0000 0x0a000000

code 0x000d0000 0x00100000

data 0x00030000 0x08000000

bss 0x08000000 0x08000000

Fatal: Out of memory

The left side of the above output is number of bytes being used at the moment and on the right the number of bytes allocated for the specific named heap.

The default heap sizes the linker allocates at start up are:

"system", default size 0x08000000
"info", default size 0x0A000000
"code", default size 0x08000000
"rodata", default size 0x06000000 //readonly data
"data", default size 0x08000000
"bss", default size 0x08000000
"tds", default size 0x0FA00000

When you see the "unknown heap" this is normally the "tds" heap

Example to adjust tds heap from 0x0FA00000 to 0x0A000000 you would do -GHtds=0x0A000000

Hopefully this information helps you and others with the LME288 error.

In 10.2 Tokyo, ilink32 is now marked as LargeAddress-Aware, and the heap sizes can be specified in the Project Options:

What's New in C++Builder 10.2: Part 1 - The Linker
https://community.embarcadero.com/blogs/entry/what-s-new-in-c-builder-10-2-part-1-the-linker

--
Remy Lebeau (TeamB)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02