Okay, that fixed the config error, but now we have those linker errors again:
“
ERROR: test_simple_compilation (__main__.SimpleTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "testcpybuilder.py", line 149, in test_simple_compilation
bm.build(MODNAME)
File "testcpybuilder.py", line 105, in build
self.compile_src(extra_cflags)
File "testcpybuilder.py", line 98, in compile_src
raise CompilationError(self)
CompilationError:
returncode: 1
compiling: /opt/local/bin/gcc-mp -o
/var/folders/3r/3rkFWJnFFkiA4+SfbiFLqU+++TI/-Tmp-/tmprbKHyU/simple_compilation.so
-I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7
-I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -fno-strict-aliasing
-fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -arch i386 -arch x86_64 -g
-O2 -DNDEBUG -g -O3 -Wall -Werror -fPIC -shared
/var/folders/3r/3rkFWJnFFkiA4+SfbiFLqU+++TI/-Tmp-/tmprbKHyU/simple_compilation.c
Stdout:
Stderr:
Undefined symbols for architecture i386:
"_Py_InitModule4", referenced from:
_initsimple_compilation in ccsjE9ha.o
"_Py_BuildValue", referenced from:
_example_hello in ccsjE9ha.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
Undefined symbols for architecture x86_64:
"_Py_InitModule4_64", referenced from:
_initsimple_compilation in cc3pwddo.o
"_Py_BuildValue", referenced from:
_example_hello in cc3pwddo.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
lipo: can't open input file:
/var/folders/3r/3rkFWJnFFkiA4+SfbiFLqU+++TI/-Tmp-//cc4eLZMY.out (No such file or
directory)
----------------------------------------------------------------------
Ran 3 tests in 0.453s
FAILED (errors=2)
make: *** [testcpybuilder] Error 1
“
I tried putting in the linker flags as you suggested in the last email (I put them in the
LDFLAGS section of the Makefile). I also tried to enter the flags by hand into the gcc
command. The linker error is exactly the same in all cases.
Do you have any ideas?
Nick
On May 1, 2012, at 12:30 PM, David Malcolm wrote:
On Mon, 2012-04-30 at 20:54 -0400, Nicholas Pasternack wrote:
> Make clean runs fine; here is what happens when I run make:
>
> “
> python generate-config-h.py -o autogenerated-config.h --gcc="cc"
--plugindir="plugin"
The above line is invoked in the Makefile via this command:
$(PYTHON) $< -o $@ --gcc="$(CC)"
--plugindir="$(GCCPLUGINS_DIR)"
Hence $(GCCPLUGINS_DIR) has somehow been evaluated to "plugin" (and
hence everything fails: the rest of the build is expecting this to be an
absolute path, and uses it to find the relevant header files).
This is set by this line in the Makefile:
GCCPLUGINS_DIR:= $(shell $(CC) --print-file-name=plugin)
On my system, when I run:
$ gcc --print-file-name=plugin
I get this output:
/usr/lib/gcc/x86_64-redhat-linux/4.6.1/plugin
You'll need to invoke the Makefile with CC set to the MacPorts build of
GCC.
So what happens if you do a "make clean" and then run:
CC=/the/absolute/path/to/your/gcc/binary make
Dave
_______________________________________________
gcc-python-plugin mailing list
gcc-python-plugin(a)lists.fedorahosted.org
https://fedorahosted.org/mailman/listinfo/gcc-python-plugin