[ECOS] MicroWindows test fails to build

Jonathan Larmour jifl@eCosCentric.com
Wed Mar 3 21:25:00 GMT 2004

Hans Kester wrote:
> When I 
> 1. choose the NET template for an x86 PC
> 2. add the MicroWindows package
> 4. build the eCos library
> 5. build the tests
> I get the following error messages:
> [snip]
> make[1]: Leaving directory `/ecos-e/cygwin/ecos/workdir/eCos/demo_build/io/pci/current'
> /ecos-e/cygwin/ecos/workdir/eCos/demo_install/lib/libtarget.a(services_gfx_mw_srvmain.o): In function `SVR_GrBell':
> make: Leaving directory `/ecos-e/cygwin/ecos/workdir/eCos/demo_build'
> /ecos-e/cygwin/ecos/ecos/packages/services/gfx/mw/current/src/nanox/srvmain.c:902: undefined reference to `gettimeofday'
> /ecos-e/cygwin/ecos/workdir/eCos/demo_install/lib/libtarget.a(services_gfx_mw_srvfunc.o): In function `SVR_GrSetPortraitMode':
> /ecos-e/cygwin/ecos/ecos/packages/services/gfx/mw/current/src/nanox/srvfunc.c:2945: undefined reference to `strdup'
> /ecos-e/cygwin/ecos/workdir/eCos/demo_install/lib/libtarget.a(services_gfx_mw_devtimer.o): In function `time_to_expiry':
> /ecos-e/cygwin/ecos/ecos/packages/services/gfx/mw/current/src/engine/devtimer.c:211: undefined reference to `gettimeofday'
> /ecos-e/cygwin/ecos/ecos/packages/services/gfx/mw/current/src/engine/devtimer.c:211: undefined reference to `gettimeofday'
> /ecos-e/cygwin/ecos/ecos/packages/services/gfx/mw/current/src/engine/devtimer.c:211: undefined reference to `gettimeofday'
> /ecos-e/cygwin/ecos/ecos/packages/services/gfx/mw/current/src/engine/devtimer.c:211: undefined reference to `gettimeofday'
> collect2: ld returned 1 exit status
> make[1]: *** [/ecos-e/cygwin/ecos/workdir/eCos/demo_install/tests/io/pci/current/tests/pci1] Error 1
> make: *** [tests] Error 2
> Do we have a 'gettimeofday'?

I see this is a failure in building the tests. There's something weird 
going on here. CYGBLD_MICROWINDOWS_ECOS_APP has a custom build rule to 
build src/ecos/ecos_app.c, which is the only file in microwindows which 
defines gettimeofday. Your only alternative to build the eCos tests would 
be, like Andrew said, to include SNMP which also happens to contain a 
compatibility version of gettimeofday, but that doesn't work either.

I don't know why, if Microwindows needs those functions, they aren't 
included with the rest of the port, rather than in ecos_app.c. Gary, any 

eCosCentric    http://www.eCosCentric.com/    The eCos and RedBoot experts
 >>>>> Visit us in booth 2527 at the Embedded Systems Conference 2004 <<<<<
March 30 - April 1, San Francisco http://www.esconline.com/electronicaUSA/
--["No sense being pessimistic, it wouldn't work anyway"]-- Opinions==mine

Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

More information about the Ecos-discuss mailing list