mersenneforum.org  

Go Back   mersenneforum.org > Factoring Projects > Msieve

Reply
 
Thread Tools
Old 2010-02-21, 11:05   #1
chris2be8
 
chris2be8's Avatar
 
Sep 2009

111110000112 Posts
Default Problem compiling msieve with gcc 4.4.2

Hello,

Trying to install msieve on a system with gcc 4.4.2 I get the following written to stderr:
Code:
common/smallfact/gmp_ecm.c: In function ‘ecm_pp1_pm1’:
common/smallfact/gmp_ecm.c:26: warning: unused parameter ‘n’
common/smallfact/gmp_ecm.c:26: warning: unused parameter ‘reduced_n’
common/smallfact/gmp_ecm.c:27: warning: unused parameter ‘factor_list’
gnfs/ffpoly.c: In function ‘get_zeros_rec’:
gnfs/ffpoly.c:588: warning: ‘g’ may be used uninitialized in this function
ar: creating libmsieve.a
libmsieve.a(sieve.qo): In function `do_sieving':
sieve.c:(.text+0x1025): undefined reference to `qs_core_sieve_p2_64k'
sieve.c:(.text+0x20ee): undefined reference to `qs_core_sieve_p3_64k'
sieve.c:(.text+0x214f): undefined reference to `qs_core_sieve_pm_32k'
sieve.c:(.text+0x2359): undefined reference to `qs_core_sieve_k7_64k'
sieve.c:(.text+0x23e8): undefined reference to `qs_core_sieve_k7xp_64k'
collect2: ld returned 1 exit status
make: *** [x86_64] Error 1
I managed to get round it by editing sieve.c and deleting the lines that referred to those names:
Code:
 108,116c108
<       if (obj->cpu == cpu_pentium2 && sieve_block_size == 65536) {
<               logprintf(obj, &quot;using 64kb Pentium 2 sieve core\n&quot;);
<               core_sieve_fcn = qs_core_sieve_p2_64k;
<       }
<       else if (obj->cpu == cpu_pentium3 && sieve_block_size == 65536) {
<               logprintf(obj, &quot;using 64kb Pentium 3 sieve core\n&quot;);
<               core_sieve_fcn = qs_core_sieve_p3_64k;
<       }
<       else if (obj->cpu == cpu_pentium4 && sieve_block_size == 65536) {
---
>       if (obj->cpu == cpu_pentium4 && sieve_block_size == 65536) {
120,123d111
<       else if (obj->cpu == cpu_pentium_m && sieve_block_size == 32768) {
<               logprintf(obj, &quot;using 32kb Pentium M sieve core\n&quot;);
<               core_sieve_fcn = qs_core_sieve_pm_32k;
<       }
128,135d115
<       else if (obj->cpu == cpu_athlon && sieve_block_size == 65536) {
<               logprintf(obj, &quot;using 64kb Athlon sieve core\n&quot;);
<               core_sieve_fcn = qs_core_sieve_k7_64k;
<       }
<       else if (obj->cpu == cpu_athlon_xp && sieve_block_size == 65536) {
<               logprintf(obj, &quot;using 64kb Athlon XP sieve core\n&quot;);
<               core_sieve_fcn = qs_core_sieve_k7xp_64k;
<       }
Background info:
Code:
 $ gcc --version
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ uname -a
Linux localhost.localdomain 2.6.31.5-127.fc12.i686.PAE #1 SMP Sat Nov 7 21:25:57 EST 2009 i686 i686 i386 GNU/Linux

$ cat /etc/redhat-release
Fedora release 12 (Constantine)

Chris K
chris2be8 is offline   Reply With Quote
Old 2010-02-21, 14:22   #2
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

2×3×19×31 Posts
Default

Did you build using 'make x86_64' and then try to rebuild using 'make x86'? My first thought is that the different make targets depend on different sets of files, and the makefile does not know that object files depending on the old files need to be rebuilt.

When switching make targets, you have to 'make clean' first. Does that fix anything?
jasonp is offline   Reply With Quote
Old 2010-02-21, 21:32   #3
chris2be8
 
chris2be8's Avatar
 
Sep 2009

37038 Posts
Default

No, in the test above I did &quot;make&quot; which got messages saying choose a target, then &quot;make x86_64&quot; which failed as above.

I've just done a test:
rm -r msieve-1.44
tar xvf factoring\ tools/msieve144.tar.gz
cd msieve-1.44
make x86_64

And got the same set of error messages.

Chris K

PS. I forgot to say in the first post that I've tried msieve 1.4.1, 1.4.2 and 1.4.3 as well as 1.4.4 (every version I have downloaded) and got the same error for them all.

Last fiddled with by chris2be8 on 2010-02-21 at 21:35
chris2be8 is offline   Reply With Quote
Old 2010-02-21, 22:07   #4
jasonp
Tribal Bullet
 
jasonp's Avatar
 
Oct 2004

2×3×19×31 Posts
Default

Your uname output says you're running 32-bit x86; using the x86_64 make target will ignore 32-bit x86 functions and build only 64-bit ones. You should be using 'make x86'.
jasonp is offline   Reply With Quote
Old 2010-02-22, 17:41   #5
chris2be8
 
chris2be8's Avatar
 
Sep 2009

1,987 Posts
Default

You're right, make x86 works.

The next problem is to work out why installing off the DVD I used put a 32 bit Linux onto it without telling me I was installing a 32 bit OS on 64 bit hardware. But that's not your issue.

Chris K

Last fiddled with by chris2be8 on 2010-02-22 at 18:01
chris2be8 is offline   Reply With Quote
Old 2010-02-22, 18:35   #6
debrouxl
 
debrouxl's Avatar
 
Sep 2009

977 Posts
Default

Installing a 32-bit OS on a 64-bit-capable processor Just Works (TM): for backwards compatibility, the processor does not start in 64-bit mode, AFAIK.
I have never come across a distro whose installer contains a dialog like
"I have detected that your hardware is 64-bit-capable, but this is the 32-bit version.
64-bit will get you better performance, but some badly coded programs [you'd have to compile them yourself, our repositories are <supposed to be> clean] will not work properly.
Do you want to stop the install process now and get a chance to obtain <somehow> a 64-bit copy ?"


BTW: you may end up with a cleaner install (that is, less stuff that you don't need and duplicate stuff) if you install from either the Gnome install CD or the KDE install CD, both of which have a more restricted package set.
debrouxl is offline   Reply With Quote
Reply

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling Msieve with GPU support LegionMammal978 Msieve 6 2017-02-09 04:28
Problem compiling latest SVN ATH GMP-ECM 2 2011-06-23 07:27
Error compiling msieve Wishper Msieve 2 2009-12-09 01:31
msieve linux compiling Trevil Msieve 2 2009-12-06 19:49
Compiling Msieve 1.39 on Windows Jeff Gilchrist Msieve 20 2009-02-21 22:43

All times are UTC. The time now is 22:38.

Tue Jan 26 22:38:09 UTC 2021 up 54 days, 18:49, 0 users, load averages: 2.99, 2.43, 2.53

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, 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.