
On 08/17/11 22:25, Maciej BliziĆski wrote:
Hello,
At OpenCSW, we're working on a Solaris port of PPL. Dagobert Michelsen has identified two issues, which are specific to compiling on i386 or amd64. One is that there's a macro called "R1" defined on Solaris, and the second is that an existing version() function (from headers present on Solaris) results in an ambiguity which breaks compilation. Patches are available at [1].
Hi Maciej.
In order to facilitate Solaris users, we would like to make corresponding changes to the versions in our Git repository. Can you please indicate an #if expression that can reliably discriminate the versions of Solaris affected? For example, we would like to have something like
#if defined (__SVR4) && defined (__sun)
// Solaris versions X, Y and Z define R1 in /usr/include/ia32/sys/reg.h. // This conflicts with the use or R1 being made in this proram. # undef R1
#endif // defined (__SVR4) && defined (__sun)
There's one more issue, this time specific to amd64 (i386 compilation completes fine):
/opt/csw/gcc4/bin/g++ -DHAVE_CONFIG_H -I. -I../.. -DBOX_INSTANCE=rt_r_oc -I../../src -I../../src -I../../tests -I../../utils -DNDEBUG=1 -I/opt/csw/include -g -O2 -frounding-math -O2 -pipe -m64 -march=opteron -W -Wall -MT max_min1.o -MD -MP -MF .deps/max_min1.Tpo -c -o max_min1.o max_min1.cc interval1.cc: In function 'bool<unnamed>::test01() [with F = float]': interval1.cc:195: instantiated from here interval1.cc:77: error: no matching function for call to 'Parma_Polyhedra_Library::Interval<float, Parma_Polyhedra_Library::Interval_Restriction_None<Parma_Polyhedra_Library::Interval_Info_Bitset<unsigned int,<unnamed>::My_Interval<float>::Floating_Point_Real_Interval_Info_Policy>
::join_assign(double)'
interval1.cc:195: instantiated from here interval1.cc:90: error: no matching function for call to 'Parma_Polyhedra_Library::Interval<float, Parma_Polyhedra_Library::Interval_Restriction_None<Parma_Polyhedra_Library::Interval_Info_Bitset<unsigned int,<unnamed>::My_Interval<float>::Floating_Point_Real_Interval_Info_Policy>
::is_disjoint_from(double)'
interval1.cc:90: error: no matching function for call to 'Parma_Polyhedra_Library::Interval<float, Parma_Polyhedra_Library::Interval_Restriction_None<Parma_Polyhedra_Library::Interval_Info_Bitset<unsigned int,<unnamed>::My_Interval<float>::Floating_Point_Real_Interval_Info_Policy>
::is_disjoint_from(double)'
../../src/Interval.defs.hh: In constructor 'Parma_Polyhedra_Library::Interval<Boundary, Info>::Interval(const T&) [with T = double, Boundary = float, Info = Parma_Polyhedra_Library::Interval_Restriction_None<Parma_Polyhedra_Library::Interval_Info_Bitset<unsigned int,<unnamed>::My_Interval<float>::Floating_Point_Real_Interval_Info_Policy>
]':
interval1.cc:76: instantiated from 'bool<unnamed>::test01() [with F = float]' interval1.cc:195: instantiated from here ../../src/Interval.defs.hh:657: error: no matching function for call to 'Parma_Polyhedra_Library::Interval<float, Parma_Polyhedra_Library::Interval_Restriction_None<Parma_Polyhedra_Library::Interval_Info_Bitset<unsigned int,<unnamed>::My_Interval<float>::Floating_Point_Real_Interval_Info_Policy>
::assign(const double&)'
../../src/Interval.defs.hh:374: note: candidates are: Parma_Polyhedra_Library::I_Result Parma_Polyhedra_Library::Interval<Boundary, Info>::assign(Parma_Polyhedra_Library::Degenerate_Element) [with Boundary = float, Info = Parma_Polyhedra_Library::Interval_Restriction_None<Parma_Polyhedra_Library::Interval_Info_Bitset<unsigned int,<unnamed>::My_Interval<float>::Floating_Point_Real_Interval_Info_Policy>
]
gmake[4]: *** [interval1.o] Error 1 gmake[4]: *** Waiting for unfinished jobs.... mv -f .deps/generalizedaffinepreimage1.Tpo .deps/generalizedaffinepreimage1.Po mv -f .deps/limitedcc76extrapolation1.Tpo .deps/limitedcc76extrapolation1.Po mv -f .deps/max_min1.Tpo .deps/max_min1.Po mv -f .deps/mapspacedims1.Tpo .deps/mapspacedims1.Po gmake[4]: Leaving directory `/home/maciej/src/opencsw/pkg/ppl/trunk/work/solaris9-i386/build-isa-amd64/ppl-0.11.2/tests/Box'
The compiler version is: maciej@unstable10x [unstable10x]:~> /opt/csw/gcc4/bin/g++ --version g++ (GCC) 4.3.3 Copyright (C) 2008 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.
Do you have any advice regarding this issue?
One thing you could do is to compare the files config.log, config.h (created by configure) and ppl-config.h (created by make) obtained for amd64 and for i386. Perhaps the difference there may pinpoint the problem. Success,
Roberto