[Scons-users] own builder with multiple ways build error

Marc Branchaud marcnarc at xiplink.com
Mon Dec 9 10:46:14 EST 2013

On 13-12-09 10:08 AM, Philipp Kraus wrote:

> Hello,


> I would like to create my own install builder with a little bit more features.

Awesome! Please share when you're done!

> prefix = "installpath"

> envlua = env.Clone()

> lib = envlua.SharedLibrary(target="lua", source=sourcefiles)

> install = envlua.InstallInto( prefix, lib+headerfiles, INSTALLATIONDIRS=["lib"]+["include"]*len(headerfiles) ) (*)


> I try to build the Lua library and the InstallInto builder is my own builder, which should install the builded files into

> a directory with automatically creating if needed.

> I clone my env object, because the Lua environment is part of a larger script.


> I get the error / warning:


> scons: warning: Two different environments were specified for target liblua.dylib,

> but they appear to have the same action: SharedFlagChecker(target, source, env)

> VersionedSharedLibrary(target, source, env)


> scons: *** Multiple ways to build the same target were specified for: liblua.dylib (from ['lua-5.2.3/src/lapi.os', 'lua-5.2.3/src/lcode.os', 'lua-5.2.3/src/lctype.os', 'lua-5.2.3/src/ldebug.os', 'lua-5.2.3/src/ldo.os', 'lua-5.2.3/src/ldump.os', 'lua-5.2.3/src/lfunc.os', 'lua-5.2.3/src/lgc.os', 'lua-5.2.3/src/llex.os', 'lua-5.2.3/src/lmem.os', 'lua-5.2.3/src/lobject.os', 'lua-5.2.3/src/lopcodes.os', 'lua-5.2.3/src/lparser.os', 'lua-5.2.3/src/lstate.os', 'lua-5.2.3/src/lstring.os', 'lua-5.2.3/src/ltable.os', 'lua-5.2.3/src/ltm.os', 'lua-5.2.3/src/lundump.os', 'lua-5.2.3/src/lvm.os', 'lua-5.2.3/src/lzio.os', 'lua-5.2.3/src/lauxlib.os', 'lua-5.2.3/src/lbaselib.os', 'lua-5.2.3/src/lbitlib.os', 'lua-5.2.3/src/lcorolib.os', 'lua-5.2.3/src/ldblib.os', 'lua-5.2.3/src/liolib.os', 'lua-5.2.3/src/lmathlib.os', 'lua-5.2.3/src/loslib.os', 'lua-5.2.3/src/lstrlib.os', 'lua-5.2.3/src/ltablib.os', 'lua-5.2.3/src/loadlib.os', 'lua-5.2.3/src/linit.os'] and from ['build/lua/5.2.3/lib/liblua.dy


> b', 'build/lua/5.2.3/include/lauxlib.h', 'build/lua/5.2.3/include/lua.h', 'build/lua/5.2.3/include/luaconf.h', 'build/lua/5.2.3/include/lualib.h', 'build/lua/5.2.3/include/lua.hpp'])

This is not a dependency problem. Rather, SCons is telling you that you're
using two different environments to build the same file.

So somewhere you have
foo1 = env1.SharedLibrary(target="foo")
and somewhere else you have
foo2 = env2.SharedLibrary(target="foo")


More information about the Scons-users mailing list