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

Bill Deegan bill at baddogconsulting.com
Fri Nov 17 10:57:19 EST 2017


What's the command line when it fails?
Does it have the -I's?

A WAG would be that another file has the proper dependencies on the file
and thus it's getting copied to build dir, while the one(s) which fail do
not. Thus if the order of compilation changes it may not be copied in time..

-Bill

On Fri, Nov 17, 2017 at 12:42 AM, shijm <fsfshijm at 163.com> wrote:

> 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:
>
>    1. One SConstruct in the root dir, and lots of SConscript in different
>    sub dirs
>    2. env.SConscript(dirs='.',exports='env',variant_dir=env[
>    'BUILD_DIR'],duplicate=1)
>    3. SetOption('duplicate','hard-soft-copy')
>    4. In each sub SConscript we define env: Import('env’); env = env.Clone
>    ()
>    5. 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.
>
>
>
>
>
>
>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20171117/6afabdd4/attachment.html>


More information about the Scons-users mailing list