[Scons-users] own builder with multiple ways build error
Philipp Kraus
philipp.kraus at tu-clausthal.de
Mon Dec 9 10:08:24 EST 2013
Hello,
I would like to create my own install builder with a little bit more features.
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.dylib', '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'])
On my InstallInto builder I have set up a print message in the emitter and it shows (left side = source, right side = target)
liblua.dylib => build/lua/5.2.3/lib/liblua.dylib
lauxlib.h => build/lua/5.2.3/include/lauxlib.h
lua.h => build/lua/5.2.3/include/lua.h
luaconf.h => build/lua/5.2.3/include/luaconf.h
lualib.h => build/lua/5.2.3/include/lualib.h
lua.hpp => build/lua/5.2.3/include/lua.hpp
so the build/lua/5.2.3/lib/liblua.dylib depends on liblua.dylib and this file depends on the os files and these files on the c files, so imho there does not exists a "multiple" way to build the file and the warning that Lua is build in different environments are not correct, because I clone the environment first, set up the Lua definition and append the install item (*) to the alias definition list
Can anybody help me please to fix this issue?
Thanks a lot
Phil
More information about the Scons-users
mailing list