[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- Date: Sun, 14 Feb 1999 15:22:01 +0100
- From: corsepiu at faw.uni-ulm.de (Ralf Corsepius)
- Subject: RTEMS/autoconf
I've encountered a very nasty problem with RTEMS and its interaction
Most autoconfiscated packages can *not* be built with RTEMS, because
RTEMS has "main" in its libraries.
Autoconf uses a m4-macro called AC_TRY_LINK when checking for
library-symbols. In conjunction with other macros (e.g. AC_CHECK_FUNCS),
this macro is used to link pieces of c-code containing declarations of
symbols and a "main"-function.
E.g. to check for presence of "strdup", such a piece of c-code looks
similar to the fragment below:
void main( )
If linking succeeds, this indicates a symbol is present on an OS and can
be used for configuration of a package.
RTEMS has "main" in its libraries, therefore any attempt to link a piece
of code like the example above will fail (duplicate symbol "main").
Autoconf interprets this as "symbol not present", thus indicating a
feature can not be used for the package to be configured.
=> All packages applying autoconf and exploiting AC_TRY_LINK are doomed
to deliver invalid configuration results. (There are even more autoconf
related problems, but this one is 100% fatal.)
A real showstopper, IMO.
To work around this problem, I can imagine a few solutions:
1. Removing "main" from RTEMS libraries (implies major redesign of rtems
internals and application code!)
2. Applying target-specific, probably linker dependent and non-portable
linker trickery (implies additional trouble with autoconf and Makefiles
3. Patching autoconf, i.e. supplying our own patched set of macros to
override autoconf's default macros (This is what we do for RTEMS
4. Trying to get it offically fixed in autoconf (Some thing like, if
"main" is in system-libraries then rename the main function generated by
autoconf to another non-proprietary entry point, eg. _exit or similar)
Forschungsinstitut fuer Anwendungsorientierte Wissensverarbeitung (FAW)
Helmholtzstr. 16, 89081 Ulm, Germany Tel: +49/731/501-8690
mailto:corsepiu at faw.uni-ulm.de FAX: +49/731/501-999