mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Msieve

Reply
 
Thread Tools
Old 2010-01-31, 14:22   #1
Andi47
 
Andi47's Avatar
 
Oct 2004
Austria

2×17×73 Posts
Default How to build a binary of SVN183?

I finally found the link to SVN183 (I had set my script-blocker (in firefox) too restrictive and therefore didn't see the link) and downloaded the tarball.

I try to build the binary on my C2D laptop (running Ubuntu 9.04, 64 bit) by first setting

Code:
OPT_FLAGS = -O3 -fomit-frame-pointer -march=core2 -DNDEBUG
and then typing "make x86_64"

it fails with the following output:

Code:
 make x86_64
gcc -D_FILE_OFFSET_BITS=64 -O3 -fomit-frame-pointer -march=core2 -DNDEBUG  -Wall -W -I. -Iinclude -Ignfs -Ignfs/poly -c -o common/filter/clique.o common/filter/clique.c
In Datei, eingefügt von include/common.h:19,
                 von common/filter/filter.h:23,
                 von common/filter/filter_priv.h:23,
                 von common/filter/clique.c:15:
include/gmp_xface.h:19:17: Fehler: gmp.h: No such file or directory
In file included from include/common.h:19,
                 from common/filter/filter.h:23,
                 from common/filter/filter_priv.h:23,
                 from common/filter/clique.c:15:
include/gmp_xface.h:32: Fehler: expected declaration specifiers or »...« before »mpz_t«
include/gmp_xface.h: In Funktion »mp2gmp«:
include/gmp_xface.h:34: Warnung: Implizite Deklaration der Funktion »mpz_import«
include/gmp_xface.h:34: Fehler: »dest« nicht deklariert (erste Benutzung in dieser Funktion)
include/gmp_xface.h:34: Fehler: (Jeder nicht deklarierte Bezeichner wird nur einmal aufgeführt
include/gmp_xface.h:34: Fehler: für jede Funktion in der er auftritt.)
include/gmp_xface.h: Auf höchster Ebene:
include/gmp_xface.h:39: Fehler: expected »)« before »src«
include/gmp_xface.h:50: Fehler: expected declaration specifiers or »...« before »mpz_t«
include/gmp_xface.h: In Funktion »uint64_2gmp«:
include/gmp_xface.h:57: Warnung: Implizite Deklaration der Funktion »mpz_set_ui«
include/gmp_xface.h:57: Fehler: »dest« nicht deklariert (erste Benutzung in dieser Funktion)
include/gmp_xface.h:58: Warnung: Implizite Deklaration der Funktion »mpz_mul_2exp«
include/gmp_xface.h:59: Warnung: Implizite Deklaration der Funktion »mpz_add_ui«
include/gmp_xface.h: Auf höchster Ebene:
include/gmp_xface.h:64: Fehler: expected declaration specifiers or »...« before »mpz_t«
include/gmp_xface.h: In Funktion »int64_2gmp«:
include/gmp_xface.h:67: Fehler: »dest« nicht deklariert (erste Benutzung in dieser Funktion)
include/gmp_xface.h:67: Fehler: zu viele Argumente für Funktion »uint64_2gmp«
include/gmp_xface.h:68: Warnung: Implizite Deklaration der Funktion »mpz_neg«
include/gmp_xface.h:71: Fehler: zu viele Argumente für Funktion »uint64_2gmp«
include/gmp_xface.h: Auf höchster Ebene:
include/gmp_xface.h:76: Fehler: expected »)« before »src«
include/gmp_xface.h:88: Fehler: expected »)« before »src«
make: *** [common/filter/clique.o] Fehler 1
BTW: Trying to build a binary from SVN181 fails with a very similar output.

Andi47 is offline   Reply With Quote
Old 2010-01-31, 15:42   #2
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

2×3×587 Posts
Default

You have to build and install GMP-ECM first; msieve requires it now.
jasonp is offline   Reply With Quote
Old 2010-01-31, 16:22   #3
Andi47
 
Andi47's Avatar
 
Oct 2004
Austria

2·17·73 Posts
Default

Quote:
Originally Posted by jasonp View Post
You have to build and install GMP-ECM first; msieve requires it now.
I have built GMP-ECM (thus having a binary), but I failed to install it in a way that linux recognizes a "ecm ..." statement instead of "./ecm...".

Is it sufficient to copy the ECM-binary to the msieve directory?
Do I need to "sudo apt get install GMP-ECM"? (the ecm version in the ubuntu repository is quite old...)
Can I somehow set a pointer to the directory where I have "installed" GMP-ECM?


Edit: I have now installed GMP-ECM (6.2.1) using the Synaptics Packet manager and retried to build the msieve SVN183 binary - it fails with the same errors as before.

Last fiddled with by Andi47 on 2010-01-31 at 16:57
Andi47 is offline   Reply With Quote
Old 2010-01-31, 17:27   #4
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

352210 Posts
Default

I'm sorry, I meant installing GMP such that gmp.h is in gcc's include path (note the header file not found error in your original attempt)

Otherwise, msieve has the GMP-ECM library compiled in directly if you run make with ECM=1. In that case you do need GMP-ECM available somewhere.

Last fiddled with by jasonp on 2010-01-31 at 17:28
jasonp is offline   Reply With Quote
Old 2010-01-31, 17:36   #5
Andi47
 
Andi47's Avatar
 
Oct 2004
Austria

1001101100102 Posts
Default

Seems this is the point where I have to give up(?).

Ubuntu 9.04 comes with a version of GMP (I think it is 4.2.1), so it should be available somewhere??

assuming that I find out where gmp.h is hidden: Is there a way to set a pointer to the file, so that "make" finds it?

Edit: Which command line should I use to build the binary? "make x86_64"? Or any additional flags?

Last fiddled with by Andi47 on 2010-01-31 at 17:37 Reason: additional question
Andi47 is offline   Reply With Quote
Old 2010-01-31, 18:48   #6
FactorEyes
 
FactorEyes's Avatar
 
Oct 2006
vomit_frame_pointer

1011010002 Posts
Default

To build gmp, you'll do "make", and then "make check", and, finally, after all those unreadable screens of gibberish, do "make install".

This last one places the libgmp.* files in /usr/local/lib. These are the libraries the msieve build process is looking for.

If it doesn't find them there, try moving them to /usr/lib. I doubt this will be necessary, though.

(If you must move them, be sure to re-point the links as well.)

As for the command line, I use "make x86_64 ECM=1".

Addendum:
Try setting "-march=native" - I think that gcc now makes its own decisions about your architecture.

Last fiddled with by FactorEyes on 2010-01-31 at 19:19
FactorEyes is offline   Reply With Quote
Old 2010-01-31, 20:15   #7
Andi47
 
Andi47's Avatar
 
Oct 2004
Austria

2·17·73 Posts
Default

?????

Ubuntu comes with an installed libgmp3c2 (version 4.2.4) (as I can see in the Synaptics Packet manager) - I just re-installed it (by selecting "re-install" and then "appy" in the Synaptics manager) just to make sure that the installation is not broken.

I don't have (or see? Despite I have selected the option to show hidden files and directories) a /usr/local/lib folder, just /usr/lib, and this one does not contain a gmp_xface.h. I have got a gmp.h file in usr/include.

Seems that msieve doesn't cope with pre-installed versions of gmp?
Andi47 is offline   Reply With Quote
Old 2010-01-31, 22:06   #8
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

2·3·587 Posts
Default

gmp_xface.h is part of msieve (in the 'include' dir)

I don't know why your gcc would not see something in /usr/include; you can move gmp.h into msieve's include directory and it should work, but then you're responsible for keeping it up to date.

Kudos to you for trying to get this to work; you have a lot of freedom when you don't need anyone else to compile stuff for you.

Last fiddled with by jasonp on 2010-01-31 at 22:08
jasonp is offline   Reply With Quote
Old 2010-01-31, 22:43   #9
FactorEyes
 
FactorEyes's Avatar
 
Oct 2006
vomit_frame_pointer

23·32·5 Posts
Default

You might want to download and build gmp yourself. I have had problems with the version provided by default with ubuntu.

Get 4.3.2 here -- ignore 5.0.0 until the compatibility issue with ecm is settled for sure. Just unroll the tarball, go into the gmp-x.x.x directory, then:
  • ./configure
  • make
  • make check
  • make install

It's really nice to have the gmp source on your machine, anyway - you may only ever look at 3% of the code, but it's enlightening to see just what ecm and other things are calling, and how it's implemented.

For some reason, the whole library and include path thing has these glitches on Linux distributions. I feel your pain.

Once a good gmp is on your machine, you can also build gmp-ecm yourself; it might give you an extra burst of speed.
FactorEyes is offline   Reply With Quote
Old 2010-02-01, 05:55   #10
Andi47
 
Andi47's Avatar
 
Oct 2004
Austria

1001101100102 Posts
Default

Quote:
Originally Posted by jasonp View Post
gmp_xface.h is part of msieve (in the 'include' dir)

I don't know why your gcc would not see something in /usr/include; you can move gmp.h into msieve's include directory and it should work, but then you're responsible for keeping it up to date.

Kudos to you for trying to get this to work; you have a lot of freedom when you don't need anyone else to compile stuff for you.
I have now tried to copy gmp.h (from a gmp-4.3.1 I had once installed) into msieve's include directory - it now gives tons of warnings and then crashes again (see attached txt file). (perhaps because I have re-installed libgmp3c2 and therefore might have broken the gmp-4.3.1 installation? or because I had installed 4.3.1 with "install" and not "sudo install"?)

I will try to install gmp-4.3.2 tonight and then retry.
Attached Files
File Type: txt msieve_errors.txt (27.2 KB, 199 views)

Last fiddled with by Andi47 on 2010-02-01 at 05:55
Andi47 is offline   Reply With Quote
Old 2010-02-01, 07:38   #11
henryzz
Just call me Henry
 
henryzz's Avatar
 
"David"
Sep 2007
Cambridge (GMT)

22×5×283 Posts
Default

Quote:
Originally Posted by Andi47 View Post
I have now tried to copy gmp.h (from a gmp-4.3.1 I had once installed) into msieve's include directory - it now gives tons of warnings and then crashes again (see attached txt file). (perhaps because I have re-installed libgmp3c2 and therefore might have broken the gmp-4.3.1 installation? or because I had installed 4.3.1 with "install" and not "sudo install"?)

I will try to install gmp-4.3.2 tonight and then retry.
you need to use "sudo install" i think
henryzz is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Binary Multitasking a1call Lounge 8 2016-12-03 21:20
CUDALucas: which binary to use? Karl M Johnson GPU Computing 15 2015-10-13 04:44
Would you use a 'fat binary' of GMP-ECM? jasonp GMP-ECM 8 2012-02-12 22:25
msieve 1.45 windows binary and GPU (-np)? Andi47 Msieve 1 2010-06-17 04:08
2-d binary representation only_human Miscellaneous Math 9 2009-02-23 00:11

All times are UTC. The time now is 13:10.

Thu May 28 13:10:04 UTC 2020 up 64 days, 10:43, 2 users, load averages: 1.61, 1.54, 1.58

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.

This forum has received and complied with 0 (zero) government requests for information.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation.
A copy of the license is included in the FAQ.