troubles compiling the GNU GMP under MinWG

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

troubles compiling the GNU GMP under MinWG

Euchner, Martin

Dear experts,

 

I’m facing troubles compiling the GNU GMP under MinWG and would like to hear which mailing list ([hidden email] or [hidden email]) is most appropriate to following-up with detailed questions?

 

In addition, I’m wondering if MinWG correctly figured out my CPU processor?

 

I have Windows 7 Enterprise OS running on Intel® Core™ i3-2330M CPU using 64-bit OS (that’s what System reported).

 

My ENV reports:

PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 42 Stepping 7, GenuineIntel

OS=Windows_NT

PROCESSOR_LEVEL=6

PROCESSOR_ARCHITEW6432=AMD64

PROCESSOR_ARCHITECTURE=x86

MSYSTEM=MINGW32

PROCESSOR_REVISION=2a07

NUMBER_OF_PROCESSORS=4

 

gcc is compiling using -mtune=sandybridge -march=sandybridge

 

This is setting correct?

 

With kind regards

 

Martin Euchner.

 

 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: troubles compiling the GNU GMP under MinGW

MinGW - User mailing list
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 24/07/17 12:50, Euchner, Martin wrote:
> I'm facing troubles compiling the GNU GMP under MinWG

First, let me say that you are consistently misspelling "MinGW" ...

> and would like to hear which mailing list
> (mailto:[hidden email] or
> mailto:[hidden email]) is most appropriate to following-up
> with detailed questions?

That depends on the nature of the problem; since you haven't specified,
how are we to tell?  FWIW, I myself have, just recently, compiled GMP,
(specifically GMP-6.1.2), for mingw32, without encountering even the
slightest problem, (if we discount one testsuite failure which turned
out to be due to a bug in wine's scanf() implementation).

> I have Windows 7 Enterprise OS running on Intel(r) Core(tm) i3-2330M
> CPU using 64-bit OS (that's what System reported).

Are you actually using a MinGW.org (WIN32) compiler, and accompanying
MinGW.org tools?  If "yes", then we would be happy to help, if you can
be more specific about the problem; if "no", this is the wrong list.

- --
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJZdfDfAAoJEMCtNsY0flo/mJoP/R2HJG4Or3zk9yi0I+eRqCac
+NJVD0uodwi/NGs3qeH8qMGQ5rgC7uAY8RnSPqmUEIUn+sPXBwVNYltdvHUwNT06
z9DVJAlW6akGhSIMIVjLPKP7cyr5ToHrV32KfBfPDp1z6yN+qDwYfasrrisUPAyJ
obSf3aimFMMoZscbEpx+88aE2KMWVFIFMSHk1TG+OG2n+kIRR47WALIY8ys6yoIH
0XUH3YXGS2eH3S+LUE0z7dhgK4cgksBI8Kdve7Rpg8Nyk5F2+/Ib1bfQoXnGD9BH
qh3IHUA3kaMtfLdp/M6cxsVjLeXz0+42gWijXG6Qy1SqJHLsHq3e19AYOeWZZ4AH
s0sHTRTGJ+oBboU6MOc9yrdwdtFjj4QmoDl7xzSoHyKccpfW26LTpzBTdUzcBoqi
42g6m7MSkKxDxdv5xZL4V85cKPKW0K7wgGUW7jI8qcOTL7XA4WgS9lUHqn5oEuIE
dudJ794URC3SJ5jBUiEmjH0e+OOVAgZNwdG8jmbuvuUgPPH6qLVJ9r24hKQcKoit
p0JXpFl3sJku/MqY7Vca1cEzSlLD+gq2A8AOFFaYbuy5aTfJmMv/hFSZEYOaiuaZ
t1viTEtlggxxIU2a/cGL1giU6+K2MU9Q7MPBq66VhEVsVYGEIGCxdOj98zpJqi7T
5g2yT09By8Axg45qFR2T
=/Q16
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: troubles compiling the GNU GMP under MinWG

Eli Zaretskii
In reply to this post by Euchner, Martin
> From: "Euchner, Martin" <[hidden email]>
> Date: Mon, 24 Jul 2017 11:50:35 +0000
>
> I’m facing troubles compiling the GNU GMP under MinWG and would like to hear which mailing list
> ([hidden email] or [hidden email]) is most appropriate to following-up with
> detailed questions?

It depends on what problems are you having.  So it's hard to answer
that with only the information you provided.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: troubles compiling the GNU GMP under MinWG

Euchner, Martin
Dear Eli,

Thanks, and sorry for the too big attachment. I removed the compile log of GMP; here's where I got stuck with compiling the GMP demos:

$ cd demos

$ make factorize
gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=sandybridge -march=sandybridge    factorize.c   -o factorize
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x23): undefined reference to `__gmpz_powm'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x33): undefined reference to `__gmpz_cmp_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x43): undefined reference to `__gmpz_cmp'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x6c): undefined reference to `__gmpz_cmp_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x91): undefined reference to `__gmpz_powm_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x9d): undefined reference to `__gmpz_cmp'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x123): undefined reference to `__gmpz_clear'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x1a5): undefined reference to `__gmpz_cmp'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x229): undefined reference to `__gmpz_init'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x252): undefined reference to `__gmpz_set'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x27f): undefined reference to `__gmpz_set'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x303): undefined reference to `__gmpz_init'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x364): undefined reference to `__gmpz_init'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x394): undefined reference to `__gmpz_init_set_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x3ac): undefined reference to `__gmpz_clear'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x3e8): undefined reference to `__gmpz_init'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x3f8): undefined reference to `__gmpz_scan1'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x40a): undefined reference to `__gmpz_fdiv_q_2exp'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x459): undefined reference to `__gmpz_cmp_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x473): undefined reference to `__gmpz_divisible_ui_p'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x487): undefined reference to `__gmpz_tdiv_q_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x4ab): undefined reference to `__gmpz_clear'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x4fa): undefined reference to `__gmpz_cmp_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x57a): undefined reference to `__gmpz_cmp_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x599): undefined reference to `__gmpz_cmp_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x5cd): undefined reference to `__gmpz_inits'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x5ec): undefined reference to `__gmpz_sub_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x600): undefined reference to `__gmpz_scan1'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x61e): undefined reference to `__gmpz_tdiv_q_2exp'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x62e): undefined reference to `__gmpz_set_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x6b2): undefined reference to `__gmpz_divexact'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x6cd): undefined reference to `__gmpz_powm'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x6dd): undefined reference to `__gmpz_cmp_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x70e): undefined reference to `__gmpz_add_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x79f): undefined reference to `__gmpz_clears'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x7e3): undefined reference to `__gmpz_set'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x891): undefined reference to `__gmpz_inits'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x8a5): undefined reference to `__gmpz_init_set_si'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x8b5): undefined reference to `__gmpz_init_set_si'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x8c9): undefined reference to `__gmpz_init_set_si'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x8dd): undefined reference to `__gmpz_init_set_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x913): undefined reference to `__gmpz_cmp_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x93c): undefined reference to `__gmpz_mul'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x953): undefined reference to `__gmpz_mod'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x96a): undefined reference to `__gmpz_add_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x97e): undefined reference to `__gmpz_sub'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x999): undefined reference to `__gmpz_mul'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x9bb): undefined reference to `__gmpz_mod'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x9e4): undefined reference to `__gmpz_gcd'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x9f4): undefined reference to `__gmpz_cmp_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xa0c): undefined reference to `__gmpz_set'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xa30): undefined reference to `__gmpz_set'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xa6c): undefined reference to `__gmpz_mul'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xa83): undefined reference to `__gmpz_mod'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xa9a): undefined reference to `__gmpz_add_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xac0): undefined reference to `__gmpz_set'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xb00): undefined reference to `__gmpz_mul'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xb14): undefined reference to `__gmpz_mod'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xb2f): undefined reference to `__gmpz_add_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xb47): undefined reference to `__gmpz_sub'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xb57): undefined reference to `__gmpz_gcd'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xb67): undefined reference to `__gmpz_cmp_ui'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xb91): undefined reference to `__gmpz_divexact'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xbfb): undefined reference to `__gmpz_mod'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xc16): undefined reference to `__gmpz_mod'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xc31): undefined reference to `__gmpz_mod'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0xc95): undefined reference to `__gmpz_clears'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text.startup+0x89): undefined reference to `__gmpz_init'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text.startup+0xa6): undefined reference to `__gmpz_inp_str'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text.startup+0xc5): undefined reference to `__gmp_printf'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text.startup+0x125): undefined reference to `__gmp_printf'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text.startup+0x16d): undefined reference to `__gmpz_init'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text.startup+0x197): undefined reference to `__gmpz_set_str'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text.startup+0x1a7): undefined reference to `__gmp_printf'
C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text.startup+0x205): undefined reference to `__gmp_printf'
collect2.exe: error: ld returned 1 exit status
make: *** [factorize] Error 1

Do you have any idea what needs to be changed to get the demos executable?

Regards,

Martin.


-----Original Message-----
From: Eli Zaretskii [mailto:[hidden email]]
Sent: Monday, July 24, 2017 4:31 PM
To: MinGW Users List <[hidden email]>
Cc: Euchner, Martin <[hidden email]>
Subject: Re: [Mingw-users] troubles compiling the GNU GMP under MinWG

> From: "Euchner, Martin" <[hidden email]>
> Date: Mon, 24 Jul 2017 11:50:35 +0000
>
> I’m facing troubles compiling the GNU GMP under MinWG and would like
> to hear which mailing list ([hidden email] or
> [hidden email]) is most appropriate to following-up with detailed questions?

It depends on what problems are you having.  So it's hard to answer that with only the information you provided.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: troubles compiling the GNU GMP under MinWG

Eli Zaretskii
> From: "Euchner, Martin" <[hidden email]>
> Date: Mon, 24 Jul 2017 15:20:32 +0000
>
> $ make factorize
> gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=sandybridge -march=sandybridge    factorize.c   -o factorize
> C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x23): undefined reference to `__gmpz_powm'
> C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x33): undefined reference to `__gmpz_cmp_ui'

The GCC command line obviously lacks the reference to GMP library.  I
would look at the Makefile which produced this command, probably some
variable isn't set there correctly or has an empty value.

Did the library itself build successfully?

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: troubles compiling the GNU GMP under MinWG

Paul J. Hentschel
In reply to this post by Euchner, Martin
> $ cd demos
>
> $ make factorize
> gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=sandybridge -
> march=sandybridge    factorize.c   -o factorize

Try "make factorize.exe" instead of "make factorize" and see if that works.

Paul


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: troubles compiling the GNU GMP under MinWG

Euchner, Martin
In reply to this post by Eli Zaretskii
Dear Eli,

Many thanks for the hint.
Indeed, when I manually -lgmp then all works fine:
gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=sandybridge -march=sandybridge   factorize.c   -o factorize -lgmp

The -lgmp must be after the .c (or at the very end) but I did not manage to fix the Makefile accordingly. I'm not enough Makefile expert to get this fixed, and I leave to somebody else to fix that in the package.

Here's the stripped-down Makefile to be fixed:
CC = gcc
CFLAGS = -m32 -O2 -pedantic -fomit-frame-pointer -mtune=sandybridge -march=sandybridge


Anyway, many thanks for your help!

Regards,

Martin.

-----Original Message-----
From: Eli Zaretskii [mailto:[hidden email]]
Sent: Monday, July 24, 2017 5:47 PM
To: Euchner, Martin <[hidden email]>
Cc: [hidden email]
Subject: Re: [Mingw-users] troubles compiling the GNU GMP under MinWG

> From: "Euchner, Martin" <[hidden email]>
> Date: Mon, 24 Jul 2017 15:20:32 +0000
>
> $ make factorize
> gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=sandybridge -march=sandybridge    factorize.c   -o factorize
> C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x23): undefined reference to `__gmpz_powm'
> C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x33): undefined reference to `__gmpz_cmp_ui'

The GCC command line obviously lacks the reference to GMP library.  I would look at the Makefile which produced this command, probably some variable isn't set there correctly or has an empty value.

Did the library itself build successfully?

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: troubles compiling the GNU GMP under MinWG

MinGW - User mailing list
In reply to this post by Eli Zaretskii
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 24/07/17 16:46, Eli Zaretskii wrote:
>> From: "Euchner, Martin" <[hidden email]>
>> Date: Mon, 24 Jul 2017 15:20:32 +0000
>>
>> $ make factorize
>> gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=sandybridge -march=sandybridge    factorize.c   -o factorize
>> C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x23): undefined reference to `__gmpz_powm'
>> C:\Users\euchner\AppData\Local\Temp\ccEo6gbB.o:factorize.c:(.text+0x33): undefined reference to `__gmpz_cmp_ui'

The OP sent me a copy of his build log, by private mail; it shows that
he chose a non-standard prefix, for installation of his GMP build, so
not only ...

> The GCC command line obviously lacks the reference to GMP library.

... but also lacks a specification of the path to it.  (Alternatively,
if the MinGW.org pre-built GMP-6.1.2 is installed -- the "dev" package,
not just the DLL -- it would be found in GCC's default library path).
  I
> would look at the Makefile which produced this command, probably some
> variable isn't set there correctly or has an empty value.

Maybe LDFLAGS for the -L path, and LIBS for the library reference itself,
since GMP uses an autoconf generated configuration.

> Did the library itself build successfully?

The OP's log suggests that it did.

- --
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJZdj2DAAoJEMCtNsY0flo/WMgP/RL9fwLXrLvhzbSgA+9JTYzA
CrJfWyy6YV+Z1I1T0hPoAJWSDh7eUDDz8zas7PVu3MGHhDubAFs8TryYOyelBKaO
DxgUsulZzCcVTiMyzII6twcNq9BMOlmhZ3rKiU7qEIhNl5z7wTdYQOFT276TjeHv
0fc9J9JEXPOQBEai5pApH8bH9chpHIKFzX9wx3y2jXLWtwYiJe9qQnENXrQu6wU6
9gnBp7+xnAk7xksxirxeSfAHQozwF2ME6yP857omWxgGuzTI2fKl2t47pGsH8Uyd
UiLntvXQekcgi0ZLLfxkIfl1j2Z30JfUGiwk5h4Ne/kwBv96jxSevqUQsyy/k6rN
e5N4HyXlQOsmsAML6PSGaTaKV2jwk4bssNJgzQJrgvs+/ICFl1URmQrgi7NMKti9
PgPqbIsKV2yzdXG8AswYp1BxvWM94cx0JsJpN+eNgKNmcRMrR7oZ+LNx2O6P1GmI
f7N+sFKYTKNdXEHB6FOonYVLLouNe101jOGmCSyWNd6KV2nvO1z9KUL2mII6L24T
NQ1RSMe7c9n5Ry3fU6EIQlKg8rITnzsoRzTsWEnkxZ2lDeBxXBnaanU1yiPiaMcJ
pUBtFwD8VK9tSARMejaf4Xoh5hxmPwbKmJZxa7dj6DY+IYGg3DvEjikjdOWphDt3
6XS8Cx+Bu3Gf01q+5vOo
=4g6K
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: troubles compiling the GNU GMP under MinWG

Eli Zaretskii
In reply to this post by Euchner, Martin
> From: "Euchner, Martin" <[hidden email]>
> CC: "[hidden email]" <[hidden email]>
> Date: Mon, 24 Jul 2017 18:13:30 +0000
>
> Many thanks for the hint.
> Indeed, when I manually -lgmp then all works fine:
> gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=sandybridge -march=sandybridge   factorize.c   -o factorize -lgmp
>
> The -lgmp must be after the .c (or at the very end) but I did not manage to fix the Makefile accordingly. I'm not enough Makefile expert to get this fixed, and I leave to somebody else to fix that in the package.
>
> Here's the stripped-down Makefile to be fixed:
> CC = gcc
> CFLAGS = -m32 -O2 -pedantic -fomit-frame-pointer -mtune=sandybridge -march=sandybridge

CFLAGS is not the whole story.  There should also be LDFLAGS or LIBES
or something like that, which is specifically used on the link (as
opposed to compilation) command lines.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: troubles compiling the GNU GMP under MinWG

MinGW - User mailing list
In reply to this post by Euchner, Martin
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 24/07/17 19:13, Euchner, Martin wrote:
> Indeed, when I manually -lgmp then all works fine:
> gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=sandybridge
>   -march=sandybridge   factorize.c   -o factorize -lgmp

This will not use the GMP you built, (because you installed yours in a
non-standard directory); this command uses the libgmp which we provided
as a standard GCC dependency, (and which will be installed in the GCC
default library path).

- --
Regards,
Keith.

Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)

iQIcBAEBAgAGBQJZdj6+AAoJEMCtNsY0flo/klkP+QEbMUPzrEJSMJLK7UNVmpRm
bLOf8P/OVbyb4hrxkUe/wYp/sun8fbcQHvleJz9mNMyzC4s8lYP9kF+zNSvPm5b7
xRDo+EZhYaNXwmjOsx9E4y57a2+tMScjvdzd0jvgGSiabf5AAkBYESoxy4BrAV/i
9lPa1tMOMS4zS7wmoHE/08tTQ3u6WO/6md0NibO4FzdzV3gvs7X05MHZ2k+87bxB
ChFdJkKf4Savm8kXPFt2xCocDF1bISBKawYpqnyOILbAISalT3FF2WxZyylRfXgy
HAVQzku/wcy4GkOqRg/jL6CcaYUzQp5oP6Ifj7Le/0430XBhOHVQ97BogcnIK8eR
ZLSh4zSG3bFrJjCly3qwMfVFG2C+B4oJnfCM+x7IQ5CY6s/v6FvYkIeAeo1XJiQC
GqSdvV0+F0fjgECZ97hBZCKvB8ymczOVf5CRcETiBaGMSSROrNpDXsBR4cCegSNs
jrWkE5Kk05IiCIEUl3Mxh3xpSW787/ujJuLDKFDH524ASaw+MJzFsvtWR4HqWEaO
/+zJLaP4o7xaeMWtINssMrm2abohl5nOQTAXT31lClsSgKnswVXbH7LKRWdDhlqt
MU4yzJCjY+m3CRxFlHm6aGXR9BL8su22SC0g8GOBLv41qTzaXLZi1Ocg+UHL+CtU
euwIuyHHebHjeDdWS5My
=VXdj
-----END PGP SIGNATURE-----

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: troubles compiling the GNU GMP under MinWG

Euchner, Martin
In reply to this post by Paul J. Hentschel
Hi Paul,

Thank. That works indeed!

Regards,

Martin.

-----Original Message-----
From: Paul J. Hentschel [mailto:[hidden email]]
Sent: Monday, July 24, 2017 6:59 PM
To: 'MinGW Users List' <[hidden email]>
Subject: Re: [Mingw-users] troubles compiling the GNU GMP under MinWG

> $ cd demos
>
> $ make factorize
> gcc -m32 -O2 -pedantic -fomit-frame-pointer -mtune=sandybridge -
> march=sandybridge    factorize.c   -o factorize

Try "make factorize.exe" instead of "make factorize" and see if that works.

Paul


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
MinGW-users mailing list
[hidden email]

This list observes the Etiquette found at
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users
Also: mailto:[hidden email]?subject=unsubscribe
Loading...