[Scons-users] solving dependency cycle

Philipp Kraus philipp.kraus at flashpixx.de
Fri Aug 17 07:04:17 EDT 2012


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




More information about the Scons-users mailing list