Re: [PPL-devel] building ppl under cygwin

Jagasia, Harsha wrote:
I am using gcc 4.0.3 and ppl 10 as you suggested, but still no cigar under Cygwin.
I used gcc 4.0.3 to build gmp, configured with "./configure --prefix=/tmp/usr --enable-cxx" This gmp was installed in a different location "/tmp/usr" from the gmp that I needed to build gcc 4.0.3.
I then tried to build ppl also using gcc 4.0.3.
The configure was done, excerpt as below: checking how to link with libgmp... /tmp/usr/lib/libgmp.a checking how to link with libgmpxx... /tmp/usr/lib/libgmpxx.a /tmp/usr/lib/libgmp.a checking for the GMP library version 4.1.3 or above... yes checking for mp_limb_t... yes checking size of mp_limb_t... 4 checking whether GMP has been compiled with support for exceptions... yes checking for __mpz_struct._mp_alloc... yes checking for __mpz_struct._mp_size... yes checking for __mpz_struct._mp_d... yes
The ppl was downloaded from the graphite wiki. It is ppl-0.10pre24. I get errors when trying to build ppl, see the attached file.
Do I need to explicitly use some options to build a dynamic gmp library? Thoughts?
Dear Harsha,
I have spent the day trying to reproduce the problem you are reporting, and I have succeeded. I have no idea how to build a dynamic GMP library: you should ask a Cygwin expert (which I am not). I don't even know if dynamic linking is supported in Cygwin (notice that the GMP binary package for Cygwin does not seem to include a dynamically loadable library).
So, in order to build the PPL, I simply configured it (the PPL) using the --disable-shared option. Compilation of the library succeeds, but `make check' suffers from limitations of Cygwin combined with limitations of GCC 4.0.x. I have already fixed two of them in the CVS version (see my last two commits). Overnight I will run `make check' again to see if there are additional issues. All the best,
Roberto
P.S. Please direct all the PPL-related messages to ppl-devel@cs.unipr.it, not to my personal address.
P.P.S. If you investigate further the issue of GMP shared libraries under Cygwin, please let me know: unless there are objection, I will make --disable-shared the default under Cygwin.

Roberto Bagnara wrote:
I don't even know if dynamic linking is supported in Cygwin (notice that the GMP binary package for Cygwin does not seem to include a dynamically loadable library).
After more time on Cygwin, I can say I was wrong. The GMP binary package for Cygwin is indeed shipped with a dynamically loadable library. They produce it with the GMP configure options
--enable-fat --enable-mpsd --enable-cxx --disable-static --enable-shared
To that I have added
--prefix=/usr/local
and I was able to build the PPL under Cygwin by configuring it with only the
--with-libgmp-prefix=/usr/local
option (i.e., no need to specify --disable-shared).
The good news end here. Now the bad ones. A `make check' under Cygwin will fail if you use GCC 4.0.3 (or even GCC 4.0.4). I think this is a miscompilation due to excessive optimization of floating point operations of the kind of the one reported in
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21067
For comparison, I have checked with GCC 4.3.1 and `make check' passes for CVS HEAD. Notice that this miscompilation should not affect CLooG in any way, as it manifests itself only in the Box numerical abstraction instantiated with a floating point type (and this has nothing to do with the C_Polyhedron abstraction used by CLooG). All the best,
Roberto
participants (1)
-
Roberto Bagnara