Error when installing TEMU

Skip to first unread message

Ioana M

Aug 24, 2016, 10:56:15 AM8/24/16
to BitBlaze User Discussion group

Hi there,

I was trying to install TEMU on 32-bit Ubuntu 14.04 and received the following error :

make -C i386-softmmu all
make[1]: Entering directory `/home/ioana/BitBlaze/temu-1.0/i386-softmmu'
gcc -Wall -O2 -g -fno-strict-aliasing  -fno-reorder-blocks  -fno-gcse  -fno-tree-ch  -fno-optimize-sibling-calls  -fno-crossjumping  -fno-align-labels  -fno-align-jumps  -fno-align-functions  -fno-section-anchors -mpreferred-stack-boundary=2 -fomit-frame-pointer   -I. -I.. -I/home/ioana/BitBlaze/temu-1.0/target-i386 -I/home/ioana/BitBlaze/temu-1.0 -MMD -MP -DNEED_CPU_H -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -I/home/ioana/BitBlaze/temu-1.0/fpu -I/usr/include/p11-kit-1   -DHAS_AUDIO -DHAS_AUDIO_CHOICE -I/home/ioana/BitBlaze/temu-1.0/slirp -c -o op.o /home/ioana/BitBlaze/temu-1.0/target-i386/op.c
In file included from /home/ioana/BitBlaze/temu-1.0/target-i386/exec.h:21:0,
                 from /home/ioana/BitBlaze/temu-1.0/target-i386/op.c:22:
/home/ioana/BitBlaze/temu-1.0/target-i386/opreg_template.h: In function ‘op_movl_A0_EAX’:
/home/ioana/BitBlaze/temu-1.0/target-i386/opreg_template.h:22:19: error: frame pointer required, but reserved
 void OPPROTO glue(op_movl_A0,REGNAME)(void)
../dyngen-exec.h:203:21: note: in definition of macro ‘xglue’
 #define xglue(x, y) x ## y
/home/ioana/BitBlaze/temu-1.0/target-i386/opreg_template.h:22:14: note: in expansion of macro ‘glue’
 void OPPROTO glue(op_movl_A0,REGNAME)(void)
In file included from /home/ioana/BitBlaze/temu-1.0/target-i386/op.c:22:0:
/home/ioana/BitBlaze/temu-1.0/target-i386/exec.h:33:30: note: for ‘env’
 register struct CPUX86State *env asm(AREG0);
make[1]: *** [op.o] Error 1
make[1]: Leaving directory `/home/ioana/BitBlaze/temu-1.0/i386-softmmu'
make: *** [subdir-i386-softmmu] Error 2

Stephen McCamant

Aug 29, 2016, 4:13:55 PM8/29/16
>>>>> "IM" == Ioana M <Ioana> writes:

IM> Hi there,

IM> I was trying to install TEMU on 32-bit Ubuntu 14.04 and received the
IM> following error :

IM> make -C i386-softmmu all
IM> make[1]: Entering directory `/home/ioana/BitBlaze/temu-1.0/i386-softmmu'
IM> gcc -Wall -O2 -g -fno-strict-aliasing -fno-reorder-blocks -fno-gcse
IM> -fno-tree-ch -fno-optimize-sibling-calls -fno-crossjumping
IM> -fno-align-labels -fno-align-jumps -fno-align-functions
IM> -fno-section-anchors -mpreferred-stack-boundary=2 -fomit-frame-pointer
IM> -I. -I.. -I/home/ioana/BitBlaze/temu-1.0/target-i386
IM> -I/home/ioana/BitBlaze/temu-1.0 -MMD -MP -DNEED_CPU_H -D_GNU_SOURCE
IM> -I/home/ioana/BitBlaze/temu-1.0/fpu -I/usr/include/p11-kit-1 -DHAS_AUDIO
IM> -DHAS_AUDIO_CHOICE -I/home/ioana/BitBlaze/temu-1.0/slirp -c -o op.o
IM> /home/ioana/BitBlaze/temu-1.0/target-i386/op.c
IM> In file included from /home/ioana/BitBlaze/temu-1.0/target-i386/exec.h:21:0,
IM> from /home/ioana/BitBlaze/temu-1.0/target-i386/op.c:22:
IM> /home/ioana/BitBlaze/temu-1.0/target-i386/opreg_template.h: In function
IM> `op_movl_A0_EAX':
IM> /home/ioana/BitBlaze/temu-1.0/target-i386/opreg_template.h:22:19: error:
IM> frame pointer required, but reserved
IM> void OPPROTO glue(op_movl_A0,REGNAME)(void)
IM> ^
IM> ../dyngen-exec.h:203:21: note: in definition of macro `xglue'
IM> #define xglue(x, y) x ## y
IM> ^
IM> /home/ioana/BitBlaze/temu-1.0/target-i386/opreg_template.h:22:14: note: in
IM> expansion of macro `glue'
IM> void OPPROTO glue(op_movl_A0,REGNAME)(void)
IM> ^
IM> In file included from /home/ioana/BitBlaze/temu-1.0/target-i386/op.c:22:0:
IM> /home/ioana/BitBlaze/temu-1.0/target-i386/exec.h:33:30: note: for `env'
IM> register struct CPUX86State *env asm(AREG0);
IM> ^
IM> make[1]: *** [op.o] Error 1
IM> make[1]: Leaving directory `/home/ioana/BitBlaze/temu-1.0/i386-softmmu'
IM> make: *** [subdir-i386-softmmu] Error 2

Without having yet investigated it in detail, my guess is that this
incompatibility is triggered by the newer default version of GCC in
Ubuntu 14.04 (4.8.4, I believe). Older versions of QEMU like the one
that underlies TEMU 1.0 are sensitive to the code generation strategy
of the GCC you use, because of the way they string together
compiler-generated byte sequences to create the host code. This
general problem area is why patches were needed to get TEMU 1.0 to
compile on 64-bit hosts, and in general you'd expect that the newer
the compiler version, the more work would be required to get it to
work. You might try those patches if you haven't already, even though
you're on a 32-bit host, since they generally modernize some of how
QEMU interacts with the compiler. You can also try finding an older
compiler: I think 14.04 has versions back to GCC 4.4 in the main
archive, and you may be able to get older versions from old packages
or by compiling them yourself. However at that point it may be easier
to use an overall older version of Linux in some sort of VM (if you
still like Ubuntu, I think the range between 9.04 and 12.04 saw better
testing of QEMU). Depending on your situation you might be able to
compile on an older VM but still run the resulting tool on your newer

If you want to debug the problem in more detail yourself, the first
thing to try might be to remove the -fomit-frame-pointer option, which
seems likely to have some relation to the error being about the frame
pointer as well. In a normal pure-C program, this would be a pretty
safe change that might just hurt performance. However in the case of
TEMU it might mess up the generated code in a subtle way, so this
isn't a slam dunk.

Also depending on what your ultimate goal is, you should consider
DECAF as a potential alternative to TEMU. It provides a similar
framework that what TEMU does, but it is based on a newer version of
QEMU that doesn't have as much of this sort of compiler dependency,
and it has generally seen more recent maintenance effort than TEMU.

Hope this helps,

-- Stephen

Reply all
Reply to author
0 new messages