[MLton-user] trouble building from svn on Mac OS X

Matthew Fluet fluet at tti-c.org
Wed Sep 24 08:11:17 PDT 2008


IIRC, gcc used to use the inline attribute in a way that deviated from the 
C99 standard.  More recent versions of gcc follow the C99 standard.  GMP 
used to have headers that relied on gcc's old inline behavior.  But, the 
latest release of GMP has updated their headers to match the C99 behavior.
So, it might depend on which release of gcc and GMP you are using.  You 
could try adding  -fgnu89-inline  to the runtime C flags.

On Wed, 24 Sep 2008, John Reppy wrote:
> I don't know if anyone else has seen this issue, but I'm not able to build 
> mlton
> on Mac OS X from svn.  The problem appears to be with using the MacPorts 
> version
> of gmp.  For example, when compiling gen-types.c, I get
>
> gcc -std=gnu99 -I. -Iplatform -fno-common -fvisibility=hidden 
> -I/usr/local/include -I/sw/include -I/opt/local/include  -O2 
> -fomit-frame-pointer -falign-loops=2 -falign-jumps=2 -falign-functions=5 
> -pedantic -Wall -Wextra -Wformat=2 -Wswitch-default -Wswitch-enum 
> -Wuninitialized -Winit-self -Wstrict-aliasing=2 -Wfloat-equal -Wundef 
> -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wcast-align 
> -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wold-style-definition 
> -Wmissing-prototypes -Wmissing-declarations -Wmissing-field-initializers 
> -Wmissing-noreturn -Wmissing-format-attribute -Wredundant-decls 
> -Wnested-externs -Wlong-long  -o gen/gen-types gen/gen-types.c util.o
> In file included from ./cenv.h:133,
>                from gen/gen-types.c:8:
> /opt/local/include/gmp.h:1607: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:1633: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:1644: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:1655: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:1666: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:1694: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:1705: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:1718: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:1736: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:1754: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:1765: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:1776: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:1786: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:2031: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:2044: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:2057: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:2070: warning: ?__gnu_inline__? attribute directive 
> ignored
> /opt/local/include/gmp.h:2083: warning: ?__gnu_inline__? attribute directive 
> ignored
> ld: duplicate symbol ___gmpz_abs in util.o and 
> /var/folders/YK/YK6vDQY7ELKqHvtySh6GIE+++TI/-Tmp-//cc3ACJb0.o
> collect2: ld returned 1 exit status
> make[2]: *** [gen/c-types.h] Error 1
>
> I think that the duplicate symbols are caused by the the inline directive 
> being ignored.
> I've filed a bugreport with MacPorts.
>
> 	- John
>
>
> _______________________________________________
> MLton-user mailing list
> MLton-user at mlton.org
> http://mlton.org/mailman/listinfo/mlton-user
>



More information about the MLton-user mailing list