LTLIBRARIES: mv *.Tpo *.Plo, but the former doesn't exist and the latter already does
Asked Answered
W

1

7

I'm doing a pretty straight-forward conversion of an existing library (libtcod) to Autotools (for OS X happiness). Unfortunately, when I switch my Makefile.am's lib_LIBRARIES rule to lib_LTLIBRARIES, the build goes from successful to un. Excerpt from the output below:

Making all in .
make[1]: Nothing to be done for `all-am'.
Making all in src
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -g -O2 -MT bresenham_c.lo -MD -MP -MF .deps/bresenham_c.Tpo -c -o bresenham_c.lo bresenham_c.c
mv -f .deps/bresenham_c.Tpo .deps/bresenham_c.Plo
mv: rename .deps/bresenham_c.Tpo to .deps/bresenham_c.Plo: No such file or directory
make[1]: *** [bresenham_c.lo] Error 1
make: *** [all-recursive] Error 1

src/Makefile.am looks like this:

lib_LTLIBRARIES = libtcod.la
libtcod_la_SOURCES = bresenham_c.c bresenham3_c.c bsp_c.c color_c.c ...

src/.deps contains:

$ ls src/.deps/
bresenham_c.Plo bresenham_c.Po ...

Am I making an obvious mistake here, or should this work?

Worl answered 27/7, 2009 at 22:10 Comment(0)
W
12

Yes, I'm making an obvious mistake. I needed to run autoreconf -i to create a non-empty ltmain.sh script; the existing one made ../libtool here a no-op.

Worl answered 27/7, 2009 at 22:33 Comment(3)
I have been bashing my head against this this same problem for some time. My program complied great, untill I tried it on openSUSE12.1. This fixed me.Torchbearer
what are .Tpo and .Plo, by the way ? and how do autoreconf -i help fixing issues related to them ? and why doesn't this appear anywhere in the README or INSTALL documentation of projects depending on automake ?Comatose
I have no idea what any of this is, but it solved my problem in trying to compile rxp-1.5.0, as part of the SPEC tools in CPU2006-1.2 on ARM. So thank you for that.Awaken

© 2022 - 2024 — McMap. All rights reserved.