----- Original Message -----
From: "jason" <[email protected]>
To: "mpir-devel" <[email protected]>
Sent: Tuesday, April 12, 2011 4:33 AM
Subject: [mpir-devel] Re: MinGW64 - undefined reference to gmpn symbols.
Hi
I just tried it again , and it works fine for me , I can give
gcc-4.6.0 a go to see if that causes any problems , the only other
difference is that you have set RANLIB , I never did .
I also subsequently used a gcc-4.4.4 build (by sezero), where it's only
necessary to run:
./configure --enable-gmpcompat --prefix=/c/_64/mpir ABI=64 && make && make
check
(though I now doubt there's any need to specify "ABI=64").
Same problem occurs for me.
I suppose the
shell might be cause , can you try it in cygwin ? as a cross
compiler , again this worked for me.
I have Cygwin - I might try to grab the appropriate compiler later and see
if the cross-compilation works.
However, I'd much prefer to get the build working with the msys shell - as
it should.
There was some mention of the decoration of the gmpn symbols, and using
objdump to look at them.
So I've done an 'objdump -t libgmp.a >syms.txt', and looking through
syms.txt I see something odd wrt the symbols that are mentioned in the
'undefined reference' messages. (Bear in mind that I don't really know what
I'm looking at, here.)
For example, 2 of those undefined references are __gmpn_lshift and
__gmpn_rshift. Looking through syms.txt I notice that both of those symbols
occur in a number of places and that mostly they're prefixed with 3 leading
underscores. But there's a section where they get prefixed by only 2
underscores:
############################################
lshift.o: file format pe-x86-64
SYMBOL TABLE:
[ 0](sec -2)(fl 0x00)(ty 0)(scl 103) (nx 1) 0x0000000000000000 lshift.as
File
[ 2](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x0000000000000000 .text
AUX scnlen 0x101 nreloc 0 nlnno 0
[ 4](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x0000000000000000
__gmpn_lshift
[ 5](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x0000000000000094
__gmpn_lshift.2
[ 6](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x0000000000000030
__gmpn_lshift.1
[ 7](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x00000000000000ce
__gmpn_lshift.3
[ 8](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x00000000000000f8
__gmpn_lshift.4
[ 9](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x0000000000000101 end
rshift.o: file format pe-x86-64
SYMBOL TABLE:
[ 0](sec -2)(fl 0x00)(ty 0)(scl 103) (nx 1) 0x0000000000000000 rshift.as
File
[ 2](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x0000000000000000 .text
AUX scnlen 0x178 nreloc 0 nlnno 0
[ 4](sec 1)(fl 0x00)(ty 0)(scl 2) (nx 0) 0x0000000000000000
__gmpn_rshift
[ 5](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x00000000000000a5
__gmpn_rshift.2
[ 6](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x0000000000000040
__gmpn_rshift.1
[ 7](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x0000000000000170
__gmpn_rshift.6
[ 8](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x0000000000000150
__gmpn_rshift.5
[ 9](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x0000000000000110
__gmpn_rshift.4
[ 10](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x00000000000000b7
__gmpn_rshift.3
[ 11](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 0) 0x0000000000000178 end
#######################################################
With my (problem-free) 32-bit build it's 3 leading underscores all the way
through - the corresponding section is quite different:
#######################################################
lshift.o: file format pe-i386
SYMBOL TABLE:
[ 0](sec -2)(fl 0x00)(ty 0)(scl 103) (nx 1) 0x00000000 fake
File
[ 2](sec 1)(fl 0x00)(ty 20)(scl 2) (nx 1) 0x00000000 ___gmpn_lshift
AUX tagndx 0 ttlsiz 0x0 lnnos 0 next 0
[ 4](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .text
AUX scnlen 0x205 nreloc 1 nlnno 0
[ 6](sec 2)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .data
AUX scnlen 0x0 nreloc 0 nlnno 0
[ 8](sec 3)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .bss
AUX scnlen 0x0 nreloc 0 nlnno 0
rshift.o: file format pe-i386
SYMBOL TABLE:
[ 0](sec -2)(fl 0x00)(ty 0)(scl 103) (nx 1) 0x00000000 fake
File
[ 2](sec 1)(fl 0x00)(ty 20)(scl 2) (nx 1) 0x00000000 ___gmpn_rshift
AUX tagndx 0 ttlsiz 0x0 lnnos 0 next 0
[ 4](sec 1)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .text
AUX scnlen 0x1f8 nreloc 1 nlnno 0
[ 6](sec 2)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .data
AUX scnlen 0x0 nreloc 0 nlnno 0
[ 8](sec 3)(fl 0x00)(ty 0)(scl 3) (nx 1) 0x00000000 .bss
AUX scnlen 0x0 nreloc 0 nlnno 0
#######################################################
For symbols not mentioned in the 'undefined reference' messages, it seems
that they are *always* prefixed with 3 underscores in libgmp.a.
Anything in that ?
If not, what should I be looking at ?
Cheers,
Rob
--
You received this message because you are subscribed to the Google Groups
"mpir-devel" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/mpir-devel?hl=en.