| Home » U++ Library support » U++ MT-multithreading and servers » [SOLVED] Unable to compile MT applications (weird assembler error with GCC on Linux i386 arch) Goto Forum:
	| 
		
			| [SOLVED] Unable to compile MT applications (weird assembler error with GCC on Linux i386 arch) [message #42186] | Thu, 27 February 2014 01:42  |  
			| 
				
				
					|  Oblivion Messages: 1238
 Registered: August 2007
 | Senior Contributor |  |  |  
	| Hello guys, 
 I was trying to compile the latest TheIDE with MT to test the latest gdb_mi interface, but hit a strange error.
 So I checked it with some other apps, and the U++ GuiMT example and always got the same result.
 
 For example, with the GuiMT example I get the following errors, which seem to be the case for all MT apps (some part is in Turkish, but it can be translated as invalid expression before @indntpoff - thread local storage modifier for 32 bit architecture)
 
 
----- CtrlLib ( GUI MT GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX ) (1 / 9)
----- CtrlCore ( GUI MT GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX ) (2 / 9)
----- PdfDraw ( GUI MT GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX ) (3 / 9)
----- Draw ( GUI MT GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX ) (4 / 9)
----- plugin/bmp ( GUI MT GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX ) (5 / 9)
----- RichText ( GUI MT GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX ) (6 / 9)
----- Core ( GUI MT GCC DEBUG SHARED DEBUG_FULL BLITZ LINUX POSIX ) (7 / 9)
heaputil.cpp
/tmp/ccNRmbfb.s: Çevirici iletileri:
/tmp/ccNRmbfb.s:813: Hata: ifade sonrasında hatalı `@indntpoff'
/tmp/ccNRmbfb.s:1930: Hata: ifade sonrasında hatalı `@indntpoff'
heap.cpp
/tmp/ccXr1sbP.s: Çevirici iletileri:
/tmp/ccXr1sbP.s:2487: Hata: ifade sonrasında hatalı `@indntpoff'
/tmp/ccXr1sbP.s:2513: Hata: ifade sonrasında hatalı `@indntpoff'
Core: 2 file(s) built in (0:19.01), 9509 msecs / file, duration = 19094 msecs
There were errors. (0:19.58)
 So I produced the asm code of the relevant source files (heaputil.cpp and heap.cpp)
 In heap.cpp, the code block that produce the error is like this:
 
 
 
LFE6366:
	.size	_ZN3Upp12MemoryShrinkEv, .-_ZN3Upp12MemoryShrinkEv
	.globl	_ZN3Upp16MemoryFreeThreadEv
	.type	_ZN3Upp16MemoryFreeThreadEv, @function
_ZN3Upp16MemoryFreeThreadEv:
.LFB6367:
	.cfi_startproc
	pushl	%ebp
	.cfi_def_cfa_offset 8
	.cfi_offset 5, -8
	movl	%esp, %ebp
	.cfi_def_cfa_register 5
	subl	$24, %esp
	movl	%gs:0, %edx
	movl	_ZN3Upp4heapE@indntpoff, %eax                              <<------- gives error.
	addl	%edx, %eax
	movl	%eax, (%esp)
	call	_ZN3Upp4Heap8ShutdownEv
	leave
	.cfi_restore 5
	.cfi_def_cfa 4, 4
	ret
	.cfi_endproc
.LFE6367:
	.size	_ZN3Upp16MemoryFreeThreadEv, .-_ZN3Upp16MemoryFreeThreadEv
	.globl	_ZN3Upp11MemoryCheckEv
	.type	_ZN3Upp11MemoryCheckEv, @function
_ZN3Upp11MemoryCheckEv:
.LFB6368:
	.cfi_startproc
	pushl	%ebp
	.cfi_def_cfa_offset 8
	.cfi_offset 5, -8
	movl	%esp, %ebp
	.cfi_def_cfa_register 5
	subl	$24, %esp
	movl	%gs:0, %edx
	movl	_ZN3Upp4heapE@indntpoff, %eax                               <<------- gives error.
	addl	%edx, %eax
	movl	%eax, (%esp)
	call	_ZN3Upp4Heap5CheckEv
	leave
	.cfi_restore 5
	.cfi_def_cfa 4, 4
	ret
	.cfi_endproc
 Above code is the asm translation of heap.cpp, line 268+:
 
 
 
void MemoryFreeThread()
{
	heap.Shutdown();
}
void MemoryCheck()
{
	heap.Check();
}
 In heaputil.cpp, the code block that produce the error is like this:
 
 
 
.LFE6353:
	.size	_ZN3Upp17PeakMemoryProfileEv, .-_ZN3Upp17PeakMemoryProfileEv
	.globl	_ZN3Upp13DoPeakProfileEv
	.type	_ZN3Upp13DoPeakProfileEv, @function
_ZN3Upp13DoPeakProfileEv:
.LFB6354:
	.cfi_startproc
	pushl	%ebp
	.cfi_def_cfa_offset 8
	.cfi_offset 5, -8
	movl	%esp, %ebp
	.cfi_def_cfa_register 5
	subl	$24, %esp
	movl	_ZN3UppL5sPeakE, %eax
	testl	%eax, %eax
	je	.L57
	movl	_ZN3UppL5sPeakE, %eax
	movl	%eax, 4(%esp)
	movl	%gs:0, %edx
	movl	_ZN3Upp4heapE@indntpoff, %eax                                                                 <<------- gives error.
	addl	%edx, %eax
	movl	%eax, (%esp)
	call	_ZN3Upp4Heap4MakeERNS_13MemoryProfileE
.L57:
	leave
	.cfi_restore 5
	.cfi_def_cfa 4, 4
	ret
	.cfi_endproc
....
.LLSDACSE6368:
	.text
	.size	_ZN3Upp4Heap4MakeERNS_13MemoryProfileE, .-_ZN3Upp4Heap4MakeERNS_13MemoryProfileE
	.align 2
	.globl	_ZN3Upp13MemoryProfileC2Ev
	.type	_ZN3Upp13MemoryProfileC2Ev, @function
_ZN3Upp13MemoryProfileC2Ev:
.LFB6370:
	.cfi_startproc
	pushl	%ebp
	.cfi_def_cfa_offset 8
	.cfi_offset 5, -8
	movl	%esp, %ebp
	.cfi_def_cfa_register 5
	subl	$24, %esp
	movl	8(%ebp), %eax
	movl	%eax, 4(%esp)
	movl	%gs:0, %edx
	movl	_ZN3Upp4heapE@indntpoff, %eax                                           <<------- gives error.
	addl	%edx, %eax
	movl	%eax, (%esp)
	call	_ZN3Upp4Heap4MakeERNS_13MemoryProfileE
	leave
	.cfi_restore 5
	.cfi_def_cfa 4, 4
	ret
	.cfi_endproc
 Above code is the asm translation of heaputil.cpp, lines 46+ and 302+:
 
 
 
void DoPeakProfile()                                      // Line 46
{
	if(sPeak)
		heap.Make(*sPeak);
}
...
MemoryProfile::MemoryProfile()                        // Line 302
{
	heap.Make(*this);
}
 
 So the main culprit seems to be the "heap", which is defined as extern thread Heap in heapimp.h (see line 175):
 
 
 
extern thread__ Heap heap;
 
 Any ideas on how to solve this problem? Is this a 32 bit i386 arch error only?
 I can't compile any MT app with U++ heap. Note that they compile if I use USEMALLOC.
 
 This happens on an ArchLinux with kernel 3.12 and GCC 4.8+ on a 32 bit AMD AthlonXP processor (without SSE2). I don't get this with an AMD 64 or newer Intel machines and I am using U++ nightly (6944).
 
 Regards.
 
 Github page: https://github.com/ismail-yilmaz
 Bobcat the terminal emulator: https://github.com/ismail-yilmaz/Bobcat
 [Updated on: Sun, 02 March 2014 02:22] Report message to a moderator |  
	|  |  |  
	|  |  
	|  |  
	|  |  
	|  |  
	|  | 
 
 
 Current Time: Wed Oct 29 08:12:46 CET 2025 
 Total time taken to generate the page: 0.02750 seconds |