Project

General

Profile

Actions

Emulator Issues #3595

closed

Scons compiling error on Linux 32bit (register clobbered)

Added by debian.micove over 13 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What's the problem?
Using scons on Linux 64-bit everything compiles but if I try to compile it in Linux 32-bit I get the following error:

Compiling Build/Linux-i686-release/Source/Core/Core/Src/PowerPC/Jit64IL/IR_X86.o
Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp: In member function 'void IREmitter::IRBuilder::WriteToFile(u64)':
Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp:1328: warning: format '%10lu' expects type 'long unsigned int', but argument 3 has type 'unsigned int'
Source/Core/Core/Src/PowerPC/Jit64IL/IR.cpp:1338: warning: format '%10lu' expects type 'long unsigned int', but argument 3 has type 'unsigned int'
/
Compiling Build/Linux-i686-release/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.o
Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp: In function 'void JitILProfiler::Begin(u32)':
Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp:171: error: PIC register clobbered by '%rbx' in 'asm'
Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp: In function 'void JitILProfiler::End()':
Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.cpp:171: error: PIC register clobbered by '%rbx' in 'asm'
scons: *** [Build/Linux-i686-release/Source/Core/Core/Src/PowerPC/Jit64IL/JitIL.o] Error 1

Dolphin version with the problem:
Latest svn
Started somewhere around r6442

Operating system and version:
32-bit

Build command-line (not on Windows):
scons -j2 flavor=release install=global shared_lzo=true shared_sfml=true shared_soil=true destdir=/build/buildd/dolphin-emu-2.0+svn6487/debian/dolphin-emu

Please provide any additional information below.

Similar to Issue 3531 .

Actions #1

Updated by debian.micove over 13 years ago

Forgot to mention that if I compile it with cmake in the same fashion as the latest packages in glennricster's PPA there is no clobbering. So it's only happens on Linux 32 bit with scons.

Actions #2

Updated by BhaaL over 13 years ago

32-bit does not use rbx. The leading r (as opposed to e on 32-bit) signifies a 64-bit process.

r6457 and later should have this fixed (or rather, worked around, nothing useful for a non-dev), are you sure this still occurs? Is your working copy completely updated, and no object files left behind?

Actions #3

Updated by glennricster over 13 years ago

Yeah, I thought that this problem would occur on 32 bit linux as well as macosx. I will fix it later today.

Actions #4

Updated by debian.micove over 13 years ago

Yeah, I'm 100% sure it's completely updated and nothing left behind. I basically compile debian packages on a chroot and back them up to a PPA for my personal use and it was compiling fine since at least r6132.

For reference, I have always made the source tarball using the following code and the tarball matches the one in glennricster's PPA:
TEMP_DIR := $(shell mktemp -d)
VERSION = $(shell dpkg-parsechangelog | grep ^Version | cut -d" " -f2 | sed 's,-.,,')
REVISION = $(shell dpkg-parsechangelog | grep ^Version | cut -d" " -f2 | sed 's,-.
,,' | sed 's,.*+,,' | sed 's,[a-z],,g')
TARBALL = $(shell echo "dolphin-emu_$(VERSION).orig.tar.gz" | tr -d " ")
TOPDIR = $(shell echo "dolphin-emu-$(VERSION)" | tr -d " ")

get-orig-source:
cd $(TEMP_DIR) && svn -r $(REVISION) checkout http://dolphin-emu.googlecode.com/svn/trunk/ $(TOPDIR)
find $(TEMP_DIR)/ -name ".svn" -type d | xargs rm -rf
cd $(TEMP_DIR) && tar czf $(TARBALL) $(TOPDIR)
mv $(TEMP_DIR)/$(TARBALL) .
rm -rf $(TEMP_DIR)

Actions #5

Updated by glennricster over 13 years ago

Hmm, that is odd. It built perfectly in my ppa for both 32 and 64 bit.

Actions #6

Updated by glennricster over 13 years ago

Sorry, I didn't read your first few posts very carefully. I didn't see that you were having an issue with the scons build, but not the cmake build. I need to put a comment on the linux build wiki about this, but we are no longer supporting the scons build on linux. The cmake build is much better.

Most likely the reason the scons build has the problem with the PIC register clobbering is because of the -fPIC flag that is used everywhere instead of only where it should be used. Not sure though.

Actions #7

Updated by glennricster over 13 years ago

  • Status changed from New to Fixed

This should be fixed with revision 6498. Although you really should stop using the scons build on linux. The real reason for this was the -fPIC flag as I suspected.

Actions

Also available in: Atom PDF