Closed Quuxplusone closed 14 years ago
Attached shim-log.txt
(107267 bytes, text/plain): shim-log.txt build log
Sounds like the code is being built as C. As a wild guess, I'd expect a driver bug.
Yes, it's a driver bug, here's the command line:
clang++ -Wall -g -I/usr/include/mysql -I/usr/include/c++/4.1.1/ -I/usr/include/c++/4.1.1/x86_64-redhat-linux -c -o obj/main.o src/main.c
The file should be built as c++, even though it ends with ".c".
Sorry for not giving enough context -- no plain old C here ;)
It did not occur to me that a file suffix might be consulted as to what was
happening in a compile
It looks as though I need to sub out that hardcoded 'g++' in the middle as well
For those following along, the Makefile is:
[herrold@centos-5 shim-100205]$ cat Makefile
# Makefile for the trading shim, an interface to Interactive Brokers' tws api
# author: Bill Pippin, <pippin@trading-shim.com>, msgs may gate to the list
# copyright (c) 2005--2007 Trading-shim.com, LLC Columbus, OH
# GPL version 3 or later, see COPYING for details
# This makefile belongs in and should be run from the parent directory of
# the directories src, lib, dep, and bin. The regression test script
# naturally runs the shim and so requires access to a mysql trading shim
# database and a live instance of IB's tws.
# The approach to automatic dependency generation used here is based on p. 153
# of:
#
# Mecklenburg, "GNU Make", O'Reilly 3rd Ed.
#
# He credits it to to Tom Tromey, as part of his work on FSF's automake tool.
# As of this writing (12.02.08), g++ 4.3.2 at -O3 on Ubuntu 8.04 is
# known to optimize away key ctor parameters during initialization.
# The -O3 level works fine, however, for g++ 4.1.2 on Centos.
# As of 1.02.09, g++ 4.3.2-1 at -O3 on debian testing (lenny) works
# fine, so I'm turning -O3 back on.
#* __________________________________________________________________________ */
#* */
#* Declarations */
#* __________________________________________________________________________ */
CP := cp
RM := rm -f
# CC := g++
#C := distcc g++
CC := /usr/bin/clang++
JOBS := -j2
#OBS := -j12
CFLAGS := -Wall -g
#FLAGS := -Wall -O3 -g
#FLAGS := -Wall -O3 -g -std=c++0x
# CPPFLAGS := -I/usr/include/mysql
CPPFLAGS := -I/usr/include/mysql \
-I/usr/include/c++/4.1.1/ \
-I/usr/include/c++/4.1.1/x86_64-redhat-linux
SQL := $(shell mysql_config --libs)
TWO := $(filter %/mysql,$(SQL)) \
$(filter %client,$(SQL))
LIB := $(TWO) -lm
DEP_CHECK = g++ $(CFLAGS) $(CPPFLAGS)
vpath %.c src lib
vpath %.h src lib
vpath %.i src lib
vpath %.o obj
DPATH := dep
define you-need-ruby
(printf "\nRuby must be installed; it's used to generate: %s\n\n" $1 && false)
endef
# sources are grouped by functionality roughly as follows:
# 1st grp: single tree construction, both imperative and constant; and init
# 2nd " main: input, process, and output; low-level ops, e.g., operator[]()
# 3rd " library component code, application exceptional case handling, and
# unit testing
SRC:= main.c \
once.c bind.c mode.c time.c \
data.c fsms.c syms.c tags.c \
type.c sets.c cusp.c link.c \
open.c apis.c rule.c late.c \
null.c fail.c help.c talk.c \
\
shim.c fill.c wait.c read.c \
ctor.c proc.c nque.c send.c \
tick.c wire.c post.c past.c \
echo.c form.c term.c acts.c \
name.c leaf.c base.c envs.c \
else.c \
\
scan.c hash.c text.c wrap.c \
pool.c buds.c inet.c boot.c \
math.c dfsa.c
OBJ:= $(SRC:%.c=%.o)
#* __________________________________________________________________________ */
#* */
#* Targets */
#* __________________________________________________________________________ */
.PHONY: all
all: ; make $(JOBS) shim
shim: $(OBJ) ; (cd obj; $(CXX) -g -o ../shim $(OBJ) $(LIB))
test: all ; exs/test.rb
%.h : %.i ; @(bin/$(*F).rb $< > $@) || $(call you-need-
ruby, $(@F))
%.o : %.c
@$(DEP_CHECK) -M -MF dep/$(subst .o,.d,$@) -MP -MT $@ $<
$(COMPILE.c) -o obj/$@ $<
sinclude $(SRC:%.c=$(DPATH)/%.d)
.DELETE_ON_ERROR:
debug: ; +make shim 2>&1 | bin/c++.filter | head -16
clean: ; @$(RM) shim obj/*.o; touch */*.i
realclean: ; @$(RM) shim obj/*.o; touch */*.i; rm dep/*
[herrold@centos-5 shim-100205]$
_This bug has been marked as a duplicate of bug 5803_
shim-log.txt
(107267 bytes, text/plain)