[Scons-users] Randomly, Scons can not find the header files(#include)

shijm fsfshijm at 163.com
Fri Nov 17 00:42:14 EST 2017


Hi, 




I’m using Scons 2.3 to compile our projects, but randomly, scans can not find the header files, the error is like this:




{ xxx.cpp:5:37: error: xxx.h: No such file or directory }




My SConstruct and SConscripts:

One SConstruct in the root dir, and lots of SConscript in different sub dirs
env.SConscript(dirs='.',exports='env',variant_dir=env['BUILD_DIR'],duplicate=1)
SetOption('duplicate','hard-soft-copy')
In each sub SConscript we define env: Import('env’); env = env.Clone()
Also, we are using CPPPATH to search the header files
When compiling, we always clone a clean code from remote repo, so there is no cache or something else locally.
Then the problem is, sometimes the compilation is success, sometimes it's failure, I try to figure out the root cause and found that the header file was not copied to 'BUILD_DIR'(duplicate=1);
I don't know why this happened, seams there is some wrong when parsing dependency tree or cp files? I don't know.
So, do you have some ideas or suggestions for me to fix/debug this issue? Looking forward to your response! thanks very much!!!




Thanks.










 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20171117/4f21b7eb/attachment.html>


More information about the Scons-users mailing list