On Apr 12, 4:30 am, "Sisyphus" <sisyph...@optusnet.com.au> wrote:
> ----- Original Message -----
> From: "jason" <ja...@njkfrudils.plus.com>
> To: "mpir-devel" <mpir-devel@googlegroups.com>
> 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

Cheers , I cant get any errors at all , I've tried the latest MSYS
install and gcc
ie
http://sourceforge.net/projects/mingw/files/Automated%20MinGW%20Installer/mingw-get-inst/mingw-get-inst-20110316/mingw-get-inst-20110316.exe/download
and
mingw-w64-1.0-bin_i686-mingw-20110408.zip

running objdump on the lib I get this


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 0x11c 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) 0x000000000000006f
__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) 0x0000000000000090
__gmpn_lshift.
4
[  8](sec  1)(fl 0x00)(ty   0)(scl   3) (nx 0) 0x00000000000000d0
__gmpn_lshift.
5
[  9](sec  1)(fl 0x00)(ty   0)(scl   3) (nx 0) 0x0000000000000100
__gmpn_lshift.
6
[ 10](sec  1)(fl 0x00)(ty   0)(scl   3) (nx 0) 0x000000000000007d
__gmpn_lshift.
3
[ 11](sec  1)(fl 0x00)(ty   0)(scl   3) (nx 0) 0x0000000000000114
__gmpn_lshift.
7
[ 12](sec  2)(fl 0x00)(ty   0)(scl   3) (nx 1)
0x0000000000000000 .xdata
AUX scnlen 0xc nreloc 0 nlnno 0
[ 14](sec  3)(fl 0x00)(ty   0)(scl   3) (nx 1)
0x0000000000000000 .pdata
AUX scnlen 0xc nreloc 3 nlnno 0
[ 16](sec  1)(fl 0x00)(ty   0)(scl   3) (nx 0) 0x000000000000011c 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 0x120 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) 0x000000000000006f
__gmpn_rshift.
2
[  6](sec  1)(fl 0x00)(ty   0)(scl   3) (nx 0) 0x0000000000000030
__gmpn_rshift.
1
[  7](sec  1)(fl 0x00)(ty   0)(scl   3) (nx 0) 0x0000000000000110
__gmpn_rshift.
6
[  8](sec  1)(fl 0x00)(ty   0)(scl   3) (nx 0) 0x00000000000000f0
__gmpn_rshift.
5
[  9](sec  1)(fl 0x00)(ty   0)(scl   3) (nx 0) 0x00000000000000c0
__gmpn_rshift.
4
[ 10](sec  1)(fl 0x00)(ty   0)(scl   3) (nx 0) 0x000000000000007d
__gmpn_rshift.
3
[ 11](sec  1)(fl 0x00)(ty   0)(scl   3) (nx 0) 0x0000000000000118
__gmpn_rshift.
7
[ 12](sec  2)(fl 0x00)(ty   0)(scl   3) (nx 1)
0x0000000000000000 .xdata
AUX scnlen 0xc nreloc 0 nlnno 0
[ 14](sec  3)(fl 0x00)(ty   0)(scl   3) (nx 1)
0x0000000000000000 .pdata
AUX scnlen 0xc nreloc 3 nlnno 0
[ 16](sec  1)(fl 0x00)(ty   0)(scl   3) (nx 0) 0x0000000000000120 end


Note: only two underscores , the only symbol that has three
underscores is chkstk , which is a problem if we link the mingw64
library with MSVC

Can you post the output of config.log

Cheers
Jason

-- 
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To post to this group, send email to mpir-devel@googlegroups.com.
To unsubscribe from this group, send email to 
mpir-devel+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/mpir-devel?hl=en.

Reply via email to