[ts-gen] order execution and connectivity problem

Bill Pippin pippin at owlriver.net
Mon Oct 15 16:43:34 EDT 2007


Nils,

Thanks for sending me the diagnostics:

> I attached the tarball to this mail. 

It unpacks cleanly, so the files seem to have come through fine.  The tarball
didn't include the cmdinput.txt file, though, so once we've straightened out
the compilation problem I discuss below, would you please be so kind as to
send me another log tarball?

Here's what I would like to get in the tarball, and what I actually received:

    files I need                        tar contents    
    ------------                        ------------
    ShimText				ShimText
    cmdinput.txt
    shim2tws.bin			shim2tws.bin
    tws2shim.bin			tws2shim.bin
    shim2tws.txt			shim2tws.txt
    tws2shim.txt			tws2shim.txt

First, however, before worrying about the log tarball, I'd like you to
take care of the compilation problem; otherwise there's no way to tell
if we are even singing off the same song sheet.

I've pushed another release in hopes of tracking down your compilation
problem:

> I have compiling problems with the newest tarball therefore I used an
> older shim version. 

I'd like to figure out why the compiler is not seeing the inline'd source
for the time_stamp() function.  It should be coming in via lib/rdtsc_time.h,
which is included via lib/tsc_time.h, which is included into time.c via
time-h.h.  Clearly, however, the compiler hasn't heard of it when it 
compiles time.c:
 
> src/time.c: In member function
> ‘void tsd::mux::TscClock::get_tics(long long unsigned int*, mmm::nat) const’:
> src/time.c:50: error: ‘time_stamp’ is not a member of ‘tsc’

The new release I pushed almost certainly hasn't fixed your problem ---
I have no idea why the includes are failing --- but it may provide
improved diagnostics, since it now has a declaration in interfaces.h to
tell the compiler to expect a definition for the time_stamp() function.

Would you please attempt to build the new release I've pushed today, and
if you are unable to get it to build, send me a trace of the Makefile output?

The remainder of this message gives you background on why the build might
be failing.  I suspect that there are problems with the dynamic header file
generation step in the Makefile.

One point to keep in mind is that the Makefile should be using a
ruby script, bin/rdtsc_time.rb, to recreate rdtsc_time.h.  This
should occur because the datestamps on the .i files are touch'd
as part of the release process, since one of them, lib/rdtsc_time.i,
is hardware specific, so that our local lib/rdtsc_time.h file is not
trustworthy for other sites.

I don't know whether that translation is working for you or not.
Your trace of the build did not show the ruby-to-header rule firing,
though it only fires on the first build, so if you had already tried to
build once, that explains why I don't see it in your trace.  I've also
modified the "make clean" rule to touch those .i files, so that now you
should see the dynamic header file generation after every "make clean",
e.g., the first two rules fired after the "Entering directory ..." message:

make -j2 shim
make[1]: Entering directory `/home/pippin/src/tws/src/tsd'
bin/generation.rb src/generation.i > src/generation.h
bin/rdtsc_time.rb src/../lib/rdtsc_time.i > src/../lib/rdtsc_time.h
distcc g++ -Wall -g -I/usr/include/mysql  -c -o bind.o src/bind.c
distcc g++ -Wall -g -I/usr/include/mysql  -c -o mode.o src/mode.c
distcc g++ -Wall -g -I/usr/include/mysql  -c -o data.o src/data.c
distcc g++ -Wall -g -I/usr/include/mysql  -c -o tabs.o src/tabs.c
distcc g++ -Wall -g -I/usr/include/mysql  -c -o rule.o src/rule.c
distcc g++ -Wall -g -I/usr/include/mysql  -c -o type.o src/type.c
distcc g++ -Wall -g -I/usr/include/mysql  -c -o dfsa.o src/dfsa.c
distcc g++ -Wall -g -I/usr/include/mysql  -c -o syms.o src/syms.c
distcc g++ -Wall -g -I/usr/include/mysql  -c -o init.o src/init.c

    ... [more stuff deleted] ...

By the way, the rule of interest in the Makefile looks, leaving aside
whitespace and in particular tabs, something like the following:

%.h : %.i               ;       bin/$(*F).rb $< > $@

If you are unable to get the Makefile to take care of the dynamic header
file generation --- I have no idea why that might occur, but *something's*
wrong --- then you can perform this step manually.  Cd to lib, and run:

../bin/rdtsc_time.rb rdtsc_time.i > rdtsc_time.h

As long as you have Ruby installed, have unpacked the sources properly, and
have the correct current-working-directory, this should recreate the
rdtsc_time.h header file, and from there the make process should work.
In any case, if you have problems, please send me a trace of the resulting
make output, and also the text of lib/rdtsc_time.h if the compiler is
still complaining about tsc::time_stamp() being unknown.

Thanks,

Bill



More information about the ts-general mailing list