Hello list,
I've taken to package IlmBase and OpenEXR on Solaris 10, both sparc and x86.
I've met two simple issues that I could work around, see the attached
patches.
For IlmBase:
0002_avoid_cpu_opt_on_sparc.patch
./configure detects <ucontext.h>, which exists, but its use in OpenEXR's
source is not compatible (elements don't exist at all on Sparc, and are
apparently different on x86). I just added a condition to avoid that
block on Solaris even if ucontext is found. It might be better to check
its usability in configure?
For OpenEXR:
0003_no_posix_memalign.patch
posix_memalign() does not exist on Solaris 10, this is the equivalent
I've found floating around. Here too, it'd probably be better to check
for it. I don't know enough about autoconf...
Cheers,
Laurent
--- a/IexMath/IexMathFpu.cpp Sat Aug 10 10:59:31 2013
+++ b/IexMath/IexMathFpu.cpp Sat Aug 10 11:03:14 2013
@@ -53,7 +53,7 @@
#endif
-#ifdef HAVE_UCONTEXT_H
+#if defined(HAVE_UCONTEXT_H) && !defined (__sun)
#include <ucontext.h>
--- a/IlmImf/ImfSystemSpecific.h Tue Jun 18 21:51:39 2013
+++ b/IlmImf/ImfSystemSpecific.h Mon Aug 12 00:39:35 2013
@@ -61,8 +61,13 @@
static void* EXRAllocAligned(size_t size, size_t alignment)
{
void* ptr = 0;
+#if !defined(__sun)
posix_memalign(&ptr, alignment, size);
return ptr;
+#else
+// Solaris 10 doesn't have posix_memalign()
+ return memalign(alignment, size);
+#endif
}
_______________________________________________
Openexr-devel mailing list
Openexr-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/openexr-devel