mersenneforum.org Packaging Mlucas for Debian
 Register FAQ Search Today's Posts Mark Forums Read

 2015-05-25, 02:30 #2 Dubslow Basketry That Evening!     "Bunslow the Bold" Jun 2011 40
 2015-05-26, 00:20 #3 ewmayer ∂2ω=0     Sep 2002 República de California 2×3×11×149 Posts Thanks -- done.
 2015-05-28, 02:02 #4 ewmayer ∂2ω=0     Sep 2002 República de California 983410 Posts Next issue: Alex reports having more-or-less blanket compile-error issues in his attempts to build the code in 32-bit mode (which I routinely do successfully on my old Core-duo based macbook using gcc) on a 64-bit debian system. I tried same on on debian (v6) haswell quad just now and confirmed - using 'gcc -c -m32 -Os *.c', all sources except for the tiny types.c file fail with /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory =============== Edit: Web-search gives (among other things) this stackoverflow thread which fingers a missing 32 bit libc dev package: On Ubuntu it's called libc6-dev-i386 - do sudo apt-get install libc6-dev-i386. See below for extra instructions for Ubuntu 12.04. Alex, that works for me - please give it a try. (Under debian you'll want to omit the 'sudo' and install as root instead.) Last fiddled with by ewmayer on 2015-05-28 at 04:51
2015-05-28, 04:23   #5
alexvong1995

Dec 2014

458 Posts

Quote:
 Originally Posted by ewmayer Next issue: Alex reports having more-or-less blanket compile-error issues in his attempts to build the code in 32-bit mode (which I routinely do successfully on my old Core-duo based macbook using gcc) on a 64-bit debian system. I tried same on on debian (v6) haswell quad just now and confirmed - using 'gcc -c -m32 -Os *.c', all sources except for the tiny types.c file fail with /usr/include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or directory
I would like to know if you are using the original 14.1 source code or the latest version with modifications you have sent to me? If it is the original 14.1 source code, then I get
Code:
Mlucas.o: In function Mlucas_init':
Mlucas.c:(.text+0x63): undefined reference to test_fft_radixtables'
Mlucas.c:(.text+0xcc): undefined reference to get_fft_radices'
Mlucas.c:(.text+0x10f): undefined reference to given_N_get_maxP'
Mlucas.o: In function ernstMain':
Mlucas.c:(.text+0x3b51): undefined reference to get_default_fft_length'
Mlucas.c:(.text+0x3b78): undefined reference to given_N_get_maxP'
Mlucas.c:(.text+0x41c3): undefined reference to get_default_fft_length'
Mlucas.c:(.text+0x4231): undefined reference to get_fft_radices'
Mlucas.c:(.text+0x43ac): undefined reference to get_fft_radices'
Mlucas.c:(.text+0x4579): undefined reference to get_default_fft_length'
Mlucas.c:(.text+0x4590): undefined reference to given_N_get_maxP'
Mlucas.c:(.text+0x45b0): undefined reference to get_nextlarger_fft_length'
Mlucas.c:(.text+0x5288): undefined reference to get_nextlarger_fft_length'
Mlucas.o: In function main':
Mlucas.c:(.text.startup+0x586b): undefined reference to get_fft_radices'
Mlucas.c:(.text.startup+0x6222): undefined reference to get_fft_radices'
Mlucas.c:(.text.startup+0x6a8a): undefined reference to given_N_get_maxP'
Mlucas.c:(.text.startup+0x6b31): undefined reference to get_default_fft_length'
Mlucas.c:(.text.startup+0x76cf): undefined reference to get_fft_radices'
gcd_lehmer.o: In function gcd_init':
gcd_lehmer.c:(.text+0xe): undefined reference to test_fft_radixtables'
gcd_lehmer.c:(.text+0xaf): undefined reference to get_fft_radices'
gcd_lehmer.c:(.text+0xec): undefined reference to given_N_get_maxP'
mers_mod_square.o: In function mers_mod_square':
mers_mod_square.c:(.text+0x4341): undefined reference to radix176_dif_pass1'
mers_mod_square.c:(.text+0x58a3): undefined reference to radix176_ditN_cy_dif1'
mers_mod_square.c:(.text+0x63a2): undefined reference to radix176_dit_pass1'
pairFFT_mul.o: In function pairFFT_mul':
pairFFT_mul.c:(.text+0x531): undefined reference to get_fft_radices'
collect2: error: ld returned 1 exit status
after compile and linking with gcc -c -m32 -Os *.c' and gcc -o mlucas -m32 *.o -lm'

These compilation errors are fixed in the modifications you have sent to me although the compiled program doesn't pass the self-test, which I will elaborate more later.

So it seems we have received different errors in single-threaded build. I will also look into multi-threaded build later.

 2015-05-28, 04:56 #6 ewmayer ∂2ω=0     Sep 2002 República de California 100110011010102 Posts Alex, your post overlapped some edits to my above one which I had queued up but delayed as a result of having to step away from my desk for a while. Based on your note it looks like your 32-bit issue differs from mine. (I am using the unmodified 14.1 source for these packaging-related builds, unless specifically noted.) Your linker errors suggest that you did not compile get_fft_radices.c successfully - do you see a get_fft_radices.o file? If not, try compiling just that source and let me know what error(s) you get.
 2015-05-28, 05:43 #7 ewmayer ∂2ω=0     Sep 2002 República de California 2·3·11·149 Posts Alex, I only did a quick 1-file compile test to check the 32-bit libc install at first, then fired up a full build. Indeed get_fft_radices.c gives a compile error - it's the duplicate-case-value bug you found in your unthreaded non-SSE2 64-bit build. Use the patched version of that file - looks like you'll also need the scalar-mode build patches in the radix44*c and radix176*c files I sent. You might as well use the scalar-build patched mers_mod_square.c file as well. Oh - not sure what link args you're using but I needed to insert '-m32' between the 'gcc' and '-o' in my 32-bit link step, since this is a 64-bit system. Last fiddled with by ewmayer on 2015-05-28 at 05:45
2015-05-28, 06:14   #8
alexvong1995

Dec 2014

37 Posts

Quote:
 Originally Posted by ewmayer Alex, I only did a quick 1-file compile test to check the 32-bit libc install at first, then fired up a full build. Indeed get_fft_radices.c gives a compile error - it's the duplicate-case-value bug you found in your unthreaded non-SSE2 64-bit build. Use the patched version of that file - looks like you'll also need the scalar-mode build patches in the radix44*c and radix176*c files I sent. You might as well use the scalar-build patched mers_mod_square.c file as well. Oh - not sure what link args you're using but I needed to insert '-m32' between the 'gcc' and '-o' in my 32-bit link step, since this is a 64-bit system.
Awww. It seems I have confused you. The duplicate-case-value bug and the other 3 are actually found when I was doing unthreaded non-SSE2 32-bit build, not a 64-bit one. I found them because the compiler complained about them. I don't try to build unthreaded non-SSE2 64-bit build because all 64-bit processors should at least have SSE2 (It seems Wikipedia confirms that?). So I am now trying to do unthreaded non-SSE2 32-bit build and multithreaded SSE2/AVX/AVX2 64-bit build. Actually, I want multithread build in both cases but 4 source files failed to build in the 32-bit case. Hmmm I should look into it later.

Regarding libc6-dev-i386. Yes, it seems I have installed it previously. Maybe I was trying to build something that I can't remember right now. Good it solves your problem.
And yes we need `-m32' to build 32-bit binary in every step or the compiler would get upset.

 Similar Threads Thread Thread Starter Forum Replies Last Post Xyzzy Linux 12 2017-06-19 04:15 alexvong1995 Linux 3 2015-05-13 12:49 LaurV Linux 10 2015-04-24 15:39 ET_ Linux 4 2007-03-13 20:41 Matt Linux 1 2007-02-22 22:36

All times are UTC. The time now is 17:54.

Sun Nov 29 17:54:22 UTC 2020 up 80 days, 15:05, 4 users, load averages: 1.62, 1.92, 1.88