I am working to develop code for gumstix and compile it with openembedded. Usually it compiles without any issues.
However, recently, I have been encountering a strange error with bitbake:
NOTE: Running task 191 of 229 (ID: 5, /gumstix/gumstix-oe/user.collection/packages/gpsdt2/gpsdt2_1.0.00.bb, do_configure)
NOTE: package gpsdt2-1.0.00: started
NOTE: package gpsdt2-1.0.00-r12: task do_configure: started
ERROR: function do_configure failed
ERROR: log data follows (/gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/gpsdt2-1.0.00-r12/temp/log.do_configure.30234)
| /gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/gpsdt2-1.0.00-r12/temp/run.do_configure.30234: line 572: syntax error: unexpected end of file
NOTE: Task failed: /gumstix/gumstix-oe/tmp/work/armv5te-angstrom-linux-gnueabi/gpsdt2-1.0.00-r12/temp/log.do_configure.30234
NOTE: package gpsdt2-1.0.00-r12: task do_configure: failed
ERROR: TaskFailed event exception, aborting
NOTE: package gpsdt2-1.0.00: failed
ERROR: Build of /gumstix/gumstix-oe/user.collection/packages/gpsdt2/gpsdt2_1.0.00.bb do_configure failed
ERROR: Task 5 (/gumstix/gumstix-oe/user.collection/packages/gpsdt2/gpsdt2_1.0.00.bb, do_configure) failed
NOTE: Tasks Summary: Attempted 190 tasks of which 190 didn't need to be rerun and 1 failed.
ERROR: '/gumstix/gumstix-oe/user.collection/packages/gpsdt2/gpsdt2_1.0.00.bb' failed

The files compile correctly when I use g++. This is my bitbake file:
DESCRIPTION = "gpsdt2 test program"

PR = "r12"


SRC_URI = " \
file://gps.h \
file://gpsd_config.h.in \
file://gpsd_one.h \
file://gpsd_one.cpp \
file://gpsd2_test.cpp \


do_compile() {

${CC} -o gpsdt2 gpsd_one.cpp gpsd2_test.cpp -lgps -lstdc++}

do_install () {
install -d ${D}${bindir}/
install -m 0755 ${S}/gpsdt2 ${D}${bindir}/

FILES_${PN} = "${bindir}/gpsdt2"

I would suspect an install problem, but I have other programs with similarly-structured bitbake files that do build correctly. I couldn't find a fundamental difference.

I tried clearing the tmp directory (that is generated by bitbake), but it didn't help.

I am posting this on the OE forums, because I believe that this is a bitbake issue and is not a gumstix issue.
I would appreciate any suggestions on how to fix this or links to other forums where I could ask for advice.