automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: .cpp.lo


From: Alexandre Duret-Lutz
Subject: Re: .cpp.lo
Date: Mon, 29 Jul 2002 10:32:54 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.2 (i386-debian-linux-gnu)

>>> "Waldemar" == Waldemar Rosenbach <address@hidden> writes:

[...]

 Waldemar> ltmain.sh (GNU libtool) 1.4.2 (1.922.2.53 2001/09/11 03:18:52)

 Waldemar> I'm not familiar with libtool and automake. This was
 Waldemar> my first try. But I think the problem with the
 Waldemar> creation of the *.lo files is the problem

 Waldemar> with automake, because if I change the Makefile to be:
 Waldemar> .cpp.lo:
 Waldemar> source='$<' object='$@' libtool=yes \
 Waldemar> &&    depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' \
 Waldemar> &&    $(CXXDEPMODE) $(depcomp) \
 Waldemar> &&    $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<

What you have done is equivalent to 

.cpp.lo:
        $(LTCXXCOMPILE) -c -o $@ `test -f $< || echo '$(srcdir)/'`$<

Another way to get the same result using 
  ./configure --disable-dependency-tracking.  

So there is probably something wrong with Automake's dependency
tracking.

What happens when you run this command manually?

% depmode=none ./depcomp ./libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. 
-I. -g -O2 -I/home/vofka/include -c -o FiniteStateMachine.lo 
./FiniteStateMachine.cpp

Does it create the FiniteStateMachine.lo file?

Or does the following run better?

% ./libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I. -g -O2 
-I/home/vofka/include -c -o FiniteStateMachine.lo ./FiniteStateMachine.cpp

If yes, could you send us the output of the following line:

% depmode=none sh -x ./depcomp ./libtool --mode=compile g++ -DHAVE_CONFIG_H -I. 
-I. -I. -g -O2 -I/home/vofka/include -c -o FiniteStateMachine.lo 
./FiniteStateMachine.cpp


The fact that configure sets `depmode=none' is itself another
bug.  ISTR I've seen this recently, but I don't remember where.
Maybe it was in a project where AC_LANG(C++) was called before
AC_PROG_LIBTOOL, I'm not sure.  Is it your case?

 Waldemar> then all goes right and I get my .la file. I still
 Waldemar> don't have neither .a nor .so file, but this is
 Waldemar> another problem, isn't it?

I think building C++ libraries with libtool 1.4.x is tricky, but
I'm not the one to ask.
-- 
Alexandre Duret-Lutz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]