On Tue, Apr 21, 2009 at 10:19 AM, Jason Moxham <ja...@njkfrudils.plus.com> wrote:
> This is getting stranger , jeff1.c is or perhaps I should say supposed to be > exactly the same same as mpir generated {dummy}32.c > > Can you a diff for us This does not make any sense. You are right the only difference is that you added /* version 1 */ to the top of jeff1.c. Even when I add that line to dummy-278832.c making it identical it fails for that file but not for jeff1.c. [je...@tope mpir-1.1]$ md5sum dummy-278832.c jeff1.c 885509cb2c8cdf8904757c65718605ff dummy-278832.c 885509cb2c8cdf8904757c65718605ff jeff1.c [je...@tope mpir-1.1]$ cc dummy-278832.s jeff1.c -o test2 jeff1.c:9: warning: return type defaults to ‘int’ jeff1.c: In function ‘main’: jeff1.c:27: warning: implicit declaration of function ‘cpuid’ jeff1.c:42: warning: implicit declaration of function ‘strcmp’ jeff1.c:119: warning: implicit declaration of function ‘printf’ jeff1.c:119: warning: incompatible implicit declaration of built-in function ‘printf’ [je...@tope mpir-1.1]$ cc dummy-278832.s dummy-278832.c -o test2 dummy-278832.c:9: warning: return type defaults to ‘int’ dummy-278832.c: In function ‘main’: dummy-278832.c:27: warning: implicit declaration of function ‘cpuid’ dummy-278832.c:42: warning: implicit declaration of function ‘strcmp’ dummy-278832.c:119: warning: implicit declaration of function ‘printf’ dummy-278832.c:119: warning: incompatible implicit declaration of built-in function ‘printf’ /tmp/cco.v1c9C5: In function `main': /work/jeffg/mpir-1.1/dummy-278832.c:9: multiple definition of `main' /tmp/cco.v1c9C5:/work/jeffg/mpir-1.1/dummy-278832.c:9: first defined here /tmp/cco.v1c9C5: In function `main': (.text+0x5b): undefined reference to `cpuid' /tmp/cco.v1c9C5: In function `main': (.text+0x76): undefined reference to `cpuid' /tmp/cco.v1c9C5: In function `main': (.text+0x5b): undefined reference to `cpuid' /tmp/cco.v1c9C5: In function `main': (.text+0x76): undefined reference to `cpuid' collect2: ld returned 1 exit status Ah, I have something. For some reason if the .s file and the .c file have the same name it fails, if they are different it works. That is why the file from gmp and jeff1 worked because config.guess was still using the dumy-$ value so different names. If I try: [je...@tope mpir-1.1]$ cc jeff1.s jeff1.c -o test2 jeff1.c:9: warning: return type defaults to ‘int’ jeff1.c: In function ‘main’: jeff1.c:27: warning: implicit declaration of function ‘cpuid’ jeff1.c:42: warning: implicit declaration of function ‘strcmp’ jeff1.c:119: warning: implicit declaration of function ‘printf’ jeff1.c:119: warning: incompatible implicit declaration of built-in function ‘printf’ /tmp/cco.HDcIhW: In function `main': /work/jeffg/mpir-1.1/jeff1.c:9: multiple definition of `main' /tmp/cco.HDcIhW:/work/jeffg/mpir-1.1/jeff1.c:9: first defined here /tmp/cco.HDcIhW: In function `main': (.text+0x5b): undefined reference to `cpuid' /tmp/cco.HDcIhW: In function `main': (.text+0x76): undefined reference to `cpuid' /tmp/cco.HDcIhW: In function `main': (.text+0x5b): undefined reference to `cpuid' /tmp/cco.HDcIhW: In function `main': (.text+0x76): undefined reference to `cpuid' collect2: ld returned 1 exit status You can see it fails. So for some reason using the same name is bad. GMP 4.3.0 uses different names they use 0.s or 1.s and 2.c, maybe they have encountered this problem before. So to fix this problem you would need to change config.guess to use something like: dummy-278832.c dummy-2788320.s dummy-278864.c dummy-2788640.s instead of the same filename. Jeff. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---