danielb6611 / mupen64plus

Automatically exported from code.google.com/p/mupen64plus
0 stars 0 forks source link

OS X 10.6 (snow leopard) build error: Undefined symbols #313

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
the build error:

Undefined symbols:
  "reg", referenced from:
      _dyna_start in rjump.o
  "save_rip", referenced from:
      _dyna_start in rjump.o
  "save_rsp", referenced from:
      _dyna_start in rjump.o
      _dyna_start in rjump.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

to hack it: (from IRC)

4:52:14 PM Richard42: inside of the 64-bit ASM block for PIC code, you 
have to change reg to _reg, save_rip to _save_rip, and save_rsp to _save_rsp

the changes are at: mupen64plus-core/src/r4300/x86_64/rjump.c

more info:

4:47:31 PM Richard42: the compiler is putting underscores in front of the 
names, but the asm code doesn't expect that
4:47:49 PM Richard42: if you hack the asm code to change ie, 'reg' to 
'_reg', then it should compile
4:47:56 PM Auria: so, reg, save_rip and save_rsp are referenced from asm?
4:48:11 PM Richard42: yes
4:48:34 PM Richard42: there are several different ASM blocks as well.  The 
only one that you need to worry about is the 64-bit PIC one
4:49:39 PM Auria: Ok. Guess we'll need to patch some code there
4:50:25 PM Richard42: it's a simple change
4:50:37 PM Richard42: to hack it... doing it correctly would be a little bit 
more work

Original issue reported on code.google.com by darkmags...@gmail.com on 14 Jan 2010 at 2:14

GoogleCodeExporter commented 8 years ago

Original comment by richard...@gmail.com on 14 Jan 2010 at 5:36

GoogleCodeExporter commented 8 years ago
I have pushed a commit to rjump.c which should fix this issue.  Can you please 
build
from the latest code in Hg and re-open this bug if the problem remains?   
Thanks.

Original comment by richard...@gmail.com on 20 Jan 2010 at 4:02