[Scons-users] solving dependency cycle

TOM TANNER (BLOOMBERG/ LONDON) ttanner2 at bloomberg.net
Fri Aug 17 07:04:19 EDT 2012


It looks like you've worked in a dependency to the directory somehow. A dependency on the directory actually translates into a dependency on each file in the directory.

And if you build into the same directory as the source, that will have bad results.

----- Original Message -----
From: scons-users at scons.org
To: scons-users at scons.org
At: 8/17 12:01:00

On 2012-08-17 12:48:09 +0200, TOM TANNER (BLOOMBERG/ LONDON) said:


> Thats not a dependency cycle per se. Please could you give us the full

> error message, as that shows you what the cycle is between.

>

> Also, how do you build x?


scons: *** Found dependency cycle(s):
library/jsoncpp-src-0.5.0/src/lib_json/json_reader.cpp ->
library/jsoncpp-src-0.5.0/src/lib_json/json_reader.os ->
library/jsoncpp-src-0.5.0/src/lib_json -> library/jsoncpp-src-0.5.0/src
-> library/jsoncpp-src-0.5.0 ->
library/jsoncpp-src-0.5.0/src/lib_json/json_reader.cpp
library/jsoncpp-src-0.5.0/src/lib_json/json_reader.os ->
library/jsoncpp-src-0.5.0/src/lib_json -> library/jsoncpp-src-0.5.0/src
-> library/jsoncpp-src-0.5.0 ->
library/jsoncpp-src-0.5.0/src/lib_json/json_reader.cpp ->
library/jsoncpp-src-0.5.0/src/lib_json/json_reader.os
library/jsoncpp-src-0.5.0/src/lib_json/json_value.cpp ->
library/jsoncpp-src-0.5.0/src/lib_json -> library/jsoncpp-src-0.5.0/src
-> library/jsoncpp-src-0.5.0 ->
library/jsoncpp-src-0.5.0/src/lib_json/json_value.cpp
library/jsoncpp-src-0.5.0 ->
library/jsoncpp-src-0.5.0/src/lib_json/json_reader.cpp ->
library/jsoncpp-src-0.5.0/src/lib_json/json_reader.os ->
library/jsoncpp-src-0.5.0/src/lib_json -> library/jsoncpp-src-0.5.0/src
-> library/jsoncpp-src-0.5.0
library/jsoncpp-src-0.5.0/src/lib_json/json_writer.cpp ->
library/jsoncpp-src-0.5.0/src/lib_json -> library/jsoncpp-src-0.5.0/src
-> library/jsoncpp-src-0.5.0 ->
library/jsoncpp-src-0.5.0/src/lib_json/json_writer.cpp


I have create a builder for downloading source.tar.gz (in short)
dw=env.Download(target.tar.gz, http://....)
extract = env.Command(dw, "extractdir", "tar ... $SOURCE")

and than I build with sources within the extract target a shared library like

env.SharedLibrary( ..., sources=[ os.join.path(str(extract),
source1.cpp, str(extract), source2.cpp) ]

This does not work, because scons reports that the sources are not
exists, imho I need a dependency between the
source file and the "extract-target", which I have set with Depends and
this creates the dependency cycle error.

The parts for download and extracting works well and create a correct graph:
+-library/jsoncpp-src-0.5.0 //1
+-library/jsoncpp-src-0.5.0.tar.gz
| +-http://sourceforge.net/projects/jsoncpp/files/latest/download
+-/usr/bin/tar

The parts for building the shared library works also well (if the
sources exists). So I need the connection
between //1 and the env.SharedLibrary call

Thanks

Phil


_______________________________________________
Scons-users mailing list
Scons-users at scons.org
http://four.pairlist.net/mailman/listinfo/scons-users



More information about the Scons-users mailing list