[PPL-devel] PPL for Mac

Swarat Chaudhuri swarat.chaudhuri at gmail.com
Sun Sep 7 23:48:39 CEST 2008


Ah, ok. Just so you know, I tried to compile the test program and it
returned:
ld warning: in /usr/local/lib/libgmpxx.dylib, file is not of required
architecture
ld warning: in /usr/local/lib/libgmp.dylib, file is not of required
architecture
Undefined symbols:
  "___gmpz_clear", referenced from:
      _main in ccUVsrq5.o
      _main in ccUVsrq5.o
  "___gmpz_init_set_str", referenced from:
      _main in ccUVsrq5.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

This is a bit strange, as I compiled libgmp from source and it seemed to go
fine. But thanks, I'll post on the libgmp message board and try to find out.

Best,
Swarat



On Sun, Sep 7, 2008 at 1:55 PM, Roberto Bagnara <bagnara at cs.unipr.it> wrote:

> Swarat Chaudhuri wrote:
>
>> Thanks so much for the help. Please scroll below for the content of the
>> file.
>>
>
> Hi Swarat,
>
> the comfig.log you sent suggests that there is something wrong
> with your installation of GMP.  See the lines:
>
> ld warning: in /usr/local/lib/libgmpxx.dylib, file is not of required
> architecture
> ld warning: in /usr/local/lib/libgmp.dylib, file is not of required
> architecture
> Undefined symbols:
>  "___gmpz_clear", referenced from:
>      _main in ccxmmb5n.o
>      _main in ccxmmb5n.o
>  "___gmpz_init_set_str", referenced from:
>      _main in ccxmmb5n.o
> ld: symbol(s) not found
>
> I suggest we come back to the problem of building the PPL when
> you have been able to compile the file test_gmp.cc, whose
> contents is
>
> #include <gmpxx.h>
>
> #if __GNU_MP_VERSION < 4 || (__GNU_MP_VERSION == 4 &&
> __GNU_MP_VERSION_MINOR < 1) || (__GNU_MP_VERSION == 4 &&
> __GNU_MP_VERSION_MINOR == 1 && __GNU_MP_VERSION_PATCHLEVEL < 3)
> #error "GMP version 4.1.3 or higher is required"
> #endif
>
> int main() {
>  mpz_class n("3141592653589793238462643383279502884");
>  return 0;
> }
>
> with the compilation command
>
> $ g++ -o test_gmp -g -O2 test_gmp.cc -lgmpxx -lgmp
>
> and this program runs
>
> $ ./test_gmp && echo "Yes!"
>
> We don't have access to any Mac, so I am afraid we cannot
> advise about how to fix your GMP installation.
> Good luck,
>
>
>   Roberto
>
> --
> Prof. Roberto Bagnara
> Computer Science Group
> Department of Mathematics, University of Parma, Italy
> http://www.cs.unipr.it/~bagnara/
> mailto:bagnara at cs.unipr.it
>



More information about the PPL-devel mailing list