This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos 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]

Re: host tools and tcl8.4


>>>>> "Andrew" == Andrew Lunn <andrew.lunn@ascom.ch> writes:

    Andrew> Has anybody tried the host tools and tcl8.4?

Not yet...

    Andrew> I get built errors:

    <snip>
    Andrew> /export/home/lunn/ecos/host/libcdl/interp.cxx: In method `int CdlInterpreterBody::eval(basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> >, string &)':
    Andrew> /export/home/lunn/ecos/host/libcdl/interp.cxx:690:
    Andrew> initialization to `char *' from `const char *' discards
    Andrew> qualifiers

This one (and similar ones) are harmless. In some places, when passed
a char* the Tcl library will modify the string in place but restore it
before returning. So the string data is not quite const, but close
enough for the needs of libcdl. An ugly fix would be to use
const_cast<>. A clean fix would use strdup() on the result of a C++
c_str() and then free() the memory again, unnecessary overhead. So far
applying either fix has not been a priority.

    Andrew> /export/home/lunn/ecos/host/libcdl/interp.cxx: In method `void CdlInterpreterBody::add_command(basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> >, int (*)(CdlInterpreterBody *, int, char **))':
    Andrew> /export/home/lunn/ecos/host/libcdl/interp.cxx:923: passing
    Andrew> `int (*)(void *, Tcl_Interp *, int, char **)' as argument
    Andrew> 3 of `Tcl_CreateCommand(Tcl_Interp *, const char *, int
    Andrew> (*)(void *, Tcl_Interp *, int, const char **), void *,
    Andrew> void (*)(void *))'

This is a new one, probably as harmless as the previous one but I'll
have to check.

    Andrew> /export/home/lunn/ecos/host/libcdl/interp.cxx: In method `void CdlInterpreterBody::locate_subdirs(basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> >, vector<basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> >,allocator<basic_string<char,string_char_traits<char>,__default_alloc_template<true,0> > > > &)':
    Andrew> /export/home/lunn/ecos/host/libcdl/interp.cxx:1184:
    Andrew> passing `char ***' as argument 4 of
    Andrew> `Tcl_SplitList(Tcl_Interp *, const char *, int *, const
    Andrew> char ***)' adds cv-quals without intervening `const'

Another new one, and probably the one that is causing the build
failure.

    Andrew> Looks there is some const correctness problems.

I guess it is about time I fixed this up. I'll try to download
8.4 over the weekend and see what I can do.

>>>>> "Andrew" == Andrew Lunn <andrew.lunn@ascom.ch> writes:

    Andrew> Hi Folks

    Andrew> More tcl problems :-(

    Andrew> I have tcl in a none standard location. So i pass
    Andrew> --with-tcl=/home/lunn when running configure. It seems
    Andrew> happy, at the end it says...

Yep, that should do the trick.

    Andrew> checking for Tcl version... 8.4
    Andrew> checking for Tcl installation... -I/home/lunn/include -L/home/lunn/lib

    Andrew> which is correct. Then compiling its adding the correct
    Andrew> -I, but the -L is missing when linking...

Strange, last time I tried this it worked fine - when rebuilding under
cygwin I usually use --with-tcl. I'll investigate this as well.

Bart

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


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