[ts-gen] Re: The Shim as a data recorder? (fwd)
pippin at owlriver.net
pippin at owlriver.net
Wed Oct 18 17:09:19 EDT 2006
With respect to an off-list question, about compilation errors and needed
header files:
> ... are there any particular headers [needed] ... 'make shim' ... returned
> a laundry list of errors.
I'm the primary C++ developer for the trading-shim system, and am interested
in the compilation errors you are seeing.
First off, are you running make in the directory *above* src, lib, sql, etc.?
That's the most likely problem. See the comments at the top of the Makefile
if this is not clear. The Makefile vpath and dpath directives tell make where
to look for source and header files, and I have defined those directives to
be relative to the current directory, where you are running make from.
E.g., for my director hierarchy, where src, lib, sql et al are in the
directory tsd, and starting make from within tsd, and then interrupting it:
_______________________________________________________________________________
[pippin at devel tsd]$ pwd
/home/pippin/src/tws/src/tsd
[pippin at devel tsd]$ ls -d ???
bin dep doc lib sql src tgz
[pippin at devel tsd]$ make clean
[pippin at devel tsd]$ make
make shim
make[1]: Entering directory `/home/pippin/src/tws/src/tsd'
g++ -Wall -g -I/usr/include/mysql -c -o boot.o lib/boot.c
g++ -Wall -g -I/usr/include/mysql -c -o else.o src/else.c
make[1]: *** [make.o] Interrupt
make: *** wait: No child processes. Stop.
make: *** Waiting for unfinished jobs....
make: *** wait: No child processes. Stop.
_______________________________________________________________________________
... and you can see that make runs cleanly; to see the entire output of make,
if I had allowed it to continue, see the end of this message for a full
listing.
> MySQL, g++ ... are installed ... still getting a laundry-list of
> errors. ... most ... complaining about namespaces or things that "have
> virtual functions but non-virtual destructors."
Please feel free to send me listings of the compiler output you see.
Today's sources are cleaner than yesterday's, so you might like to download
a fresh tarball.
I'm not sure what messages you are seeing about namespaces, that covers
a lot of ground. Those are likely errors, and therefore will have to be
fixed. It's entirely possible that there is some kind of versioning
problem between the system you are running and the Centos release 4
system that development is performed on.
You can ignore warnings about unused variables; as has been noted, those
typically indicate sections with unfinished code, and the warnings are
meant as a reminder to me of the related work.
Complaints about objects that have "virtual functions but non-virtual
destructors" are typically warnings, and represent a disagreement between
me and the compiler about whether virtual destructors are needed; I know
that they aren't needed, and the compiler worries otherwise. I'm
particularly interested in determining why you see such messages, since
I've gone to some trouble to arrange my code to prevent such pestering;
I'd like to be able to protect ordinary users from such complaints as well.
Again, I don't see such messages with g++, under the version I'm using:
> $ g++ --version
> g++ (GCC) 3.4.6 20060404 (Red Hat 3.4.6-3)
> Copyright (C) 2006 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions. There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
So, once you've made sure you are running make from the proper relative
directory location, and in the event that's not the problem, what kind of
linux are you running, what release version, and in particular, what version
of g++? And again, please feel free to send me compiler error message
output text.
By the way, if, as is true for most of us, you find the compiler error
messages nearly impenetrable due to their length, the sed script named
"filter" in the bin directory will substitute short names for the full
namespace names used in compiler output. This can be quite a help in
making sense of errors. The make target "debug" uses this filter,
although I ordinarily use it from the bash command line directly,
e.g.:
make 2>&1 | bin/filter | head -16
In any case, for me, with distcc disabled to replicate your changes to the
Makefile, I currently get the following compile in response to a make
command:
_______________________________________________________________________________
make shim
make[1]: Entering directory `/home/pippin/src/tws/src/tsd'
g++ -Wall -g -I/usr/include/mysql -c -o tabs.o src/tabs.c
g++ -Wall -g -I/usr/include/mysql -c -o type.o src/type.c
g++ -Wall -g -I/usr/include/mysql -c -o kind.o src/kind.c
g++ -Wall -g -I/usr/include/mysql -c -o init.o src/init.c
g++ -Wall -g -I/usr/include/mysql -c -o boot.o lib/boot.c
g++ -Wall -g -I/usr/include/mysql -c -o make.o src/make.c
g++ -Wall -g -I/usr/include/mysql -c -o data.o src/data.c
g++ -Wall -g -I/usr/include/mysql -c -o mode.o src/mode.c
g++ -Wall -g -I/usr/include/mysql -c -o else.o src/else.c
g++ -Wall -g -I/usr/include/mysql -c -o once.o src/once.c
g++ -Wall -g -I/usr/include/mysql -c -o atom.o src/atom.c
g++ -Wall -g -I/usr/include/mysql -c -o read.o src/read.c
g++ -Wall -g -I/usr/include/mysql -c -o load.o src/load.c
g++ -Wall -g -I/usr/include/mysql -c -o time.o src/time.c
g++ -Wall -g -I/usr/include/mysql -c -o shim.o src/shim.c
g++ -Wall -g -I/usr/include/mysql -c -o flow.o src/flow.c
g++ -Wall -g -I/usr/include/mysql -c -o send.o src/send.c
g++ -Wall -g -I/usr/include/mysql -c -o post.o src/post.c
g++ -Wall -g -I/usr/include/mysql -c -o echo.o src/echo.c
g++ -Wall -g -I/usr/include/mysql -c -o term.o src/term.c
g++ -Wall -g -I/usr/include/mysql -c -o leaf.o src/leaf.c
g++ -Wall -g -I/usr/include/mysql -c -o call.o lib/call.c
g++ -Wall -g -I/usr/include/mysql -c -o pool.o lib/pool.c
g++ -Wall -g -I/usr/include/mysql -c -o unit.o src/unit.c
g++ -Wall -g -I/usr/include/mysql -c -o hash.o lib/hash.c
date; g++ -g -o shim once.o make.o init.o mode.o else.o boot.o data.o type.o
tabs.o kind.o atom.o load.o shim.o time.o read.o flow.o send.o post.o echo.o
term.o leaf.o call.o hash.o pool.o unit.o -L/usr/lib/mysql -lmysqlclient -lm
Wed Oct 18 16:31:19 EDT 2006
make[1]: Leaving directory `/home/pippin/src/tws/src/tsd'
_______________________________________________________________________________
Thanks,
Bill
More information about the ts-general
mailing list