[MacPorts] #59876: ImageMagick @6.9.10-80 does not build on PPC Tiger, Mac OS X 10.4.11, because 'MagickAddressType' undeclared

MacPorts noreply at macports.org
Mon Dec 23 14:28:24 UTC 2019


#59876: ImageMagick @6.9.10-80 does not build on PPC Tiger, Mac OS X 10.4.11,
because 'MagickAddressType' undeclared
--------------------------+------------------------
  Reporter:  ballapete    |      Owner:  ryandesign
      Type:  defect       |     Status:  accepted
  Priority:  Normal       |  Milestone:
 Component:  ports        |    Version:  2.6.2
Resolution:               |   Keywords:  tiger
      Port:  ImageMagick  |
--------------------------+------------------------

Comment (by ballapete):

 Replying to [comment:1 ryandesign]:

 The problem is that `configure` cannot determine any of these pre-defined
 methods:

 {{{
   234
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
   235   %
   236   %  AcquireAlignedMemory() returns a pointer to a block of memory
 whose size is
   237   %  at least (count*quantum) bytes, and whose address is aligned on
 a cache line.
   238   %
   239   %  The format of the AcquireAlignedMemory method is:
   240   %
   241   %      void *AcquireAlignedMemory(const size_t count,const size_t
 quantum)
   242   %
   243   %  A description of each parameter follows:
   244   %
   245   %    o count: the number of objects to allocate contiguously.
   246   %
   247   %    o quantum: the size (in bytes) of each object.
   248   %
   249   */
   250   #if MAGICKCORE_HAVE_STDC_ALIGNED_ALLOC
   251   #define AcquireAlignedMemory_Actual AcquireAlignedMemory_STDC
   252   static inline void *AcquireAlignedMemory_STDC(const size_t size)
   253   {
   254     size_t
   255       extent = CACHE_ALIGNED(size);
   256
   257     if (extent < size)
   258       {
   259         errno=ENOMEM;
   260         return(NULL);
   261       }
   262     return(aligned_alloc(CACHE_LINE_SIZE,extent));
   263   }
   264   #elif defined(MAGICKCORE_HAVE_POSIX_MEMALIGN)
   265   #define AcquireAlignedMemory_Actual AcquireAlignedMemory_POSIX
   266   static inline void *AcquireAlignedMemory_POSIX(const size_t size)
   267   {
   268     void
   269       *memory;
   270
   271     if (posix_memalign(&memory,CACHE_LINE_SIZE,size))
   272       return(NULL);
   273     return(memory);
   274   }
   275   #elif defined(MAGICKCORE_HAVE__ALIGNED_MALLOC)
   276   #define AcquireAlignedMemory_Actual AcquireAlignedMemory_WinAPI
   277   static inline void *AcquireAlignedMemory_WinAPI(const size_t size)
   278   {
   279     return(_aligned_malloc(size,CACHE_LINE_SIZE));
   280   }
   281   #else
   282   #define ALIGNMENT_OVERHEAD \
   283     (MAGICKCORE_MAX_ALIGNMENT_PADDING(CACHE_LINE_SIZE) +
 MAGICKCORE_SIZEOF_VOID_P)
   284   static inline void *reserve_space_for_actual_base_address(void
 *const p)
   285   {
   286     return((void **) p+1);
   287   }
   288
   289   static inline void **pointer_to_space_for_actual_base_address(void
 *const p)
   290   {
   291     return((void **) p-1);
   292   }
   293
   294   static inline void *actual_base_address(void *const p)
   295   {
   296     return(*pointer_to_space_for_actual_base_address(p));
   297   }
   298
   299   static inline void *align_to_cache(void *const p)
   300   {
   301     return((void *) CACHE_ALIGNED((MagickAddressType) p));
   302   }
   303
   304   static inline void *adjust(void *const p)
   305   {
   306
 return(align_to_cache(reserve_space_for_actual_base_address(p)));
   307   }
   308
   309   #define AcquireAlignedMemory_Actual AcquireAlignedMemory_Generic
   310   static inline void *AcquireAlignedMemory_Generic(const size_t
 size)
   311   {
   312     size_t
   313       extent;
   314
   315     void
   316       *memory,
   317       *p;
   318
   319     #if SIZE_MAX < ALIGNMENT_OVERHEAD
   320       #error "CACHE_LINE_SIZE is way too big."
   321     #endif
   322     extent=(size + ALIGNMENT_OVERHEAD);
   323     if (extent <= size)
   324       {
   325         errno=ENOMEM;
   326         return(NULL);
   327       }
   328     p=AcquireMagickMemory(extent);
   329     if (p == NULL)
   330       return(NULL);
   331     memory=adjust(p);
   332     *pointer_to_space_for_actual_base_address(memory)=p;
   333     return(memory);
   334   }
   335   #endif
 }}}

 So the final `#else` alternative is hit to perform memory management by
 foot. And here the type 'MagickAddressType' is not defined…

-- 
Ticket URL: <https://trac.macports.org/ticket/59876#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list