jignesh88 / metasyntactic

Automatically exported from code.google.com/p/metasyntactic
Apache License 2.0
0 stars 0 forks source link

Compiling ProtocolBuffer on Snow Leopard 64bit #125

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The configure is passing x86_64 to -march which is not a correct value for that 
parameter. 

Excerpt from config.log:

Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5646.1~2/src/configure --disable-checking 
--enable-
werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ 
--
program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib 
--build=i686-
apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1 
--program-prefix=i686-apple-
darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5646) (dot 1)
configure:3534: $? = 0
configure:3523: gcc -V >&5
gcc-4.2: argument to `-V' is missing
configure:3534: $? = 1
configure:3523: gcc -qversion >&5
i686-apple-darwin10-gcc-4.2.1: no input files
configure:3534: $? = 1
configure:3556: checking for C compiler default output file name
configure:3578: gcc -O2 -march=x86_64   conftest.c  >&5
conftest.c:1: error: bad value (x86_64) for -march= switch
conftest.c:1: error: bad value (x86_64) for -mtune= switch
configure:3582: $? = 1
configure:3619: result: 
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Protocol Buffers"
| #define PACKAGE_TARNAME "protobuf"
| #define PACKAGE_VERSION "2.2.0"
| #define PACKAGE_STRING "Protocol Buffers 2.2.0"
| #define PACKAGE_BUGREPORT "protobuf@googlegroups.com"
| #define PACKAGE_URL ""
| #define PACKAGE "protobuf"
| #define VERSION "2.2.0"
| /* end confdefs.h.  */
| #include <stdio.h>
| int
| main ()
| {
| FILE *f = fopen ("conftest.out", "w");
|  return ferror (f) || fclose (f) != 0;
| 
|   ;
|   return 0;
| }
configure:3625: error: in 
`/Users/BlackFrog/Downloads/ProtocolBuffers-2.2.0-Source':
configure:3629: error: C compiler cannot create executables

Original issue reported on code.google.com by blackfrog1@gmail.com on 21 Jan 2010 at 1:38

GoogleCodeExporter commented 9 years ago
Weird.  It works for me.  If you have a patch that will fix this for you, i'll 
integrate it.

Original comment by cyrus.na...@gmail.com on 21 Jan 2010 at 1:44

GoogleCodeExporter commented 9 years ago
Please close this issue.  I found the problem.  I had set CFLAGS to '-O2 
-march=x86_64' when Snow Leopard 
was released because I wanted everything to compile 64 bit.  

I changed the value to '-O2 -march=core2' and now everything works like it 
should.

Original comment by blackfrog1@gmail.com on 21 Jan 2010 at 3:34

GoogleCodeExporter commented 9 years ago
User error.

Original comment by cyrus.na...@gmail.com on 21 Jan 2010 at 3:45