[Top][All Lists]

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

Linking problem when built in parallel

From: Adam Mercer
Subject: Linking problem when built in parallel
Date: Mon, 4 May 2009 16:27:10 -0500


I've inherited the maintenance of a library at work and there is
currently a linking problem when the library is built in parallel,
i.e. the -j option is passed to make, it builds find when the -j
option is not specified. It fails with the following error:

$ make -j2
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.
-I../include -I../include/lal   -I/opt/local/include
-I/opt/local/include   -I/opt/local/include   -DFR_LONG_LONG
-I/opt/local/include    -g -W -Wall  -MT LALEmpty.lo -MD -MP -MF
.deps/LALEmpty.Tpo -c -o LALEmpty.lo LALEmpty.c
echo 'const char *lalBuildDate = "'`date +"%Y-%m-%dT%H:%M:%S%z"`'";'
gcc -DHAVE_CONFIG_H -I. -I../include -I../include/lal
-I/opt/local/include   -I/opt/local/include   -I/opt/local/include
-DFR_LONG_LONG -I/opt/local/include    -g -W -Wall  -MT lal-version.o
-MD -MP -MF .deps/lal-version.Tpo -c -o lal-version.o lal-version.c
make[2]: *** No rule to make target `../lib/', needed by
`lal-version'.  Stop.
make[2]: *** Waiting for unfinished jobs....
mv -f .deps/lal-version.Tpo .deps/lal-version.Po
mkdir .libs
 gcc -DHAVE_CONFIG_H -I. -I../include -I../include/lal
-I/opt/local/include -I/opt/local/include -I/opt/local/include
-DFR_LONG_LONG -I/opt/local/include -g -W -Wall -MT LALEmpty.lo -MD
-MP -MF .deps/LALEmpty.Tpo -c LALEmpty.c  -fno-common -DPIC -o
 gcc -DHAVE_CONFIG_H -I. -I../include -I../include/lal
-I/opt/local/include -I/opt/local/include -I/opt/local/include
-DFR_LONG_LONG -I/opt/local/include -g -W -Wall -MT LALEmpty.lo -MD
-MP -MF .deps/LALEmpty.Tpo -c LALEmpty.c -o LALEmpty.o >/dev/null 2>&1
mv -f .deps/LALEmpty.Tpo .deps/LALEmpty.Plo
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

The appropriate is below:

liblal_la_SOURCES = LALEmpty.c
nodist_liblal_la_SOURCES = LALBuildDate.c
liblal_la_DEPENDENCIES = \
        $(top_builddir)/packages/std/src/ \
        $(top_builddir)/packages/tools/src/ \
        $(top_builddir)/packages/sample/src/ \
        $(top_builddir)/packages/hello/src/ \
        $(top_builddir)/packages/factories/src/ \
        $(top_builddir)/packages/vectorops/src/ \
        $(top_builddir)/packages/utilities/src/ \
        $(top_builddir)/packages/stats/src/ \
        $(top_builddir)/packages/inject/src/ \
        $(top_builddir)/packages/date/src/ \
        $(top_builddir)/packages/tdfilter/src/ \
        $(top_builddir)/packages/window/src/ \
        $(top_builddir)/packages/fft/src/ \
        $(top_builddir)/packages/clremoval/src/ \
        $(top_builddir)/packages/stochastic/src/ \
        $(top_builddir)/packages/inspiral/src/ \
        $(top_builddir)/packages/noisemodels/src/ \
        $(top_builddir)/packages/bank/src/ \
        $(top_builddir)/packages/ring/src/ \
        $(top_builddir)/packages/findchirp/src/ \
        $(top_builddir)/packages/pulsar/src/ \
        $(top_builddir)/packages/houghpulsar/src/ \
        $(top_builddir)/packages/burstsearch/src/ \
        $(top_builddir)/packages/tracksearch/src/ \
        $(top_builddir)/packages/tfclusters/src/ \
        $(top_builddir)/packages/slopefilters/src/ \
        $(top_builddir)/packages/block/src/ \
liblal_la_LIBADD = $(liblal_la_DEPENDENCIES) @LALLIBADD@
bin_PROGRAMS = lal-version
lal_version_SOURCES = lal-version.c
lal_version_LDADD = $(top_builddir)/lib/
TESTS = lal-version
LALBuildDate.c: $(liblal_la_DEPENDENCIES)
        echo 'const char *lalBuildDate = "'`date +"%Y-%m-%dT%H:%M:%S%z"`'";' >$@

liblal_la_SOURCES is set to LALEmpty.c and lal_version_LDADD is set to, so if I understand the syntax correctly (which seems to be
a big if) lal-version should not be built until is
available. Then why does make try to build lib-version before building

I'm clearly missing something but have been starring at this for days,
and any help would be greatly appreciated.



reply via email to

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