Forum > General

Undefined symbol: XMM_::=::\_XGETMEM$LONGWORD::=::\POINTER

(1/3) > >>

Fibonacci:

--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---app.lpr(43,1) Error: Undefined symbol: XMM_::=::\_XGETMEM$LONGWORD::=::\POINTERapp.lpr(43,1) Error: Undefined symbol: XMM_::=::\_XFREEMEM$POINTER::=::\LONGWORDapp.lpr(43,1) Error: Undefined symbol: XMM_::=::\_XREALLOCMEM$POINTER$LONGWORD::=::\POINTERapp.lpr(43,1) Error: Undefined symbol: XMM_::=::\_XMEMSIZE$POINTER::=::\LONGWORDapp.lpr(43,1) Verbose: There were 4 errors compiling module, stoppingVerbose: Compilation aborted
This doesn't just happen occasionally; its on EVERY subsequent compilation. Clean builds are ok, but otherwise its 100% reproducible.

Here's the setup:

XMM is a unit, and its in the "uses" in the implementation section of "system.pas". In "system.pas" there are functions like "GetMem" that use XMM functions; for example "GetMem" calls "xgetmem".

I have no idea how to fix this. One option might be to not use "uses" and put everything in "system.pas" (perhaps as included files), but having it in "uses" is more convenient if update of XMM unit is required.

If that makes any difference, XMM is a memory manager I made; its used elsewhere, but in this case, its for a custom RTL. The original system.pas/pp doesn't use "uses" at all, maybe it cant, or shouldn't? But it does compile and run fine, just not reusable. Only clean builds work.

EDIT: FPC 3.2.2

Fibonacci:
Found out something.

I have this structure:


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---  PMemoryManager_test = ^TMemoryManager_test;  TMemoryManager_test = record    NeedLock:         boolean; // obsolete    GetMem:           function(size: ptruint): pointer;    FreeMem:          function(p: pointer): ptruint;    FreeMemSize:      function(p: pointer; size: ptruint): ptruint;    AllocMem:         function(size: ptruint): pointer;    ReAllocMem:       function(var p: pointer; size: ptruint): pointer;    MemSize:          function(p: pointer): ptruint;    InitThread:       procedure;    DoneThread:       procedure;    RelocateHeap:     procedure;    GetHeapStatus:    function: THeapStatus;    GetFPCHeapStatus: function: TFPCHeapStatus;  end;
Below is


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---var  MemoryManager_test: TMemoryManager_test;
And get this. If I comment this out, subsequent compiles works fine, no symbol errors, no problems.

This variable isnt used AT ALL nowhere. If this is NOT commented out, the errors with symbols happen. I checked xmm.o and there are symbols:


--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Offset  Size    Type    String1a5c    39      A       .text.n_xmm_$$__xgetmemchunk$longword$$memorymanager_test1a96    33      A       .text.n_xmm_$$_xgetmem$longword$$memorymanager_test1ee7    2b      A       XMM_$$_XGETMEM$LONGWORD$$MEMORYMANAGER_TEST230b    39      A       .text.n_xmm_$$__xgetmemchunk$longword$$memorymanager_test2345    33      A       .text.n_xmm_$$_xgetmem$longword$$memorymanager_test
It somehow attaches XMM rountines to this variable, what..?

Not used variable gets commented out, and xmm.o has these symbols:


--- Code: Text  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Offset  Size    Type    String1a5c    2e      A       .text.n_xmm_$$__xgetmemchunk$longword$$pointer1a8b    28      A       .text.n_xmm_$$_xgetmem$longword$$pointer1e0b    20      A       XMM_$$_XGETMEM$LONGWORD$$POINTER2169    2e      A       .text.n_xmm_$$__xgetmemchunk$longword$$pointer2198    28      A       .text.n_xmm_$$_xgetmem$longword$$pointer

paule32:
This is not a FPC problem.
This maybe that your compiler proxy application does not regex work.

My suggestion would be, to look into the sources, and search for similar names
- also generate assembly, and check

FPC don't work with :: or \_ \Pointer  ...

This are syntax Errors by parsing.
I don't know which state it is - assembly or linking.
But I would guess its assembly.

Because the strings looks like, if you have tried to use escaped strings...
a look over on the fly:

\P is definitive not escaped string char.

But \_ could be.

And ::=:: are definitive not ISO US ASCII 7-Bit name conventions for linker symbols.

Fibonacci:

--- Quote from: paule32 on October 28, 2024, 04:36:36 pm ---This is not a FPC problem.
This maybe that your compiler proxy application does not regex work.

My suggestion would be, to look into the sources, and search for similar names
- also generate assembly, and check

FPC don't work with :: or \_ \Pointer  ...

This are syntax Errors by parsing.
I don't know which state it is - assembly or linking.
But I would guess its assembly.

Because the strings looks like, if you have tried to use escaped strings...
a look over on the fly:

\P is definitive not escaped string char.

But \_ could be.

And ::=:: are definitive not ISO US ASCII 7-Bit name conventions for linker symbols.

--- End quote ---

Unfortunately you are not right. I changed Project Options to not use proxy, I used the compiler directly. Same thing. Proxy only makes the IDE work properly: finding fpc.cfg, listing custom options etc.

Here is the output if I compile using console.


--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---(9015) Linking D:\<cut>\project0\app.exeD:\<cut>\project0\app.lpr(43,1) Error: Undefined symbol: XMM_D:=D:\<cut>\project0_XGETMEM$LONGWORDD:=D:\<cut>\project0POINTERD:\<cut>\project0\app.lpr(43,1) Error: Undefined symbol: XMM_D:=D:\<cut>\project0_XFREEMEM$POINTERD:=D:\<cut>\project0LONGWORDD:\<cut>\project0\app.lpr(43,1) Error: Undefined symbol: XMM_D:=D:\<cut>\project0_XREALLOCMEM$POINTER$LONGWORDD:=D:\<cut>\project0POINTERD:\<cut>\project0\app.lpr(43,1) Error: Undefined symbol: XMM_D:=D:\<cut>\project0_XMEMSIZE$POINTERD:=D:\<cut>\project0LONGWORDD:\<cut>\project0\app.lpr(43,1) Fatal: (10026) There were 4 errors compiling module, stoppingFatal: (1018) Compilation aborted

paule32:
is that your Compiler implementation ?
have you tried other Compilers ?

Navigation

[0] Message Index

[#] Next page

Go to full version