[metapost] Compilation of MetaPost from SVN, release 181, on Mac OS X

Peter Dyballa Peter_Dyballa at Freenet.DE
Thu Sep 27 15:25:03 CEST 2007


Hello!

A Mac OS X user has asked me to compile MetaPost for the PPC  
architecture. During compilation these warnings are emitted:

	In file included from ./cwebdir/comm-w2c.ch:153:
or
	In file included from ../../../src/texk/web2c/tiedir/tie-w2c.ch:34:
+
	../../../src/texk/web2c/cpascal.h:50:1: warning: "floor" redefined
	In file included from /usr/include/math.h:26,
	                 from ../../../src/texk/web2c/../kpathsea/c-std.h:31,
	                 from ../../../src/texk/web2c/../kpathsea/config.h:82,
	                 from ../../../src/texk/web2c/config.h:44,
	                 from ../../../src/texk/web2c/cpascal.h:16,
	                 from ./cwebdir/comm-w2c.ch:153:
	/usr/include/architecture/ppc/math.h:853:1: warning: this is the  
location of the previous definition

The #define in Apple's /usr/include/architecture/ppc/math.h file is  
inside a #if defined(__FAST_MATH__) && !defined(__cplusplus) clause,  
so it might be appropriate to use

	#if !defined(__FAST_MATH__)	/* Mac OS X and probably other OS */
	#define floor(x)	((integer)floor((double)(x)))
	#endif

Compilation ends prematurely at:

	make[1]: `web2c' is up to date.
	srcdir=../../../src/texk/web2c /bin/sh ../../../src/texk/web2c/web2c/ 
convert /texk/web2c tangleboot
	../../../src/texk/web2c/web2c/convert: line 1: /texk/web2c/web2c/ 
web2c: No such file or directory
	../../../src/texk/web2c/web2c/convert: line 1: /texk/web2c/web2c/ 
fixwrites: No such file or directory
	../../../src/texk/web2c/web2c/convert: conversion of ../../../src/ 
texk/web2c/tangleboot.p failed, moving dregs:
	../../../src/texk/web2c/web2c/convert:   mv tangleboot.c  
tangleboot.h /tmp
	mv: rename tangleboot.h to /tmp/tangleboot.h: No such file or directory
	make: *** [tangleboot.c] Error 1


The problem is that convert is not receiving for $native the correct  
value.  build/texk/web2c/Makefile has set:

	native = /texk/web2c

In build/texk/web2c/config.log I can see:

	<stdin>:3: error: conflicting types for 'yytext'
	configure:1804: error: previous declaration of 'yytext' was here
	configure: failed program was:
	#line 1415 "configure"

plus failures when checking for ldnet or ldent_stub, but that's OK  
here. In Makefile these values are set:

	native = /texk/web2c
	target = NONE
	host  = NONE

Setting native to ``.´´ leads to different errors:

	srcdir=../../../src/texk/web2c /bin/sh ../../../src/texk/web2c/web2c/ 
convert . tex
	parse error: Last token = 59 (;), error buffer = `;',
		last id = `getjobname' (function with parameters).
	../../../src/texk/web2c/web2c/convert: conversion of tex.p failed,  
moving dregs:
	../../../src/texk/web2c/web2c/convert:   mv tex[0-9].c texini.c  
texd.h texcoerce.h /tmp
	make: *** [texini.c] Error 1
	srcdir=../../../src/texk/web2c /bin/sh ../../../src/texk/web2c/web2c/ 
convert . tex
	parse error: Last token = 59 (;), error buffer = `;',
		last id = `getjobname' (function with parameters).
	../../../src/texk/web2c/web2c/convert: conversion of tex.p failed,  
moving dregs:
	../../../src/texk/web2c/web2c/convert:   mv tex[0-9].c texini.c  
texd.h texcoerce.h /tmp
	make: *** [texd.h] Error 1
	srcdir=../../../src/texk/web2c /bin/sh ../../../src/texk/web2c/web2c/ 
convert . tex
	parse error: Last token = 59 (;), error buffer = `;',
		last id = `getjobname' (function with parameters).
	../../../src/texk/web2c/web2c/convert: conversion of tex.p failed,  
moving dregs:
	../../../src/texk/web2c/web2c/convert:   mv tex[0-9].c texini.c  
texd.h texcoerce.h /tmp
	make: *** [texcoerce.h] Error 1
	srcdir=../../../src/texk/web2c /bin/sh ../../../src/texk/web2c/web2c/ 
convert . tex
	parse error: Last token = 59 (;), error buffer = `;',
		last id = `getjobname' (function with parameters).
	../../../src/texk/web2c/web2c/convert: conversion of tex.p failed,  
moving dregs:
	../../../src/texk/web2c/web2c/convert:   mv tex[0-9].c texini.c  
texd.h texcoerce.h /tmp
	make: *** [tex0.c] Error 1
	srcdir=../../../src/texk/web2c /bin/sh ../../../src/texk/web2c/web2c/ 
convert . tex
	parse error: Last token = 59 (;), error buffer = `;',
		last id = `getjobname' (function with parameters).
	../../../src/texk/web2c/web2c/convert: conversion of tex.p failed,  
moving dregs:
	../../../src/texk/web2c/web2c/convert:   mv tex[0-9].c texini.c  
texd.h texcoerce.h /tmp
	make: *** [tex1.c] Error 1
	srcdir=../../../src/texk/web2c /bin/sh ../../../src/texk/web2c/web2c/ 
convert . tex
	parse error: Last token = 59 (;), error buffer = `;',
		last id = `getjobname' (function with parameters).
	../../../src/texk/web2c/web2c/convert: conversion of tex.p failed,  
moving dregs:
	../../../src/texk/web2c/web2c/convert:   mv tex[0-9].c texini.c  
texd.h texcoerce.h /tmp
	make: *** [tex2.c] Error 1


uname -m	Power Macintosh
uname -p	powerpc
uname -r	8.10.0
uname -s	Darwin
uname -v	Darwin Kernel Version 8.10.0: Wed May 23 16:50:59 PDT 2007;  
root:xnu-792.21.3~1/RELEASE_PPC
uname -a	Darwin Latsche.local 8.10.0 Darwin Kernel Version 8.10.0:  
Wed May 23 16:50:59 PDT 2007; root:xnu-792.21.3~1/RELEASE_PPC Power  
Macintosh powerpc

GCC 4.01


--
Greetings

   Pete

Build a man a fire and he'll be warm for a night, but set a man on  
fire and he'll be warm for the rest of his life.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: Signierter Teil der Nachricht
Url : http://tug.org/pipermail/metapost/attachments/20070927/dbb5a1c3/attachment.bin 


More information about the metapost mailing list