This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GCC (4.4.5) not working as expected when called in python sub-shell, but OK otherwise


Hi,

I'm using GCC as a pre-processor for a C-like language (EDDL) to handle all the includes, macros, etc. producing a single source file for another compiler.

I have a problem where if I call GCC from my python script some of the #defines are not processed in the output. However if I paste the exact same command into a shell, I get a correct output.

I'm calling GCC in this manner:

/usr/bin/gcc -I /tmp/dd-compile_1286930109.99 -I /home/foo/eddl-includes -D__TOKVER__=600 -ansi -nostdinc -v -x c -E -o /tmp/dd-compile_1286930109.99/11130201.ddl.OUT /tmp/dd-compile_1286930109.99/11130201.ddl

I'm not really sure how to debug this. I already checked the ulimits, and permissions shouldn't be a problem since it's all run by the same user.

GCC produces no warnings, or errors. The output is mostly OK, other macros have been processed.
If I diff the working output with the non-working one, the differences are only these bunch of skipped #defines.


gcc version 4.4.5 (Ubuntu/Linaro 4.4.4-14ubuntu5)
Linux 2.6.35-22-generic #34-Ubuntu SMP Sun Oct 10 09:26:05 UTC 2010 x86_64 GNU/Linux


Any suggestions for helping me debug this would be much appreciated.

thanks,
-kt


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]