Opened 5 years ago

Closed 2 years ago

#59876 closed defect (fixed)

ImageMagick @6.9.10-80 does not build on PPC Tiger, Mac OS X 10.4.11, because 'MagickAddressType' undeclared

Reported by: ballapete (Peter "Pete" Dyballa) Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.6.2
Keywords: tiger Cc:
Port: ImageMagick

Description

/bin/sh ./libtool  --tag=CC   --mode=compile /opt/local/bin/gcc-apple-4.2 -std=gnu99 -std=gnu99 -DHAVE_CONFIG_H -I. -I./config  -I. -I.  -I/opt/local/include -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16   -I/opt/local/include/libxml2   -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/ossp -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -D_REENTRANT -I/opt/local/include/librsvg-2.0 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/ossp -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include/libraw -I/opt/local/include/libpng16  -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/ossp -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -D_THREAD_SAFE -I/opt/local/include/OpenEXR  -I/opt/local/include/openjpeg-2.3   -I/opt/local/include/graphviz -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include/ossp -I/opt/local/include/freetype2 -I/opt/local/include/libpng16      -pipe -Os -arch ppc -Wall -fexceptions -D_FORTIFY_SOURCE=0 -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -MT magick/libMagickCore_6_Q16_la-memory.lo -MD -MP -MF magick/.deps/libMagickCore_6_Q16_la-memory.Tpo -c -o magick/libMagickCore_6_Q16_la-memory.lo `test -f 'magick/memory.c' || echo './'`magick/memory.c
libtool: compile:  /opt/local/bin/gcc-apple-4.2 -std=gnu99 -std=gnu99 -DHAVE_CONFIG_H -I. -I./config -I. -I. -I/opt/local/include -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/opt/local/include/libxml2 -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/ossp -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -D_REENTRANT -I/opt/local/include/librsvg-2.0 -I/opt/local/include/gdk-pixbuf-2.0 -I/opt/local/include/libpng16 -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/ossp -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include/libraw -I/opt/local/include/libpng16 -I/opt/local/include/pango-1.0 -I/opt/local/include/harfbuzz -I/opt/local/include/pango-1.0 -I/opt/local/include/fribidi -I/opt/local/include/cairo -I/opt/local/include/glib-2.0 -I/opt/local/lib/glib-2.0/include -I/opt/local/include/pixman-1 -I/opt/local/include/ossp -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -D_THREAD_SAFE -I/opt/local/include/OpenEXR -I/opt/local/include/openjpeg-2.3 -I/opt/local/include/graphviz -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -I/opt/local/include/ossp -I/opt/local/include/freetype2 -I/opt/local/include/libpng16 -pipe -Os -arch ppc -Wall -fexceptions -D_FORTIFY_SOURCE=0 -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -MT magick/libMagickCore_6_Q16_la-memory.lo -MD -MP -MF magick/.deps/libMagickCore_6_Q16_la-memory.Tpo -c magick/memory.c  -fno-common -DPIC -o magick/.libs/libMagickCore_6_Q16_la-memory.o
magick/memory.c: In function 'align_to_cache':
magick/memory.c:301: error: 'MagickAddressType' undeclared (first use in this function)
magick/memory.c:301: error: (Each undeclared identifier is reported only once
magick/memory.c:301: error: for each function it appears in.)
magick/memory.c:301: error: expected ')' before 'p'
make[1]: *** [magick/libMagickCore_6_Q16_la-memory.lo] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_graphics_ImageMagick/ImageMagick/work/ImageMagick-6.9.10-80'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_graphics_ImageMagick/ImageMagick/work/ImageMagick-6.9.10-80'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_lil.fr.rsync.macports.org_release_tarballs_ports_graphics_ImageMagick/ImageMagick/work/ImageMagick-6.9.10-80" && /usr/bin/make -w all 
Exit code: 2
Error: Failed to build ImageMagick: command execution failed

Attachments (1)

main.log (316.1 KB) - added by ballapete (Peter "Pete" Dyballa) 5 years ago.
Main.log from PPC Tiger

Download all attachments as: .zip

Change History (5)

Changed 5 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: main.log added

Main.log from PPC Tiger

comment:1 Changed 5 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… removed
Owner: set to ryandesign
Status: newaccepted

comment:2 in reply to:  1 Changed 5 years ago by ballapete (Peter "Pete" Dyballa)

Replying to 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…

comment:3 Changed 2 years ago by ballapete (Peter "Pete" Dyballa)

Obviously the problem was solved and now ImageMagick @6.9.11-60 builds and installs. The ticket can be closed.

comment:4 Changed 2 years ago by kencu (Ken)

Resolution: fixed
Status: acceptedclosed

thanks

Note: See TracTickets for help on using tickets.