Discussion:
[Scons-users] Having issue with scanner in Command()
Jason Kenny
2018-05-04 14:31:20 UTC
Permalink
Hi,

I am setting up a build with SCons that has to build openssl. I am using the Command() logic to call the native build system. I am having an issue with this code wanting to rebuild because of a file "crypto/buildinf.h" is rebuilt as part of the process with a new date value/ This causes SCons to say stuff needs to be rebuilt. The issue here is an odd circular reference that is forming up and I am unclear on what is adding it at this time. I am hoping before I dig to deep into this that some one might know, or have some idea on what is happening. Details

I have a two commands:

out = env.Command(
["Makefile"],
copyed,
"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\
--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\
"
)

Then I have a command
env.Ignore(out, ["crypto/buildinf.h"])

env.Command(
[
env.File("crypto/buildinf.h"),
"#_makeinstall/${PART_NAME}/bin/c_rehash",
...
],
["Makefile"],
[
"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
"cd ${SOURCE.dir} ; make install"
] )

What is happening is that after the first run Scons will tell me it needs to rebuild because:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile' because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' changed

I have an Ignore line that should remove this... What is odd for me is that the next build command is run because:
scons: rebuilding `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' because `_build/build_debug_posix-x86_64/openssl/Makefile' changed

I seem to have a cycle of some kind. I am unclear on how to break it.

I am unclear on what scanner is adding this depends in Command. Do we have a generic Makefile scanner??
Any thoughts??

Jason
Bill Deegan
2018-05-04 15:40:56 UTC
Permalink
Jason,

I"m not aware of a Makefile scanner.

What's in variable 'copyed'?

Can you paste output of --tree=prune?
-Bill

On Fri, May 4, 2018 at 10:31 AM, Jason Kenny <***@live.com> wrote:

> Hi,
>
> I am setting up a build with SCons that has to build openssl. I am using
> the Command() logic to call the native build system. I am having an issue
> with this code wanting to rebuild because of a file "crypto/buildinf.h" is
> rebuilt as part of the process with a new date value/ This causes SCons to
> say stuff needs to be rebuilt. The issue here is an odd circular reference
> that is forming up and I am unclear on what is adding it at this time. I am
> hoping before I dig to deep into this that some one might know, or have
> some idea on what is happening. Details
>
> I have a two commands:
>
> out = env.Command(
> ["Makefile"],
> copyed,
> "cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128
> \
> --prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
> --openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\
> "
> )
>
> Then I have a command
> env.Ignore(out, ["crypto/buildinf.h"])
>
> env.Command(
> [
> env.File("crypto/buildinf.h"),
> "#_makeinstall/${PART_NAME}/bin/c_rehash",
> ...
> ],
> ["Makefile"],
> [
> "cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)"
> .format(jobs=env.GetOption('num_jobs')),
> "cd ${SOURCE.dir} ; make install"
> ] )
>
> What is happening is that after the first run Scons will tell me it needs
> to rebuild because:
>
> scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile'
> because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h'
> changed
>
> I have an Ignore line that should remove this... What is odd for me is
> that the next build command is run because:
> scons: rebuilding `_build/build_debug_posix-x86_
> 64/openssl/crypto/buildinf.h' because `_build/build_debug_posix-x86_
> 64/openssl/Makefile' changed
>
> I seem to have a cycle of some kind. I am unclear on how to break it.
>
> I am unclear on what scanner is adding this depends in Command. Do we have
> a generic Makefile scanner??
> Any thoughts??
>
> Jason
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
Jason Kenny
2018-05-04 16:26:15 UTC
Permalink
copyed was me coping data to the variant directory to allow cross build to work better

log file is here https://bitbucket.org/snippets/dragon512/KeGax5


Below is the Parts file I have been hacking on ( I hope to clean it up more...) It is based on work I have yet to publish in Parts in my branch.


-----
Import('*')
PartVersion("1.1.0")
files = Pattern(src_dir="${VCS_DIR}", excludes=[".git/*"])

copyed = env.CCopy(
source=files,
target="$BUILD_DIR",
copy_logic=CCopy.copy # could hard links be an issue????
)
out = env.Command(
["Makefile"],
copyed,
"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\
--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\
"
)

# env.Ignore("_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h","${VCS_DIR}/crypto/buildinf.h")
env.Ignore(out, ["crypto/buildinf.h"])



out = env.Command(
[
env.File("crypto/buildinf.h"),
"#_makeinstall/${PART_NAME}/bin/c_rehash",
"#_makeinstall/${PART_NAME}/bin/openssl",
"#_makeinstall/${PART_NAME}/include/openssl/aes.h",
"#_makeinstall/${PART_NAME}/include/openssl/camellia.h",
"#_makeinstall/${PART_NAME}/include/openssl/des.h",
"#_makeinstall/${PART_NAME}/include/openssl/e_os2.h",
"#_makeinstall/${PART_NAME}/include/openssl/md5.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem2.h",
"#_makeinstall/${PART_NAME}/include/openssl/rsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/stack.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509_vfy.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1.h",
"#_makeinstall/${PART_NAME}/include/openssl/cast.h",
"#_makeinstall/${PART_NAME}/include/openssl/dh.h",
"#_makeinstall/${PART_NAME}/include/openssl/err.h",
"#_makeinstall/${PART_NAME}/include/openssl/mdc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem.h",
"#_makeinstall/${PART_NAME}/include/openssl/safestack.h",
"#_makeinstall/${PART_NAME}/include/openssl/symhacks.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/cmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/dsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/evp.h",
"#_makeinstall/${PART_NAME}/include/openssl/modes.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs12.h",
"#_makeinstall/${PART_NAME}/include/openssl/seed.h",
"#_makeinstall/${PART_NAME}/include/openssl/tls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1t.h",
"#_makeinstall/${PART_NAME}/include/openssl/cms.h",
"#_makeinstall/${PART_NAME}/include/openssl/dtls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/hmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/objects.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs7.h",
"#_makeinstall/${PART_NAME}/include/openssl/sha.h",
"#_makeinstall/${PART_NAME}/include/openssl/ts.h",
"#_makeinstall/${PART_NAME}/include/openssl/async.h",
"#_makeinstall/${PART_NAME}/include/openssl/comp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ebcdic.h",
"#_makeinstall/${PART_NAME}/include/openssl/idea.h",
"#_makeinstall/${PART_NAME}/include/openssl/obj_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/rand.h",
"#_makeinstall/${PART_NAME}/include/openssl/srp.h",
"#_makeinstall/${PART_NAME}/include/openssl/txt_db.h",
"#_makeinstall/${PART_NAME}/include/openssl/bio.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf_api.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdh.h",
"#_makeinstall/${PART_NAME}/include/openssl/kdf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ocsp.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/srtp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ui.h",
"#_makeinstall/${PART_NAME}/include/openssl/blowfish.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/lhash.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslconf.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl2.h",
"#_makeinstall/${PART_NAME}/include/openssl/whrlpool.h",
"#_makeinstall/${PART_NAME}/include/openssl/bn.h",
"#_makeinstall/${PART_NAME}/include/openssl/crypto.h",
"#_makeinstall/${PART_NAME}/include/openssl/ec.h",
"#_makeinstall/${PART_NAME}/include/openssl/md2.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslv.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc5.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl3.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509.h",
"#_makeinstall/${PART_NAME}/include/openssl/buffer.h",
"#_makeinstall/${PART_NAME}/include/openssl/ct.h",
"#_makeinstall/${PART_NAME}/include/openssl/engine.h",
"#_makeinstall/${PART_NAME}/include/openssl/md4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ossl_typ.h",
"#_makeinstall/${PART_NAME}/include/openssl/ripemd.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509v3.h",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/afalg.so",
"#_makeinstall/${PART_NAME}/lib/libssl.a",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/capi.so",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/padlock.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so.1.1",
"#_makeinstall/${PART_NAME}/lib/libcrypto.a",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libcrypto.pc",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libssl.pc",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so.1.1",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/openssl.pc",
],
["Makefile"],
[
"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
"cd ${SOURCE.dir} ; make install"
]
)

env.InstallBin(
env.Glob("#_makeinstall/${PART_NAME}/bin/*")
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/*.a"), auto_add_libs=False)
env.InstallLib(
env.Glob("#_makeinstall/${PART_NAME}/lib/*.so*")

)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/libengines-1.1/*.so"), auto_add_libs=False, sub_dir="libengines-1.1")
env.InstallInclude( # bug we need to fix -JK
env.SdkInclude(
env.Glob("#_makeinstall/${PART_NAME}/include/openssl/*"),
sub_dir="openssl",
add_to_path=False
),
sub_dir="openssl"
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/pkgconfig/*.pc"), auto_add_libs=False, sub_dir="pkgconfig", add_to_path=False)



________________________________
From: Scons-users <scons-users-***@scons.org> on behalf of Bill Deegan <***@baddogconsulting.com>
Sent: Friday, May 4, 2018 10:40 AM
To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()

Jason,

I"m not aware of a Makefile scanner.

What's in variable 'copyed'?

Can you paste output of --tree=prune?
-Bill

On Fri, May 4, 2018 at 10:31 AM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
Hi,

I am setting up a build with SCons that has to build openssl. I am using the Command() logic to call the native build system. I am having an issue with this code wanting to rebuild because of a file "crypto/buildinf.h" is rebuilt as part of the process with a new date value/ This causes SCons to say stuff needs to be rebuilt. The issue here is an odd circular reference that is forming up and I am unclear on what is adding it at this time. I am hoping before I dig to deep into this that some one might know, or have some idea on what is happening. Details

I have a two commands:

out = env.Command(
["Makefile"],
copyed,
"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\
--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\
"
)

Then I have a command
env.Ignore(out, ["crypto/buildinf.h"])

env.Command(
[
env.File("crypto/buildinf.h"),
"#_makeinstall/${PART_NAME}/bin/c_rehash",
...
],
["Makefile"],
[
"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
"cd ${SOURCE.dir} ; make install"
] )

What is happening is that after the first run Scons will tell me it needs to rebuild because:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile' because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' changed

I have an Ignore line that should remove this... What is odd for me is that the next build command is run because:
scons: rebuilding `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' because `_build/build_debug_posix-x86_64/openssl/Makefile' changed

I seem to have a cycle of some kind. I am unclear on how to break it.

I am unclear on what scanner is adding this depends in Command. Do we have a generic Makefile scanner??
Any thoughts??

Jason
Jason Kenny
2018-05-04 17:18:26 UTC
Permalink
to simplify the log file the tree looks like this:

+-build::alias::openssl
+-build::alias::openssl::SDKBIN
| +-_sdks/debug_posix-x86_64_default/openssl_1.1.0_51bed083228027f76730230d116bace9/bin/c_rehash
| | +-_build/build_debug_posix-x86_64/openssl/_set_RPATH_/c_rehash
| | +-_makeinstall/openssl/bin/c_rehash
| | +-_build/build_debug_posix-x86_64/openssl/Makefile
| | +-_build/build_debug_posix-x86_64/openssl/crypto/ripemd/build.info
| | | +-_vcs/openssl/crypto/ripemd/build.info
....
| | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_win.c]
| | +-[_build/build_debug_posix-x86_64/openssl/crypto/arm_arch.h]
| | +-_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h
| | | +-[_build/build_debug_posix-x86_64/openssl/Makefile]
| | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_nyi.c]


I am not sure why _makeinstall/openssl/bin/c_rehash -> _build/build_debug_posix-x86_64/openssl/Makefile ->_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h -> _build/build_debug_posix-x86_64/openssl/Makefile

I would think c_rehash should depend on the Makefile. I would not think Scons would "know" anything about buildinf.h

- Jason

________________________________
From: Jason Kenny <***@live.com>
Sent: Friday, May 4, 2018 11:26 AM
To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()

copyed was me coping data to the variant directory to allow cross build to work better

log file is here https://bitbucket.org/snippets/dragon512/KeGax5


Below is the Parts file I have been hacking on ( I hope to clean it up more...) It is based on work I have yet to publish in Parts in my branch.


-----
Import('*')
PartVersion("1.1.0")
files = Pattern(src_dir="${VCS_DIR}", excludes=[".git/*"])

copyed = env.CCopy(
source=files,
target="$BUILD_DIR",
copy_logic=CCopy.copy # could hard links be an issue????
)
out = env.Command(
["Makefile"],
copyed,
"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\
--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\
"
)

# env.Ignore("_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h","${VCS_DIR}/crypto/buildinf.h")
env.Ignore(out, ["crypto/buildinf.h"])



out = env.Command(
[
env.File("crypto/buildinf.h"),
"#_makeinstall/${PART_NAME}/bin/c_rehash",
"#_makeinstall/${PART_NAME}/bin/openssl",
"#_makeinstall/${PART_NAME}/include/openssl/aes.h",
"#_makeinstall/${PART_NAME}/include/openssl/camellia.h",
"#_makeinstall/${PART_NAME}/include/openssl/des.h",
"#_makeinstall/${PART_NAME}/include/openssl/e_os2.h",
"#_makeinstall/${PART_NAME}/include/openssl/md5.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem2.h",
"#_makeinstall/${PART_NAME}/include/openssl/rsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/stack.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509_vfy.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1.h",
"#_makeinstall/${PART_NAME}/include/openssl/cast.h",
"#_makeinstall/${PART_NAME}/include/openssl/dh.h",
"#_makeinstall/${PART_NAME}/include/openssl/err.h",
"#_makeinstall/${PART_NAME}/include/openssl/mdc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem.h",
"#_makeinstall/${PART_NAME}/include/openssl/safestack.h",
"#_makeinstall/${PART_NAME}/include/openssl/symhacks.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/cmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/dsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/evp.h",
"#_makeinstall/${PART_NAME}/include/openssl/modes.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs12.h",
"#_makeinstall/${PART_NAME}/include/openssl/seed.h",
"#_makeinstall/${PART_NAME}/include/openssl/tls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1t.h",
"#_makeinstall/${PART_NAME}/include/openssl/cms.h",
"#_makeinstall/${PART_NAME}/include/openssl/dtls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/hmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/objects.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs7.h",
"#_makeinstall/${PART_NAME}/include/openssl/sha.h",
"#_makeinstall/${PART_NAME}/include/openssl/ts.h",
"#_makeinstall/${PART_NAME}/include/openssl/async.h",
"#_makeinstall/${PART_NAME}/include/openssl/comp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ebcdic.h",
"#_makeinstall/${PART_NAME}/include/openssl/idea.h",
"#_makeinstall/${PART_NAME}/include/openssl/obj_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/rand.h",
"#_makeinstall/${PART_NAME}/include/openssl/srp.h",
"#_makeinstall/${PART_NAME}/include/openssl/txt_db.h",
"#_makeinstall/${PART_NAME}/include/openssl/bio.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf_api.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdh.h",
"#_makeinstall/${PART_NAME}/include/openssl/kdf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ocsp.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/srtp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ui.h",
"#_makeinstall/${PART_NAME}/include/openssl/blowfish.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/lhash.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslconf.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl2.h",
"#_makeinstall/${PART_NAME}/include/openssl/whrlpool.h",
"#_makeinstall/${PART_NAME}/include/openssl/bn.h",
"#_makeinstall/${PART_NAME}/include/openssl/crypto.h",
"#_makeinstall/${PART_NAME}/include/openssl/ec.h",
"#_makeinstall/${PART_NAME}/include/openssl/md2.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslv.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc5.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl3.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509.h",
"#_makeinstall/${PART_NAME}/include/openssl/buffer.h",
"#_makeinstall/${PART_NAME}/include/openssl/ct.h",
"#_makeinstall/${PART_NAME}/include/openssl/engine.h",
"#_makeinstall/${PART_NAME}/include/openssl/md4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ossl_typ.h",
"#_makeinstall/${PART_NAME}/include/openssl/ripemd.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509v3.h",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/afalg.so",
"#_makeinstall/${PART_NAME}/lib/libssl.a",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/capi.so",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/padlock.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so.1.1",
"#_makeinstall/${PART_NAME}/lib/libcrypto.a",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libcrypto.pc",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libssl.pc",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so.1.1",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/openssl.pc",
],
["Makefile"],
[
"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
"cd ${SOURCE.dir} ; make install"
]
)

env.InstallBin(
env.Glob("#_makeinstall/${PART_NAME}/bin/*")
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/*.a"), auto_add_libs=False)
env.InstallLib(
env.Glob("#_makeinstall/${PART_NAME}/lib/*.so*")

)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/libengines-1.1/*.so"), auto_add_libs=False, sub_dir="libengines-1.1")
env.InstallInclude( # bug we need to fix -JK
env.SdkInclude(
env.Glob("#_makeinstall/${PART_NAME}/include/openssl/*"),
sub_dir="openssl",
add_to_path=False
),
sub_dir="openssl"
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/pkgconfig/*.pc"), auto_add_libs=False, sub_dir="pkgconfig", add_to_path=False)



________________________________
From: Scons-users <scons-users-***@scons.org> on behalf of Bill Deegan <***@baddogconsulting.com>
Sent: Friday, May 4, 2018 10:40 AM
To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()

Jason,

I"m not aware of a Makefile scanner.

What's in variable 'copyed'?

Can you paste output of --tree=prune?
-Bill

On Fri, May 4, 2018 at 10:31 AM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
Hi,

I am setting up a build with SCons that has to build openssl. I am using the Command() logic to call the native build system. I am having an issue with this code wanting to rebuild because of a file "crypto/buildinf.h" is rebuilt as part of the process with a new date value/ This causes SCons to say stuff needs to be rebuilt. The issue here is an odd circular reference that is forming up and I am unclear on what is adding it at this time. I am hoping before I dig to deep into this that some one might know, or have some idea on what is happening. Details

I have a two commands:

out = env.Command(
["Makefile"],
copyed,
"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\
--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\
"
)

Then I have a command
env.Ignore(out, ["crypto/buildinf.h"])

env.Command(
[
env.File("crypto/buildinf.h"),
"#_makeinstall/${PART_NAME}/bin/c_rehash",
...
],
["Makefile"],
[
"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
"cd ${SOURCE.dir} ; make install"
] )

What is happening is that after the first run Scons will tell me it needs to rebuild because:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile' because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' changed

I have an Ignore line that should remove this... What is odd for me is that the next build command is run because:
scons: rebuilding `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' because `_build/build_debug_posix-x86_64/openssl/Makefile' changed

I seem to have a cycle of some kind. I am unclear on how to break it.

I am unclear on what scanner is adding this depends in Command. Do we have a generic Makefile scanner??
Any thoughts??

Jason
Bill Deegan
2018-05-04 20:23:09 UTC
Permalink
What's VCS_DIR and BUILD_DIR ?

On Fri, May 4, 2018 at 1:18 PM, Jason Kenny <***@live.com> wrote:

> to simplify the log file the tree looks like this:
>
> +-build::alias::openssl
> +-build::alias::openssl::SDKBIN
> | +-_sdks/debug_posix-x86_64_default/openssl_1.1.0_
> 51bed083228027f76730230d116bace9/bin/c_rehash
> | | +-_build/build_debug_posix-x86_64/openssl/_set_RPATH_/c_rehash
> | | +-_makeinstall/openssl/bin/c_rehash
> | | +-_build/build_debug_posix-x86_64/openssl/Makefile
> | | +-_build/build_debug_posix-x86_64/openssl/crypto/ripemd/build.info
> | | | +-_vcs/openssl/crypto/ripemd/build.info
> ....
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_win.c]
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/arm_arch.h]
> | | +-_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h
> | | | +-[_build/build_debug_posix-x86_64/openssl/Makefile]
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_nyi.c]
>
>
> I am not sure why _makeinstall/openssl/bin/c_rehash -> _build
> /build_debug_posix-x86_64/openssl/Makefile ->_build/build_debug_posix-
> x86_64/openssl/crypto/buildinf.h -> _build/build_debug_posix-x86_
> 64/openssl/Makefile
>
> I would think c_rehash should depend on the Makefile. I would not think
> Scons would "know" anything about buildinf.h
>
> - Jason
>
> ------------------------------
> *From:* Jason Kenny <***@live.com>
> *Sent:* Friday, May 4, 2018 11:26 AM
>
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
> copyed was me coping data to the variant directory to allow cross build to
> work better
>
> log file is here https://bitbucket.org/snippets/dragon512/KeGax5
>
>
> Below is the Parts file I have been hacking on ( I hope to clean it up
> more...) It is based on work I have yet to publish in Parts in my branch.
>
>
> -----
> Import('*')
> PartVersion("1.1.0")
> files = Pattern(src_dir="${VCS_DIR}", excludes=[".git/*"])
>
> copyed = env.CCopy(
> source=files,
> target="$BUILD_DIR",
> copy_logic=CCopy.copy # could hard links be an issue????
> )
> out = env.Command(
> ["Makefile"],
> copyed,
> "cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH
> enable-ec_nistp_64_gcc_128\
> --prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
> --openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64
> shared\
> "
> )
>
> # env.Ignore("_build/build_debug_posix-x86_64/openssl/
> crypto/buildinf.h","${VCS_DIR}/crypto/buildinf.h")
> env.Ignore(out, ["crypto/buildinf.h"])
>
>
>
> out = env.Command(
> [
> env.File("crypto/buildinf.h"),
> "#_makeinstall/${PART_NAME}/bin/c_rehash",
> "#_makeinstall/${PART_NAME}/bin/openssl",
> "#_makeinstall/${PART_NAME}/include/openssl/aes.h",
> "#_makeinstall/${PART_NAME}/include/openssl/camellia.h",
> "#_makeinstall/${PART_NAME}/include/openssl/des.h",
> "#_makeinstall/${PART_NAME}/include/openssl/e_os2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md5.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pem2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/stack.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509_vfy.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cast.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dh.h",
> "#_makeinstall/${PART_NAME}/include/openssl/err.h",
> "#_makeinstall/${PART_NAME}/include/openssl/mdc2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pem.h",
> "#_makeinstall/${PART_NAME}/include/openssl/safestack.h",
> "#_makeinstall/${PART_NAME}/include/openssl/symhacks.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1_mac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cmac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/evp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/modes.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pkcs12.h",
> "#_makeinstall/${PART_NAME}/include/openssl/seed.h",
> "#_makeinstall/${PART_NAME}/include/openssl/tls1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1t.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cms.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dtls1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/hmac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/objects.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pkcs7.h",
> "#_makeinstall/${PART_NAME}/include/openssl/sha.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ts.h",
> "#_makeinstall/${PART_NAME}/include/openssl/async.h",
> "#_makeinstall/${PART_NAME}/include/openssl/comp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ebcdic.h",
> "#_makeinstall/${PART_NAME}/include/openssl/idea.h",
> "#_makeinstall/${PART_NAME}/include/openssl/obj_mac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rand.h",
> "#_makeinstall/${PART_NAME}/include/openssl/srp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/txt_db.h",
> "#_makeinstall/${PART_NAME}/include/openssl/bio.h",
> "#_makeinstall/${PART_NAME}/include/openssl/conf_api.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ecdh.h",
> "#_makeinstall/${PART_NAME}/include/openssl/kdf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ocsp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/srtp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ui.h",
> "#_makeinstall/${PART_NAME}/include/openssl/blowfish.h",
> "#_makeinstall/${PART_NAME}/include/openssl/conf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ecdsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/lhash.h",
> "#_makeinstall/${PART_NAME}/include/openssl/opensslconf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc4.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/whrlpool.h",
> "#_makeinstall/${PART_NAME}/include/openssl/bn.h",
> "#_makeinstall/${PART_NAME}/include/openssl/crypto.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ec.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/opensslv.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc5.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl3.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509.h",
> "#_makeinstall/${PART_NAME}/include/openssl/buffer.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ct.h",
> "#_makeinstall/${PART_NAME}/include/openssl/engine.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md4.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ossl_typ.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ripemd.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509v3.h",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/afalg.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.a",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/capi.so",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/padlock.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.so.1.1",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.a",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/libcrypto.pc",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/libssl.pc",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.so",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.so.1.1",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/openssl.pc",
> ],
> ["Makefile"],
> [
> "cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}}
> $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
> "cd ${SOURCE.dir} ; make install"
> ]
> )
>
> env.InstallBin(
> env.Glob("#_makeinstall/${PART_NAME}/bin/*")
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/*.a"),
> auto_add_libs=False)
> env.InstallLib(
> env.Glob("#_makeinstall/${PART_NAME}/lib/*.so*")
>
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/libengines-1.1/*.so"),
> auto_add_libs=False, sub_dir="libengines-1.1")
> env.InstallInclude( # bug we need to fix -JK
> env.SdkInclude(
> env.Glob("#_makeinstall/${PART_NAME}/include/openssl/*"),
> sub_dir="openssl",
> add_to_path=False
> ),
> sub_dir="openssl"
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/pkgconfig/*.pc"),
> auto_add_libs=False, sub_dir="pkgconfig", add_to_path=False)
>
>
>
> ------------------------------
> *From:* Scons-users <scons-users-***@scons.org> on behalf of Bill
> Deegan <***@baddogconsulting.com>
> *Sent:* Friday, May 4, 2018 10:40 AM
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
> Jason,
>
> I"m not aware of a Makefile scanner.
>
> What's in variable 'copyed'?
>
> Can you paste output of --tree=prune?
> -Bill
>
> On Fri, May 4, 2018 at 10:31 AM, Jason Kenny <***@live.com> wrote:
>
> Hi,
>
> I am setting up a build with SCons that has to build openssl. I am using
> the Command() logic to call the native build system. I am having an issue
> with this code wanting to rebuild because of a file "crypto/buildinf.h" is
> rebuilt as part of the process with a new date value/ This causes SCons to
> say stuff needs to be rebuilt. The issue here is an odd circular reference
> that is forming up and I am unclear on what is adding it at this time. I am
> hoping before I dig to deep into this that some one might know, or have
> some idea on what is happening. Details
>
> I have a two commands:
>
> out = env.Command(
> ["Makefile"],
> copyed,
> "cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128
> \
> --prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
> --openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\
> "
> )
>
> Then I have a command
> env.Ignore(out, ["crypto/buildinf.h"])
>
> env.Command(
> [
> env.File("crypto/buildinf.h"),
> "#_makeinstall/${PART_NAME}/bin/c_rehash",
> ...
> ],
> ["Makefile"],
> [
> "cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)"
> .format(jobs=env.GetOption('num_jobs')),
> "cd ${SOURCE.dir} ; make install"
> ] )
>
> What is happening is that after the first run Scons will tell me it needs
> to rebuild because:
>
> scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile'
> because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h'
> changed
>
> I have an Ignore line that should remove this... What is odd for me is
> that the next build command is run because:
> scons: rebuilding `_build/build_debug_posix-x86_
> 64/openssl/crypto/buildinf.h' because `_build/build_debug_posix-x86_
> 64/openssl/Makefile' changed
>
> I seem to have a cycle of some kind. I am unclear on how to break it.
>
> I am unclear on what scanner is adding this depends in Command. Do we have
> a generic Makefile scanner??
> Any thoughts??
>
> Jason
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Ccae88553915f47d8c91a08d5b1d5712f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610452634906164&sdata=LJ6F2%2BiZCnp1WZOIAfNDmAs4%2F3h3JJNnFtz0GnVCX4g%3D&reserved=0>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
Jason Kenny
2018-05-05 00:29:32 UTC
Permalink
In Parts the VCS_DIR is where the code is checked out too. The BUILD_DIR is basically the SCons Variant directory for the given “Part”/component. I was copying data to this place as OpenSSL does not have an out of source build option, and as such would “pollute” the source area.

I was looking at it more in details. If I build
“Scons _build/build_debug_posix-x86_64/openssl/Makefile”

Everything is fine SCons says everything is up to date the next round. If I build “_makeinstall/openssl/bin/c_rehash” which is defined in the second Command() the next pass has this problem. It seems for some reason once the generated building.h file is generated something is adding it as a depends. I am not sure at the moment if this is seen as implicit or explicated by the system. I am assuming it is implicate and being added by a scanner. However I have not found what added it as of yet. I don’t think it is anything in Parts. I did notice that if I remove the copyed->[] after everything is built remove the scons db file everything is fine. I think it has to do with my coping object as the source and they are getting scanned by the c-scanner but I am unclear how this would be adding it as a depends to the target. It has been a while since I have been in this code. I think SCons does not make a tree like:

Foo.exe
+ foo.obj
+ foo.c
+foo.h

But makes a

Foo.exe
+ foo.obj
+ foo.c
+ foo.h

My theory is the since SCons does the last case. Scons might be adding “generated” file of the openssl make build via the scanner at the wrong level. Since Scons would add the .h file not as a depends of the .c but to the target that depends on the .c file.

I think I need to do a test run with the C-scanner disabled to verify this

Jason

From: Scons-users <scons-users-***@scons.org> On Behalf Of Bill Deegan
Sent: Friday, May 4, 2018 3:23 PM
To: SCons users mailing list <scons-***@scons.org>
Subject: Re: [Scons-users] Having issue with scanner in Command()

What's VCS_DIR and BUILD_DIR ?

On Fri, May 4, 2018 at 1:18 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
to simplify the log file the tree looks like this:
+-build::alias::openssl
+-build::alias::openssl::SDKBIN
| +-_sdks/debug_posix-x86_64_default/openssl_1.1.0_51bed083228027f76730230d116bace9/bin/c_rehash
| | +-_build/build_debug_posix-x86_64/openssl/_set_RPATH_/c_rehash
| | +-_makeinstall/openssl/bin/c_rehash
| | +-_build/build_debug_posix-x86_64/openssl/Makefile
| | +-_build/build_debug_posix-x86_64/openssl/crypto/ripemd/build.info<https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>
| | | +-_vcs/openssl/crypto/ripemd/build.info<https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>
....
| | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_win.c]
| | +-[_build/build_debug_posix-x86_64/openssl/crypto/arm_arch.h]
| | +-_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h
| | | +-[_build/build_debug_posix-x86_64/openssl/Makefile]
| | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_nyi.c]


I am not sure why _makeinstall/openssl/bin/c_rehash -> _build/build_debug_posix-x86_64/openssl/Makefile ->_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h -> _build/build_debug_posix-x86_64/openssl/Makefile

I would think c_rehash should depend on the Makefile. I would not think Scons would "know" anything about buildinf.h

- Jason
________________________________
From: Jason Kenny <***@live.com<mailto:***@live.com>>
Sent: Friday, May 4, 2018 11:26 AM

To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()

copyed was me coping data to the variant directory to allow cross build to work better

log file is here https://bitbucket.org/snippets/dragon512/KeGax5<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fsnippets%2Fdragon512%2FKeGax5&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=%2Fn83xUdN3J5rmYczw5ss%2F9zcjkQnka5BC1nqEw8eLtk%3D&reserved=0>


Below is the Parts file I have been hacking on ( I hope to clean it up more...) It is based on work I have yet to publish in Parts in my branch.


-----
Import('*')
PartVersion("1.1.0")
files = Pattern(src_dir="${VCS_DIR}", excludes=[".git/*"])

copyed = env.CCopy(
source=files,
target="$BUILD_DIR",
copy_logic=CCopy.copy # could hard links be an issue????
)
out = env.Command(
["Makefile"],
copyed,
"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\
--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\
"
)

# env.Ignore("_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h","${VCS_DIR}/crypto/buildinf.h")
env.Ignore(out, ["crypto/buildinf.h"])



out = env.Command(
[
env.File("crypto/buildinf.h"),
"#_makeinstall/${PART_NAME}/bin/c_rehash",
"#_makeinstall/${PART_NAME}/bin/openssl",
"#_makeinstall/${PART_NAME}/include/openssl/aes.h",
"#_makeinstall/${PART_NAME}/include/openssl/camellia.h",
"#_makeinstall/${PART_NAME}/include/openssl/des.h",
"#_makeinstall/${PART_NAME}/include/openssl/e_os2.h",
"#_makeinstall/${PART_NAME}/include/openssl/md5.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem2.h",
"#_makeinstall/${PART_NAME}/include/openssl/rsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/stack.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509_vfy.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1.h",
"#_makeinstall/${PART_NAME}/include/openssl/cast.h",
"#_makeinstall/${PART_NAME}/include/openssl/dh.h",
"#_makeinstall/${PART_NAME}/include/openssl/err.h",
"#_makeinstall/${PART_NAME}/include/openssl/mdc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem.h",
"#_makeinstall/${PART_NAME}/include/openssl/safestack.h",
"#_makeinstall/${PART_NAME}/include/openssl/symhacks.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/cmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/dsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/evp.h",
"#_makeinstall/${PART_NAME}/include/openssl/modes.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs12.h",
"#_makeinstall/${PART_NAME}/include/openssl/seed.h",
"#_makeinstall/${PART_NAME}/include/openssl/tls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1t.h",
"#_makeinstall/${PART_NAME}/include/openssl/cms.h",
"#_makeinstall/${PART_NAME}/include/openssl/dtls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/hmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/objects.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs7.h",
"#_makeinstall/${PART_NAME}/include/openssl/sha.h",
"#_makeinstall/${PART_NAME}/include/openssl/ts.h",
"#_makeinstall/${PART_NAME}/include/openssl/async.h",
"#_makeinstall/${PART_NAME}/include/openssl/comp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ebcdic.h",
"#_makeinstall/${PART_NAME}/include/openssl/idea.h",
"#_makeinstall/${PART_NAME}/include/openssl/obj_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/rand.h",
"#_makeinstall/${PART_NAME}/include/openssl/srp.h",
"#_makeinstall/${PART_NAME}/include/openssl/txt_db.h",
"#_makeinstall/${PART_NAME}/include/openssl/bio.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf_api.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdh.h",
"#_makeinstall/${PART_NAME}/include/openssl/kdf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ocsp.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/srtp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ui.h",
"#_makeinstall/${PART_NAME}/include/openssl/blowfish.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/lhash.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslconf.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl2.h",
"#_makeinstall/${PART_NAME}/include/openssl/whrlpool.h",
"#_makeinstall/${PART_NAME}/include/openssl/bn.h",
"#_makeinstall/${PART_NAME}/include/openssl/crypto.h",
"#_makeinstall/${PART_NAME}/include/openssl/ec.h",
"#_makeinstall/${PART_NAME}/include/openssl/md2.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslv.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc5.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl3.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509.h",
"#_makeinstall/${PART_NAME}/include/openssl/buffer.h",
"#_makeinstall/${PART_NAME}/include/openssl/ct.h",
"#_makeinstall/${PART_NAME}/include/openssl/engine.h",
"#_makeinstall/${PART_NAME}/include/openssl/md4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ossl_typ.h",
"#_makeinstall/${PART_NAME}/include/openssl/ripemd.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509v3.h",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/afalg.so",
"#_makeinstall/${PART_NAME}/lib/libssl.a",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/capi.so",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/padlock.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so.1.1",
"#_makeinstall/${PART_NAME}/lib/libcrypto.a",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libcrypto.pc",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libssl.pc",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so.1.1",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/openssl.pc",
],
["Makefile"],
[
"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
"cd ${SOURCE.dir} ; make install"
]
)

env.InstallBin(
env.Glob("#_makeinstall/${PART_NAME}/bin/*")
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/*.a"), auto_add_libs=False)
env.InstallLib(
env.Glob("#_makeinstall/${PART_NAME}/lib/*.so*")

)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/libengines-1.1/*.so"), auto_add_libs=False, sub_dir="libengines-1.1")
env.InstallInclude( # bug we need to fix -JK
env.SdkInclude(
env.Glob("#_makeinstall/${PART_NAME}/include/openssl/*"),
sub_dir="openssl",
add_to_path=False
),
sub_dir="openssl"
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/pkgconfig/*.pc"), auto_add_libs=False, sub_dir="pkgconfig", add_to_path=False)


________________________________
From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> on behalf of Bill Deegan <***@baddogconsulting.com<mailto:***@baddogconsulting.com>>
Sent: Friday, May 4, 2018 10:40 AM
To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()

Jason,

I"m not aware of a Makefile scanner.

What's in variable 'copyed'?

Can you paste output of --tree=prune?
-Bill

On Fri, May 4, 2018 at 10:31 AM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
Hi,

I am setting up a build with SCons that has to build openssl. I am using the Command() logic to call the native build system. I am having an issue with this code wanting to rebuild because of a file "crypto/buildinf.h" is rebuilt as part of the process with a new date value/ This causes SCons to say stuff needs to be rebuilt. The issue here is an odd circular reference that is forming up and I am unclear on what is adding it at this time. I am hoping before I dig to deep into this that some one might know, or have some idea on what is happening. Details

I have a two commands:

out = env.Command(
["Makefile"],
copyed,
"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\
--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\
"
)

Then I have a command
env.Ignore(out, ["crypto/buildinf.h"])

env.Command(
[
env.File("crypto/buildinf.h"),
"#_makeinstall/${PART_NAME}/bin/c_rehash",
...
],
["Makefile"],
[
"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
"cd ${SOURCE.dir} ; make install"
] )

What is happening is that after the first run Scons will tell me it needs to rebuild because:
scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile' because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' changed

I have an Ignore line that should remove this... What is odd for me is that the next build command is run because:
scons: rebuilding `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' because `_build/build_debug_posix-x86_64/openssl/Makefile' changed

I seem to have a cycle of some kind. I am unclear on how to break it.

I am unclear on what scanner is adding this depends in Command. Do we have a generic Makefile scanner??
Any thoughts??

Jason

_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Ccae88553915f47d8c91a08d5b1d5712f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610452634906164&sdata=LJ6F2%2BiZCnp1WZOIAfNDmAs4%2F3h3JJNnFtz0GnVCX4g%3D&reserved=0>


_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=6C3axeb9ZEUCd0ra2hdKQ8%2BP5Nr1WGdNl0wPQPgBAwI%3D&reserved=0>
Jason Kenny
2018-05-14 16:44:03 UTC
Permalink
Hi Bill
I was out traveling last week, however, I made some progress on this.
If I disable the scanner ( changed the code to always return [] ) The build worked fine. So the issue is the scanner and how it adds depends to a target. I am unclear on why Ignore() is not working as expected. Scons wants to keep rebuilding because buildinf.h changed. If I don't have the Ignore() I get an error from the taskmaster on the second run with a circular depends. I would expect the only Ignore call would prevent rebuilds
As a workaround, I change the code from using the Parts Pattern object. which is basically a recursive Glob() at this point, to just copy the openssl source directory to the variant directory. This work as the c scanner is global on any C file being defined. By making this a directory the copy logic does not define any C file nodes. Since the C files are not defined as nodes they are not seen by the scanner to be scanned and added as a depends to the target of the Command() that generated the Makefile.
Is there an official way to turn off the scanner for a given command?? Or is this more of a bug with the Ignore() logic as Scons does not seem to "fully" ignore the depends added by the scanner.
either way, I have a workaround. However, it seems this is could be an unexpected catch 22 for people that have to call a "third party" build system to get a full build to work.
-Jason

________________________________
From: Jason Kenny
Sent: Friday, May 4, 2018 7:29 PM
To: SCons users mailing list
Subject: RE: [Scons-users] Having issue with scanner in Command()


In Parts the VCS_DIR is where the code is checked out too. The BUILD_DIR is basically the SCons Variant directory for the given “Part”/component. I was copying data to this place as OpenSSL does not have an out of source build option, and as such would “pollute” the source area.



I was looking at it more in details. If I build

“Scons _build/build_debug_posix-x86_64/openssl/Makefile”



Everything is fine SCons says everything is up to date the next round. If I build “_makeinstall/openssl/bin/c_rehash” which is defined in the second Command() the next pass has this problem. It seems for some reason once the generated building.h file is generated something is adding it as a depends. I am not sure at the moment if this is seen as implicit or explicated by the system. I am assuming it is implicate and being added by a scanner. However I have not found what added it as of yet. I don’t think it is anything in Parts. I did notice that if I remove the copyed->[] after everything is built remove the scons db file everything is fine. I think it has to do with my coping object as the source and they are getting scanned by the c-scanner but I am unclear how this would be adding it as a depends to the target. It has been a while since I have been in this code. I think SCons does not make a tree like:



Foo.exe

+ foo.obj

+ foo.c

+foo.h



But makes a



Foo.exe

+ foo.obj

+ foo.c

+ foo.h



My theory is the since SCons does the last case. Scons might be adding “generated” file of the openssl make build via the scanner at the wrong level. Since Scons would add the .h file not as a depends of the .c but to the target that depends on the .c file.



I think I need to do a test run with the C-scanner disabled to verify this



Jason



From: Scons-users <scons-users-***@scons.org> On Behalf Of Bill Deegan
Sent: Friday, May 4, 2018 3:23 PM
To: SCons users mailing list <scons-***@scons.org>
Subject: Re: [Scons-users] Having issue with scanner in Command()



What's VCS_DIR and BUILD_DIR ?



On Fri, May 4, 2018 at 1:18 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:

to simplify the log file the tree looks like this:

+-build::alias::openssl

+-build::alias::openssl::SDKBIN

| +-_sdks/debug_posix-x86_64_default/openssl_1.1.0_51bed083228027f76730230d116bace9/bin/c_rehash

| | +-_build/build_debug_posix-x86_64/openssl/_set_RPATH_/c_rehash

| | +-_makeinstall/openssl/bin/c_rehash

| | +-_build/build_debug_posix-x86_64/openssl/Makefile

| | +-_build/build_debug_posix-x86_64/openssl/crypto/ripemd/build.info<https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>

| | | +-_vcs/openssl/crypto/ripemd/build.info<https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>

....

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_win.c]

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/arm_arch.h]

| | +-_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h

| | | +-[_build/build_debug_posix-x86_64/openssl/Makefile]

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_nyi.c]


I am not sure why _makeinstall/openssl/bin/c_rehash -> _build/build_debug_posix-x86_64/openssl/Makefile ->_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h -> _build/build_debug_posix-x86_64/openssl/Makefile

I would think c_rehash should depend on the Makefile. I would not think Scons would "know" anything about buildinf.h

- Jason

________________________________

From: Jason Kenny <***@live.com<mailto:***@live.com>>
Sent: Friday, May 4, 2018 11:26 AM

To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()



copyed was me coping data to the variant directory to allow cross build to work better

log file is here https://bitbucket.org/snippets/dragon512/KeGax5<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fsnippets%2Fdragon512%2FKeGax5&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=%2Fn83xUdN3J5rmYczw5ss%2F9zcjkQnka5BC1nqEw8eLtk%3D&reserved=0>


Below is the Parts file I have been hacking on ( I hope to clean it up more...) It is based on work I have yet to publish in Parts in my branch.


-----
Import('*')
PartVersion("1.1.0")
files = Pattern(src_dir="${VCS_DIR}", excludes=[".git/*"])

copyed = env.CCopy(
source=files,
target="$BUILD_DIR",
copy_logic=CCopy.copy # could hard links be an issue????
)
out = env.Command(
["Makefile"],
copyed,
"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\
--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\
"
)

# env.Ignore("_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h","${VCS_DIR}/crypto/buildinf.h")
env.Ignore(out, ["crypto/buildinf.h"])



out = env.Command(
[
env.File("crypto/buildinf.h"),
"#_makeinstall/${PART_NAME}/bin/c_rehash",
"#_makeinstall/${PART_NAME}/bin/openssl",
"#_makeinstall/${PART_NAME}/include/openssl/aes.h",
"#_makeinstall/${PART_NAME}/include/openssl/camellia.h",
"#_makeinstall/${PART_NAME}/include/openssl/des.h",
"#_makeinstall/${PART_NAME}/include/openssl/e_os2.h",
"#_makeinstall/${PART_NAME}/include/openssl/md5.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem2.h",
"#_makeinstall/${PART_NAME}/include/openssl/rsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/stack.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509_vfy.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1.h",
"#_makeinstall/${PART_NAME}/include/openssl/cast.h",
"#_makeinstall/${PART_NAME}/include/openssl/dh.h",
"#_makeinstall/${PART_NAME}/include/openssl/err.h",
"#_makeinstall/${PART_NAME}/include/openssl/mdc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem.h",
"#_makeinstall/${PART_NAME}/include/openssl/safestack.h",
"#_makeinstall/${PART_NAME}/include/openssl/symhacks.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/cmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/dsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/evp.h",
"#_makeinstall/${PART_NAME}/include/openssl/modes.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs12.h",
"#_makeinstall/${PART_NAME}/include/openssl/seed.h",
"#_makeinstall/${PART_NAME}/include/openssl/tls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1t.h",
"#_makeinstall/${PART_NAME}/include/openssl/cms.h",
"#_makeinstall/${PART_NAME}/include/openssl/dtls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/hmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/objects.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs7.h",
"#_makeinstall/${PART_NAME}/include/openssl/sha.h",
"#_makeinstall/${PART_NAME}/include/openssl/ts.h",
"#_makeinstall/${PART_NAME}/include/openssl/async.h",
"#_makeinstall/${PART_NAME}/include/openssl/comp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ebcdic.h",
"#_makeinstall/${PART_NAME}/include/openssl/idea.h",
"#_makeinstall/${PART_NAME}/include/openssl/obj_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/rand.h",
"#_makeinstall/${PART_NAME}/include/openssl/srp.h",
"#_makeinstall/${PART_NAME}/include/openssl/txt_db.h",
"#_makeinstall/${PART_NAME}/include/openssl/bio.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf_api.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdh.h",
"#_makeinstall/${PART_NAME}/include/openssl/kdf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ocsp.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/srtp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ui.h",
"#_makeinstall/${PART_NAME}/include/openssl/blowfish.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/lhash.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslconf.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl2.h",
"#_makeinstall/${PART_NAME}/include/openssl/whrlpool.h",
"#_makeinstall/${PART_NAME}/include/openssl/bn.h",
"#_makeinstall/${PART_NAME}/include/openssl/crypto.h",
"#_makeinstall/${PART_NAME}/include/openssl/ec.h",
"#_makeinstall/${PART_NAME}/include/openssl/md2.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslv.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc5.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl3.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509.h",
"#_makeinstall/${PART_NAME}/include/openssl/buffer.h",
"#_makeinstall/${PART_NAME}/include/openssl/ct.h",
"#_makeinstall/${PART_NAME}/include/openssl/engine.h",
"#_makeinstall/${PART_NAME}/include/openssl/md4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ossl_typ.h",
"#_makeinstall/${PART_NAME}/include/openssl/ripemd.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509v3.h",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/afalg.so",
"#_makeinstall/${PART_NAME}/lib/libssl.a",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/capi.so",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/padlock.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so.1.1",
"#_makeinstall/${PART_NAME}/lib/libcrypto.a",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libcrypto.pc",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libssl.pc",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so.1.1",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/openssl.pc",
],
["Makefile"],
[
"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
"cd ${SOURCE.dir} ; make install"
]
)

env.InstallBin(
env.Glob("#_makeinstall/${PART_NAME}/bin/*")
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/*.a"), auto_add_libs=False)
env.InstallLib(
env.Glob("#_makeinstall/${PART_NAME}/lib/*.so*")

)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/libengines-1.1/*.so"), auto_add_libs=False, sub_dir="libengines-1.1")
env.InstallInclude( # bug we need to fix -JK
env.SdkInclude(
env.Glob("#_makeinstall/${PART_NAME}/include/openssl/*"),
sub_dir="openssl",
add_to_path=False
),
sub_dir="openssl"
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/pkgconfig/*.pc"), auto_add_libs=False, sub_dir="pkgconfig", add_to_path=False)



________________________________

From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> on behalf of Bill Deegan <***@baddogconsulting.com<mailto:***@baddogconsulting.com>>
Sent: Friday, May 4, 2018 10:40 AM
To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()



Jason,



I"m not aware of a Makefile scanner.



What's in variable 'copyed'?



Can you paste output of --tree=prune?

-Bill



On Fri, May 4, 2018 at 10:31 AM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:

Hi,

I am setting up a build with SCons that has to build openssl. I am using the Command() logic to call the native build system. I am having an issue with this code wanting to rebuild because of a file "crypto/buildinf.h" is rebuilt as part of the process with a new date value/ This causes SCons to say stuff needs to be rebuilt. The issue here is an odd circular reference that is forming up and I am unclear on what is adding it at this time. I am hoping before I dig to deep into this that some one might know, or have some idea on what is happening. Details

I have a two commands:

out = env.Command(

["Makefile"],

copyed,

"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\

--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\

--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\

"

)

Then I have a command

env.Ignore(out, ["crypto/buildinf.h"])



env.Command(
[

env.File("crypto/buildinf.h"),

"#_makeinstall/${PART_NAME}/bin/c_rehash",

...

],

["Makefile"],

[

"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),

"cd ${SOURCE.dir} ; make install"

] )



What is happening is that after the first run Scons will tell me it needs to rebuild because:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile' because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' changed

I have an Ignore line that should remove this... What is odd for me is that the next build command is run because:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' because `_build/build_debug_posix-x86_64/openssl/Makefile' changed

I seem to have a cycle of some kind. I am unclear on how to break it.

I am unclear on what scanner is adding this depends in Command. Do we have a generic Makefile scanner??
Any thoughts??

Jason
Bill Deegan
2018-05-14 17:05:02 UTC
Permalink
Jason,

I believe I have a patch for the rebuilds.
I found a simliar issue working on another problem.

If sconsign crashes reading the .sconsign then you likely have the same
issue.
Give it a try and let me know.
I'm away from computer for a bit, but I'll send you the patch to try.
Basically the sconsign ends up with mismatched md5's for file names but
only when ignore is being used because the names aren't filtered, but the
md5's are.

-Bill


On Mon, May 14, 2018 at 12:44 PM, Jason Kenny <***@live.com> wrote:

> Hi Bill
> I was out traveling last week, however, I made some progress on this.
> If I disable the scanner ( changed the code to always return [] ) The
> build worked fine. So the issue is the scanner and how it adds depends to a
> target. I am unclear on why Ignore() is not working as expected. Scons
> wants to keep rebuilding because buildinf.h changed. If I don't have the
> Ignore() I get an error from the taskmaster on the second run with a
> circular depends. I would expect the only Ignore call would prevent rebuilds
> As a workaround, I change the code from using the Parts Pattern object.
> which is basically a recursive Glob() at this point, to just copy the
> openssl source directory to the variant directory. This work as the c
> scanner is global on any C file being defined. By making this a directory
> the copy logic does not define any C file nodes. Since the C files are not
> defined as nodes they are not seen by the scanner to be scanned and added
> as a depends to the target of the Command() that generated the Makefile.
> Is there an official way to turn off the scanner for a given command?? Or
> is this more of a bug with the Ignore() logic as Scons does not seem to
> "fully" ignore the depends added by the scanner.
> either way, I have a workaround. However, it seems this is could be an
> unexpected catch 22 for people that have to call a "third party" build
> system to get a full build to work.
> -Jason
>
> ------------------------------
> *From:* Jason Kenny
> *Sent:* Friday, May 4, 2018 7:29 PM
> *To:* SCons users mailing list
> *Subject:* RE: [Scons-users] Having issue with scanner in Command()
>
>
> In Parts the VCS_DIR is where the code is checked out too. The BUILD_DIR
> is basically the SCons Variant directory for the given “Part”/component. I
> was copying data to this place as OpenSSL does not have an out of source
> build option, and as such would “pollute” the source area.
>
>
>
> I was looking at it more in details. If I build
>
> “Scons _build/build_debug_posix-x86_64/openssl/Makefile”
>
>
>
> Everything is fine SCons says everything is up to date the next round. If
> I build “_makeinstall/openssl/bin/c_rehash” which is defined in the
> second Command() the next pass has this problem. It seems for some reason
> once the generated building.h file is generated something is adding it as a
> depends. I am not sure at the moment if this is seen as implicit or
> explicated by the system. I am assuming it is implicate and being added by
> a scanner. However I have not found what added it as of yet. I don’t think
> it is anything in Parts. I did notice that if I remove the copyed->[] after
> everything is built remove the scons db file everything is fine. I think it
> has to do with my coping object as the source and they are getting scanned
> by the c-scanner but I am unclear how this would be adding it as a depends
> to the target. It has been a while since I have been in this code. I think
> SCons does not make a tree like:
>
>
>
> Foo.exe
>
> + foo.obj
>
> + foo.c
>
> +foo.h
>
>
>
> But makes a
>
>
>
> Foo.exe
>
> + foo.obj
>
> + foo.c
>
> + foo.h
>
>
>
> My theory is the since SCons does the last case. Scons might be adding
> “generated” file of the openssl make build via the scanner at the wrong
> level. Since Scons would add the .h file not as a depends of the .c but to
> the target that depends on the .c file.
>
>
>
> I think I need to do a test run with the C-scanner disabled to verify this
>
>
>
> Jason
>
>
>
> *From:* Scons-users <scons-users-***@scons.org> *On Behalf Of *Bill
> Deegan
> *Sent:* Friday, May 4, 2018 3:23 PM
> *To:* SCons users mailing list <scons-***@scons.org>
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> What's VCS_DIR and BUILD_DIR ?
>
>
>
> On Fri, May 4, 2018 at 1:18 PM, Jason Kenny <***@live.com> wrote:
>
> to simplify the log file the tree looks like this:
>
> +-build::alias::openssl
>
> +-build::alias::openssl::SDKBIN
>
> | +-_sdks/debug_posix-x86_64_default/openssl_1.1.0_
> 51bed083228027f76730230d116bace9/bin/c_rehash
>
> | | +-_build/build_debug_posix-x86_64/openssl/_set_RPATH_/c_rehash
>
> | | +-_makeinstall/openssl/bin/c_rehash
>
> | | +-_build/build_debug_posix-x86_64/openssl/Makefile
>
> | | +-_build/build_debug_posix-x86_64/openssl/crypto/ripemd/build.info
> <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>
>
> | | | +-_vcs/openssl/crypto/ripemd/build.info
> <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>
>
> ....
>
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_win.c]
>
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/arm_arch.h]
>
> | | +-_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h
>
> | | | +-[_build/build_debug_posix-x86_64/openssl/Makefile]
>
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_nyi.c]
>
>
>
> I am not sure why _makeinstall/openssl/bin/c_rehash ->
> _build/build_debug_posix-x86_64/openssl/Makefile ->
> _build/build_debug_posix-x86_64/openssl/crypto/buildinf.h ->
> _build/build_debug_posix-x86_64/openssl/Makefile
>
> I would think c_rehash should depend on the Makefile. I would not think
> Scons would "know" anything about buildinf.h
>
> - Jason
> ------------------------------
>
> *From:* Jason Kenny <***@live.com>
> *Sent:* Friday, May 4, 2018 11:26 AM
>
>
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> *copyed* was me coping data to the variant directory to allow cross build
> to work better
>
> log file is here https://bitbucket.org/snippets/dragon512/KeGax5
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fsnippets%2Fdragon512%2FKeGax5&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=%2Fn83xUdN3J5rmYczw5ss%2F9zcjkQnka5BC1nqEw8eLtk%3D&reserved=0>
>
>
> Below is the Parts file I have been hacking on ( I hope to clean it up
> more...) It is based on work I have yet to publish in Parts in my branch.
>
>
> -----
> Import('*')
> PartVersion("1.1.0")
> files = Pattern(src_dir="${VCS_DIR}", excludes=[".git/*"])
>
> copyed = env.CCopy(
> source=files,
> target="$BUILD_DIR",
> copy_logic=CCopy.copy # could hard links be an issue????
> )
> out = env.Command(
> ["Makefile"],
> copyed,
> "cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH
> enable-ec_nistp_64_gcc_128\
> --prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
> --openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64
> shared\
> "
> )
>
> # env.Ignore("_build/build_debug_posix-x86_64/openssl/
> crypto/buildinf.h","${VCS_DIR}/crypto/buildinf.h")
> env.Ignore(out, ["crypto/buildinf.h"])
>
>
>
> out = env.Command(
> [
> env.File("crypto/buildinf.h"),
> "#_makeinstall/${PART_NAME}/bin/c_rehash",
> "#_makeinstall/${PART_NAME}/bin/openssl",
> "#_makeinstall/${PART_NAME}/include/openssl/aes.h",
> "#_makeinstall/${PART_NAME}/include/openssl/camellia.h",
> "#_makeinstall/${PART_NAME}/include/openssl/des.h",
> "#_makeinstall/${PART_NAME}/include/openssl/e_os2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md5.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pem2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/stack.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509_vfy.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cast.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dh.h",
> "#_makeinstall/${PART_NAME}/include/openssl/err.h",
> "#_makeinstall/${PART_NAME}/include/openssl/mdc2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pem.h",
> "#_makeinstall/${PART_NAME}/include/openssl/safestack.h",
> "#_makeinstall/${PART_NAME}/include/openssl/symhacks.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1_mac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cmac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/evp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/modes.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pkcs12.h",
> "#_makeinstall/${PART_NAME}/include/openssl/seed.h",
> "#_makeinstall/${PART_NAME}/include/openssl/tls1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1t.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cms.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dtls1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/hmac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/objects.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pkcs7.h",
> "#_makeinstall/${PART_NAME}/include/openssl/sha.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ts.h",
> "#_makeinstall/${PART_NAME}/include/openssl/async.h",
> "#_makeinstall/${PART_NAME}/include/openssl/comp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ebcdic.h",
> "#_makeinstall/${PART_NAME}/include/openssl/idea.h",
> "#_makeinstall/${PART_NAME}/include/openssl/obj_mac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rand.h",
> "#_makeinstall/${PART_NAME}/include/openssl/srp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/txt_db.h",
> "#_makeinstall/${PART_NAME}/include/openssl/bio.h",
> "#_makeinstall/${PART_NAME}/include/openssl/conf_api.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ecdh.h",
> "#_makeinstall/${PART_NAME}/include/openssl/kdf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ocsp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/srtp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ui.h",
> "#_makeinstall/${PART_NAME}/include/openssl/blowfish.h",
> "#_makeinstall/${PART_NAME}/include/openssl/conf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ecdsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/lhash.h",
> "#_makeinstall/${PART_NAME}/include/openssl/opensslconf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc4.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/whrlpool.h",
> "#_makeinstall/${PART_NAME}/include/openssl/bn.h",
> "#_makeinstall/${PART_NAME}/include/openssl/crypto.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ec.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/opensslv.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc5.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl3.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509.h",
> "#_makeinstall/${PART_NAME}/include/openssl/buffer.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ct.h",
> "#_makeinstall/${PART_NAME}/include/openssl/engine.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md4.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ossl_typ.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ripemd.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509v3.h",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/afalg.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.a",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/capi.so",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/padlock.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.so.1.1",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.a",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/libcrypto.pc",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/libssl.pc",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.so",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.so.1.1",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/openssl.pc",
> ],
> ["Makefile"],
> [
> "cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}}
> $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
> "cd ${SOURCE.dir} ; make install"
> ]
> )
>
> env.InstallBin(
> env.Glob("#_makeinstall/${PART_NAME}/bin/*")
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/*.a"),
> auto_add_libs=False)
> env.InstallLib(
> env.Glob("#_makeinstall/${PART_NAME}/lib/*.so*")
>
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/libengines-1.1/*.so"),
> auto_add_libs=False, sub_dir="libengines-1.1")
> env.InstallInclude( # bug we need to fix -JK
> env.SdkInclude(
> env.Glob("#_makeinstall/${PART_NAME}/include/openssl/*"),
> sub_dir="openssl",
> add_to_path=False
> ),
> sub_dir="openssl"
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/pkgconfig/*.pc"),
> auto_add_libs=False, sub_dir="pkgconfig", add_to_path=False)
>
>
> ------------------------------
>
> *From:* Scons-users <scons-users-***@scons.org> on behalf of Bill
> Deegan <***@baddogconsulting.com>
> *Sent:* Friday, May 4, 2018 10:40 AM
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> Jason,
>
>
>
> I"m not aware of a Makefile scanner.
>
>
>
> What's in variable 'copyed'?
>
>
>
> Can you paste output of --tree=prune?
>
> -Bill
>
>
>
> On Fri, May 4, 2018 at 10:31 AM, Jason Kenny <***@live.com> wrote:
>
> Hi,
>
> I am setting up a build with SCons that has to build openssl. I am using
> the Command() logic to call the native build system. I am having an issue
> with this code wanting to rebuild because of a file "crypto/buildinf.h" is
> rebuilt as part of the process with a new date value/ This causes SCons to
> say stuff needs to be rebuilt. The issue here is an odd circular reference
> that is forming up and I am unclear on what is adding it at this time. I am
> hoping before I dig to deep into this that some one might know, or have
> some idea on what is happening. Details
>
> I have a two commands:
>
>
> out = env.Command(
>
> ["Makefile"],
>
> copyed,
>
> "cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH
> enable-ec_nistp_64_gcc_128\
>
> --prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
>
> --openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64
> shared\
>
> "
>
> )
>
>
> Then I have a command
>
> env.Ignore(out, ["crypto/buildinf.h"])
>
>
>
> env.Command(
> [
>
> env.File("crypto/buildinf.h"),
>
> "#_makeinstall/${PART_NAME}/bin/c_rehash",
>
> ...
>
> ],
>
> ["Makefile"],
>
> [
>
> "cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}}
> $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
>
> "cd ${SOURCE.dir} ; make install"
>
> ] )
>
>
>
> What is happening is that after the first run Scons will tell me it needs
> to rebuild because:
>
> scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile'
> because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h'
> changed
>
> I have an Ignore line that should remove this... What is odd for me is
> that the next build command is run because:
>
> scons: rebuilding `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h'
> because `_build/build_debug_posix-x86_64/openssl/Makefile' changed
>
>
> I seem to have a cycle of some kind. I am unclear on how to break it.
>
>
> I am unclear on what scanner is adding this depends in Command. Do we have
> a generic Makefile scanner??
> Any thoughts??
>
> Jason
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Ccae88553915f47d8c91a08d5b1d5712f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610452634906164&sdata=LJ6F2%2BiZCnp1WZOIAfNDmAs4%2F3h3JJNnFtz0GnVCX4g%3D&reserved=0>
>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=6C3axeb9ZEUCd0ra2hdKQ8%2BP5Nr1WGdNl0wPQPgBAwI%3D&reserved=0>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
Jason Kenny
2018-05-14 18:05:18 UTC
Permalink
will be happy to try it out
-Jason
________________________________
From: Scons-users <scons-users-***@scons.org> on behalf of Bill Deegan <***@baddogconsulting.com>
Sent: Monday, May 14, 2018 12:05 PM
To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()

Jason,

I believe I have a patch for the rebuilds.
I found a simliar issue working on another problem.

If sconsign crashes reading the .sconsign then you likely have the same issue.
Give it a try and let me know.
I'm away from computer for a bit, but I'll send you the patch to try.
Basically the sconsign ends up with mismatched md5's for file names but only when ignore is being used because the names aren't filtered, but the md5's are.

-Bill


On Mon, May 14, 2018 at 12:44 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
Hi Bill
I was out traveling last week, however, I made some progress on this.
If I disable the scanner ( changed the code to always return [] ) The build worked fine. So the issue is the scanner and how it adds depends to a target. I am unclear on why Ignore() is not working as expected. Scons wants to keep rebuilding because buildinf.h changed. If I don't have the Ignore() I get an error from the taskmaster on the second run with a circular depends. I would expect the only Ignore call would prevent rebuilds
As a workaround, I change the code from using the Parts Pattern object. which is basically a recursive Glob() at this point, to just copy the openssl source directory to the variant directory. This work as the c scanner is global on any C file being defined. By making this a directory the copy logic does not define any C file nodes. Since the C files are not defined as nodes they are not seen by the scanner to be scanned and added as a depends to the target of the Command() that generated the Makefile.
Is there an official way to turn off the scanner for a given command?? Or is this more of a bug with the Ignore() logic as Scons does not seem to "fully" ignore the depends added by the scanner.
either way, I have a workaround. However, it seems this is could be an unexpected catch 22 for people that have to call a "third party" build system to get a full build to work.
-Jason

________________________________
From: Jason Kenny
Sent: Friday, May 4, 2018 7:29 PM
To: SCons users mailing list
Subject: RE: [Scons-users] Having issue with scanner in Command()


In Parts the VCS_DIR is where the code is checked out too. The BUILD_DIR is basically the SCons Variant directory for the given “Part”/component. I was copying data to this place as OpenSSL does not have an out of source build option, and as such would “pollute” the source area.



I was looking at it more in details. If I build

“Scons _build/build_debug_posix-x86_64/openssl/Makefile”



Everything is fine SCons says everything is up to date the next round. If I build “_makeinstall/openssl/bin/c_rehash” which is defined in the second Command() the next pass has this problem. It seems for some reason once the generated building.h file is generated something is adding it as a depends. I am not sure at the moment if this is seen as implicit or explicated by the system. I am assuming it is implicate and being added by a scanner. However I have not found what added it as of yet. I don’t think it is anything in Parts. I did notice that if I remove the copyed->[] after everything is built remove the scons db file everything is fine. I think it has to do with my coping object as the source and they are getting scanned by the c-scanner but I am unclear how this would be adding it as a depends to the target. It has been a while since I have been in this code. I think SCons does not make a tree like:



Foo.exe

+ foo.obj

+ foo.c

+foo.h



But makes a



Foo.exe

+ foo.obj

+ foo.c

+ foo.h



My theory is the since SCons does the last case. Scons might be adding “generated” file of the openssl make build via the scanner at the wrong level. Since Scons would add the .h file not as a depends of the .c but to the target that depends on the .c file.



I think I need to do a test run with the C-scanner disabled to verify this



Jason



From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> On Behalf Of Bill Deegan
Sent: Friday, May 4, 2018 3:23 PM
To: SCons users mailing list <scons-***@scons.org<mailto:scons-***@scons.org>>
Subject: Re: [Scons-users] Having issue with scanner in Command()



What's VCS_DIR and BUILD_DIR ?



On Fri, May 4, 2018 at 1:18 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:

to simplify the log file the tree looks like this:

+-build::alias::openssl

+-build::alias::openssl::SDKBIN

| +-_sdks/debug_posix-x86_64_default/openssl_1.1.0_51bed083228027f76730230d116bace9/bin/c_rehash

| | +-_build/build_debug_posix-x86_64/openssl/_set_RPATH_/c_rehash

| | +-_makeinstall/openssl/bin/c_rehash

| | +-_build/build_debug_posix-x86_64/openssl/Makefile

| | +-_build/build_debug_posix-x86_64/openssl/crypto/ripemd/build.info<https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>

| | | +-_vcs/openssl/crypto/ripemd/build.info<https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>

....

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_win.c]

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/arm_arch.h]

| | +-_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h

| | | +-[_build/build_debug_posix-x86_64/openssl/Makefile]

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_nyi.c]


I am not sure why _makeinstall/openssl/bin/c_rehash -> _build/build_debug_posix-x86_64/openssl/Makefile ->_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h -> _build/build_debug_posix-x86_64/openssl/Makefile

I would think c_rehash should depend on the Makefile. I would not think Scons would "know" anything about buildinf.h

- Jason

________________________________

From: Jason Kenny <***@live.com<mailto:***@live.com>>
Sent: Friday, May 4, 2018 11:26 AM

To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()



copyed was me coping data to the variant directory to allow cross build to work better

log file is here https://bitbucket.org/snippets/dragon512/KeGax5<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fsnippets%2Fdragon512%2FKeGax5&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=%2Fn83xUdN3J5rmYczw5ss%2F9zcjkQnka5BC1nqEw8eLtk%3D&reserved=0>


Below is the Parts file I have been hacking on ( I hope to clean it up more...) It is based on work I have yet to publish in Parts in my branch.


-----
Import('*')
PartVersion("1.1.0")
files = Pattern(src_dir="${VCS_DIR}", excludes=[".git/*"])

copyed = env.CCopy(
source=files,
target="$BUILD_DIR",
copy_logic=CCopy.copy # could hard links be an issue????
)
out = env.Command(
["Makefile"],
copyed,
"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\
--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\
"
)

# env.Ignore("_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h","${VCS_DIR}/crypto/buildinf.h")
env.Ignore(out, ["crypto/buildinf.h"])



out = env.Command(
[
env.File("crypto/buildinf.h"),
"#_makeinstall/${PART_NAME}/bin/c_rehash",
"#_makeinstall/${PART_NAME}/bin/openssl",
"#_makeinstall/${PART_NAME}/include/openssl/aes.h",
"#_makeinstall/${PART_NAME}/include/openssl/camellia.h",
"#_makeinstall/${PART_NAME}/include/openssl/des.h",
"#_makeinstall/${PART_NAME}/include/openssl/e_os2.h",
"#_makeinstall/${PART_NAME}/include/openssl/md5.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem2.h",
"#_makeinstall/${PART_NAME}/include/openssl/rsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/stack.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509_vfy.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1.h",
"#_makeinstall/${PART_NAME}/include/openssl/cast.h",
"#_makeinstall/${PART_NAME}/include/openssl/dh.h",
"#_makeinstall/${PART_NAME}/include/openssl/err.h",
"#_makeinstall/${PART_NAME}/include/openssl/mdc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem.h",
"#_makeinstall/${PART_NAME}/include/openssl/safestack.h",
"#_makeinstall/${PART_NAME}/include/openssl/symhacks.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/cmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/dsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/evp.h",
"#_makeinstall/${PART_NAME}/include/openssl/modes.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs12.h",
"#_makeinstall/${PART_NAME}/include/openssl/seed.h",
"#_makeinstall/${PART_NAME}/include/openssl/tls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1t.h",
"#_makeinstall/${PART_NAME}/include/openssl/cms.h",
"#_makeinstall/${PART_NAME}/include/openssl/dtls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/hmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/objects.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs7.h",
"#_makeinstall/${PART_NAME}/include/openssl/sha.h",
"#_makeinstall/${PART_NAME}/include/openssl/ts.h",
"#_makeinstall/${PART_NAME}/include/openssl/async.h",
"#_makeinstall/${PART_NAME}/include/openssl/comp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ebcdic.h",
"#_makeinstall/${PART_NAME}/include/openssl/idea.h",
"#_makeinstall/${PART_NAME}/include/openssl/obj_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/rand.h",
"#_makeinstall/${PART_NAME}/include/openssl/srp.h",
"#_makeinstall/${PART_NAME}/include/openssl/txt_db.h",
"#_makeinstall/${PART_NAME}/include/openssl/bio.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf_api.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdh.h",
"#_makeinstall/${PART_NAME}/include/openssl/kdf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ocsp.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/srtp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ui.h",
"#_makeinstall/${PART_NAME}/include/openssl/blowfish.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/lhash.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslconf.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl2.h",
"#_makeinstall/${PART_NAME}/include/openssl/whrlpool.h",
"#_makeinstall/${PART_NAME}/include/openssl/bn.h",
"#_makeinstall/${PART_NAME}/include/openssl/crypto.h",
"#_makeinstall/${PART_NAME}/include/openssl/ec.h",
"#_makeinstall/${PART_NAME}/include/openssl/md2.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslv.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc5.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl3.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509.h",
"#_makeinstall/${PART_NAME}/include/openssl/buffer.h",
"#_makeinstall/${PART_NAME}/include/openssl/ct.h",
"#_makeinstall/${PART_NAME}/include/openssl/engine.h",
"#_makeinstall/${PART_NAME}/include/openssl/md4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ossl_typ.h",
"#_makeinstall/${PART_NAME}/include/openssl/ripemd.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509v3.h",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/afalg.so",
"#_makeinstall/${PART_NAME}/lib/libssl.a",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/capi.so",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/padlock.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so.1.1",
"#_makeinstall/${PART_NAME}/lib/libcrypto.a",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libcrypto.pc",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libssl.pc",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so.1.1",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/openssl.pc",
],
["Makefile"],
[
"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
"cd ${SOURCE.dir} ; make install"
]
)

env.InstallBin(
env.Glob("#_makeinstall/${PART_NAME}/bin/*")
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/*.a"), auto_add_libs=False)
env.InstallLib(
env.Glob("#_makeinstall/${PART_NAME}/lib/*.so*")

)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/libengines-1.1/*.so"), auto_add_libs=False, sub_dir="libengines-1.1")
env.InstallInclude( # bug we need to fix -JK
env.SdkInclude(
env.Glob("#_makeinstall/${PART_NAME}/include/openssl/*"),
sub_dir="openssl",
add_to_path=False
),
sub_dir="openssl"
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/pkgconfig/*.pc"), auto_add_libs=False, sub_dir="pkgconfig", add_to_path=False)



________________________________

From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> on behalf of Bill Deegan <***@baddogconsulting.com<mailto:***@baddogconsulting.com>>
Sent: Friday, May 4, 2018 10:40 AM
To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()



Jason,



I"m not aware of a Makefile scanner.



What's in variable 'copyed'?



Can you paste output of --tree=prune?

-Bill



On Fri, May 4, 2018 at 10:31 AM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:

Hi,

I am setting up a build with SCons that has to build openssl. I am using the Command() logic to call the native build system. I am having an issue with this code wanting to rebuild because of a file "crypto/buildinf.h" is rebuilt as part of the process with a new date value/ This causes SCons to say stuff needs to be rebuilt. The issue here is an odd circular reference that is forming up and I am unclear on what is adding it at this time. I am hoping before I dig to deep into this that some one might know, or have some idea on what is happening. Details

I have a two commands:

out = env.Command(

["Makefile"],

copyed,

"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\

--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\

--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\

"

)

Then I have a command

env.Ignore(out, ["crypto/buildinf.h"])



env.Command(
[

env.File("crypto/buildinf.h"),

"#_makeinstall/${PART_NAME}/bin/c_rehash",

...

],

["Makefile"],

[

"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),

"cd ${SOURCE.dir} ; make install"

] )



What is happening is that after the first run Scons will tell me it needs to rebuild because:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile' because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' changed

I have an Ignore line that should remove this... What is odd for me is that the next build command is run because:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' because `_build/build_debug_posix-x86_64/openssl/Makefile' changed

I seem to have a cycle of some kind. I am unclear on how to break it.

I am unclear on what scanner is adding this depends in Command. Do we have a generic Makefile scanner??
Any thoughts??

Jason

_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Ccae88553915f47d8c91a08d5b1d5712f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610452634906164&sdata=LJ6F2%2BiZCnp1WZOIAfNDmAs4%2F3h3JJNnFtz0GnVCX4g%3D&reserved=0>
Bill Deegan
2018-05-14 20:49:51 UTC
Permalink
Did you try running sconsign on your .sconsign file?

On Mon, May 14, 2018 at 2:05 PM, Jason Kenny <***@live.com> wrote:

> will be happy to try it out
> -Jason
> ------------------------------
> *From:* Scons-users <scons-users-***@scons.org> on behalf of Bill
> Deegan <***@baddogconsulting.com>
> *Sent:* Monday, May 14, 2018 12:05 PM
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
> Jason,
>
> I believe I have a patch for the rebuilds.
> I found a simliar issue working on another problem.
>
> If sconsign crashes reading the .sconsign then you likely have the same
> issue.
> Give it a try and let me know.
> I'm away from computer for a bit, but I'll send you the patch to try.
> Basically the sconsign ends up with mismatched md5's for file names but
> only when ignore is being used because the names aren't filtered, but the
> md5's are.
>
> -Bill
>
>
> On Mon, May 14, 2018 at 12:44 PM, Jason Kenny <***@live.com> wrote:
>
> Hi Bill
> I was out traveling last week, however, I made some progress on this.
> If I disable the scanner ( changed the code to always return [] ) The
> build worked fine. So the issue is the scanner and how it adds depends to a
> target. I am unclear on why Ignore() is not working as expected. Scons
> wants to keep rebuilding because buildinf.h changed. If I don't have the
> Ignore() I get an error from the taskmaster on the second run with a
> circular depends. I would expect the only Ignore call would prevent rebuilds
> As a workaround, I change the code from using the Parts Pattern object.
> which is basically a recursive Glob() at this point, to just copy the
> openssl source directory to the variant directory. This work as the c
> scanner is global on any C file being defined. By making this a directory
> the copy logic does not define any C file nodes. Since the C files are not
> defined as nodes they are not seen by the scanner to be scanned and added
> as a depends to the target of the Command() that generated the Makefile.
> Is there an official way to turn off the scanner for a given command?? Or
> is this more of a bug with the Ignore() logic as Scons does not seem to
> "fully" ignore the depends added by the scanner.
> either way, I have a workaround. However, it seems this is could be an
> unexpected catch 22 for people that have to call a "third party" build
> system to get a full build to work.
> -Jason
>
> ------------------------------
> *From:* Jason Kenny
> *Sent:* Friday, May 4, 2018 7:29 PM
> *To:* SCons users mailing list
> *Subject:* RE: [Scons-users] Having issue with scanner in Command()
>
>
> In Parts the VCS_DIR is where the code is checked out too. The BUILD_DIR
> is basically the SCons Variant directory for the given “Part”/component. I
> was copying data to this place as OpenSSL does not have an out of source
> build option, and as such would “pollute” the source area.
>
>
>
> I was looking at it more in details. If I build
>
> “Scons _build/build_debug_posix-x86_64/openssl/Makefile”
>
>
>
> Everything is fine SCons says everything is up to date the next round. If
> I build “_makeinstall/openssl/bin/c_rehash” which is defined in the
> second Command() the next pass has this problem. It seems for some reason
> once the generated building.h file is generated something is adding it as a
> depends. I am not sure at the moment if this is seen as implicit or
> explicated by the system. I am assuming it is implicate and being added by
> a scanner. However I have not found what added it as of yet. I don’t think
> it is anything in Parts. I did notice that if I remove the copyed->[] after
> everything is built remove the scons db file everything is fine. I think it
> has to do with my coping object as the source and they are getting scanned
> by the c-scanner but I am unclear how this would be adding it as a depends
> to the target. It has been a while since I have been in this code. I think
> SCons does not make a tree like:
>
>
>
> Foo.exe
>
> + foo.obj
>
> + foo.c
>
> +foo.h
>
>
>
> But makes a
>
>
>
> Foo.exe
>
> + foo.obj
>
> + foo.c
>
> + foo.h
>
>
>
> My theory is the since SCons does the last case. Scons might be adding
> “generated” file of the openssl make build via the scanner at the wrong
> level. Since Scons would add the .h file not as a depends of the .c but to
> the target that depends on the .c file.
>
>
>
> I think I need to do a test run with the C-scanner disabled to verify this
>
>
>
> Jason
>
>
>
> *From:* Scons-users <scons-users-***@scons.org> *On Behalf Of *Bill
> Deegan
> *Sent:* Friday, May 4, 2018 3:23 PM
> *To:* SCons users mailing list <scons-***@scons.org>
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> What's VCS_DIR and BUILD_DIR ?
>
>
>
> On Fri, May 4, 2018 at 1:18 PM, Jason Kenny <***@live.com> wrote:
>
> to simplify the log file the tree looks like this:
>
> +-build::alias::openssl
>
> +-build::alias::openssl::SDKBIN
>
> | +-_sdks/debug_posix-x86_64_default/openssl_1.1.0_51bed083228
> 027f76730230d116bace9/bin/c_rehash
>
> | | +-_build/build_debug_posix-x86_64/openssl/_set_RPATH_/c_rehash
>
> | | +-_makeinstall/openssl/bin/c_rehash
>
> | | +-_build/build_debug_posix-x86_64/openssl/Makefile
>
> | | +-_build/build_debug_posix-x86_64/openssl/crypto/ripemd/build.info
> <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>
>
> | | | +-_vcs/openssl/crypto/ripemd/build.info
> <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>
>
> ....
>
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_win.c]
>
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/arm_arch.h]
>
> | | +-_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h
>
> | | | +-[_build/build_debug_posix-x86_64/openssl/Makefile]
>
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_nyi.c]
>
>
>
> I am not sure why _makeinstall/openssl/bin/c_rehash ->
> _build/build_debug_posix-x86_64/openssl/Makefile ->
> _build/build_debug_posix-x86_64/openssl/crypto/buildinf.h ->
> _build/build_debug_posix-x86_64/openssl/Makefile
>
> I would think c_rehash should depend on the Makefile. I would not think
> Scons would "know" anything about buildinf.h
>
> - Jason
> ------------------------------
>
> *From:* Jason Kenny <***@live.com>
> *Sent:* Friday, May 4, 2018 11:26 AM
>
>
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> *copyed* was me coping data to the variant directory to allow cross build
> to work better
>
> log file is here https://bitbucket.org/snippets/dragon512/KeGax5
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fsnippets%2Fdragon512%2FKeGax5&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=%2Fn83xUdN3J5rmYczw5ss%2F9zcjkQnka5BC1nqEw8eLtk%3D&reserved=0>
>
>
> Below is the Parts file I have been hacking on ( I hope to clean it up
> more...) It is based on work I have yet to publish in Parts in my branch.
>
>
> -----
> Import('*')
> PartVersion("1.1.0")
> files = Pattern(src_dir="${VCS_DIR}", excludes=[".git/*"])
>
> copyed = env.CCopy(
> source=files,
> target="$BUILD_DIR",
> copy_logic=CCopy.copy # could hard links be an issue????
> )
> out = env.Command(
> ["Makefile"],
> copyed,
> "cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH
> enable-ec_nistp_64_gcc_128\
> --prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
> --openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64
> shared\
> "
> )
>
> # env.Ignore("_build/build_debug_posix-x86_64/openssl/crypto/
> buildinf.h","${VCS_DIR}/crypto/buildinf.h")
> env.Ignore(out, ["crypto/buildinf.h"])
>
>
>
> out = env.Command(
> [
> env.File("crypto/buildinf.h"),
> "#_makeinstall/${PART_NAME}/bin/c_rehash",
> "#_makeinstall/${PART_NAME}/bin/openssl",
> "#_makeinstall/${PART_NAME}/include/openssl/aes.h",
> "#_makeinstall/${PART_NAME}/include/openssl/camellia.h",
> "#_makeinstall/${PART_NAME}/include/openssl/des.h",
> "#_makeinstall/${PART_NAME}/include/openssl/e_os2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md5.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pem2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/stack.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509_vfy.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cast.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dh.h",
> "#_makeinstall/${PART_NAME}/include/openssl/err.h",
> "#_makeinstall/${PART_NAME}/include/openssl/mdc2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pem.h",
> "#_makeinstall/${PART_NAME}/include/openssl/safestack.h",
> "#_makeinstall/${PART_NAME}/include/openssl/symhacks.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1_mac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cmac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/evp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/modes.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pkcs12.h",
> "#_makeinstall/${PART_NAME}/include/openssl/seed.h",
> "#_makeinstall/${PART_NAME}/include/openssl/tls1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1t.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cms.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dtls1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/hmac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/objects.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pkcs7.h",
> "#_makeinstall/${PART_NAME}/include/openssl/sha.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ts.h",
> "#_makeinstall/${PART_NAME}/include/openssl/async.h",
> "#_makeinstall/${PART_NAME}/include/openssl/comp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ebcdic.h",
> "#_makeinstall/${PART_NAME}/include/openssl/idea.h",
> "#_makeinstall/${PART_NAME}/include/openssl/obj_mac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rand.h",
> "#_makeinstall/${PART_NAME}/include/openssl/srp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/txt_db.h",
> "#_makeinstall/${PART_NAME}/include/openssl/bio.h",
> "#_makeinstall/${PART_NAME}/include/openssl/conf_api.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ecdh.h",
> "#_makeinstall/${PART_NAME}/include/openssl/kdf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ocsp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/srtp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ui.h",
> "#_makeinstall/${PART_NAME}/include/openssl/blowfish.h",
> "#_makeinstall/${PART_NAME}/include/openssl/conf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ecdsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/lhash.h",
> "#_makeinstall/${PART_NAME}/include/openssl/opensslconf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc4.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/whrlpool.h",
> "#_makeinstall/${PART_NAME}/include/openssl/bn.h",
> "#_makeinstall/${PART_NAME}/include/openssl/crypto.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ec.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/opensslv.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc5.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl3.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509.h",
> "#_makeinstall/${PART_NAME}/include/openssl/buffer.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ct.h",
> "#_makeinstall/${PART_NAME}/include/openssl/engine.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md4.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ossl_typ.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ripemd.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509v3.h",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/afalg.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.a",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/capi.so",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/padlock.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.so.1.1",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.a",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/libcrypto.pc",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/libssl.pc",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.so",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.so.1.1",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/openssl.pc",
> ],
> ["Makefile"],
> [
> "cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}}
> $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
> "cd ${SOURCE.dir} ; make install"
> ]
> )
>
> env.InstallBin(
> env.Glob("#_makeinstall/${PART_NAME}/bin/*")
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/*.a"),
> auto_add_libs=False)
> env.InstallLib(
> env.Glob("#_makeinstall/${PART_NAME}/lib/*.so*")
>
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/libengines-1.1/*.so"),
> auto_add_libs=False, sub_dir="libengines-1.1")
> env.InstallInclude( # bug we need to fix -JK
> env.SdkInclude(
> env.Glob("#_makeinstall/${PART_NAME}/include/openssl/*"),
> sub_dir="openssl",
> add_to_path=False
> ),
> sub_dir="openssl"
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/pkgconfig/*.pc"),
> auto_add_libs=False, sub_dir="pkgconfig", add_to_path=False)
>
>
> ------------------------------
>
> *From:* Scons-users <scons-users-***@scons.org> on behalf of Bill
> Deegan <***@baddogconsulting.com>
> *Sent:* Friday, May 4, 2018 10:40 AM
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> Jason,
>
>
>
> I"m not aware of a Makefile scanner.
>
>
>
> What's in variable 'copyed'?
>
>
>
> Can you paste output of --tree=prune?
>
> -Bill
>
>
>
> On Fri, May 4, 2018 at 10:31 AM, Jason Kenny <***@live.com> wrote:
>
> Hi,
>
> I am setting up a build with SCons that has to build openssl. I am using
> the Command() logic to call the native build system. I am having an issue
> with this code wanting to rebuild because of a file "crypto/buildinf.h" is
> rebuilt as part of the process with a new date value/ This causes SCons to
> say stuff needs to be rebuilt. The issue here is an odd circular reference
> that is forming up and I am unclear on what is adding it at this time. I am
> hoping before I dig to deep into this that some one might know, or have
> some idea on what is happening. Details
>
> I have a two commands:
>
>
> out = env.Command(
>
> ["Makefile"],
>
> copyed,
>
> "cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH
> enable-ec_nistp_64_gcc_128\
>
> --prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
>
> --openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64
> shared\
>
> "
>
> )
>
>
> Then I have a command
>
> env.Ignore(out, ["crypto/buildinf.h"])
>
>
>
> env.Command(
> [
>
> env.File("crypto/buildinf.h"),
>
> "#_makeinstall/${PART_NAME}/bin/c_rehash",
>
> ...
>
> ],
>
> ["Makefile"],
>
> [
>
> "cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}}
> $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
>
> "cd ${SOURCE.dir} ; make install"
>
> ] )
>
>
>
> What is happening is that after the first run Scons will tell me it needs
> to rebuild because:
>
> scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile'
> because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h'
> changed
>
> I have an Ignore line that should remove this... What is odd for me is
> that the next build command is run because:
>
> scons: rebuilding `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h'
> because `_build/build_debug_posix-x86_64/openssl/Makefile' changed
>
>
> I seem to have a cycle of some kind. I am unclear on how to break it.
>
>
> I am unclear on what scanner is adding this depends in Command. Do we have
> a generic Makefile scanner??
> Any thoughts??
>
> Jason
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Ccae88553915f47d8c91a08d5b1d5712f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610452634906164&sdata=LJ6F2%2BiZCnp1WZOIAfNDmAs4%2F3h3JJNnFtz0GnVCX4g%3D&reserved=0>
>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=6C3axeb9ZEUCd0ra2hdKQ8%2BP5Nr1WGdNl0wPQPgBAwI%3D&reserved=0>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C3d6fa86b3b704e0d3b0408d5b9bcdf81%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619143209334764&sdata=9XQji%2F6OPpBOB%2Fvk5%2F0KXcpUbuBudRz2trdZxTUM9Ac%3D&reserved=0>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
Jason Kenny
2018-05-14 21:00:06 UTC
Permalink
No.. did not know about this utility.

I ran it the first round and it dumps a ton of info..
I ran scons again, then ran the utility again and it dumps this...

LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589 6128
_vcs/openssl/LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589 6128
55b40265a26683fbced32365cba594b5 [<lambda>(target, source, env)]
Makefile: 1d7b4a1b320ff883d02f50dbf26cbfb4 1526331304 498401
Traceback (most recent call last):
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 547, in <module>
Do_SConsignDB(Map_Module.get(dbm_name, dbm_name), dbm)(a)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 427, in __call__
self.printentries(dir, db[dir])
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 431, in printentries
printentries(pickle.loads(val), dir)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 370, in printentries
printfield(name, entry.binfo)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 334, in printfield
outlist = field("implicit", entry, 0)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 297, in field
val = mapper(entry, name)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 277, in map_bkids
result.append(nodeinfo_string(bkids[i], bkidsigs[i], " "))
IndexError: list index out of range


Does this look like the issue you had mentioned?

Jason

________________________________
From: Scons-users <scons-users-***@scons.org> on behalf of Bill Deegan <***@baddogconsulting.com>
Sent: Monday, May 14, 2018 3:49 PM
To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()

Did you try running sconsign on your .sconsign file?

On Mon, May 14, 2018 at 2:05 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
will be happy to try it out
-Jason
________________________________
From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> on behalf of Bill Deegan <***@baddogconsulting.com<mailto:***@baddogconsulting.com>>
Sent: Monday, May 14, 2018 12:05 PM
To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()

Jason,

I believe I have a patch for the rebuilds.
I found a simliar issue working on another problem.

If sconsign crashes reading the .sconsign then you likely have the same issue.
Give it a try and let me know.
I'm away from computer for a bit, but I'll send you the patch to try.
Basically the sconsign ends up with mismatched md5's for file names but only when ignore is being used because the names aren't filtered, but the md5's are.

-Bill


On Mon, May 14, 2018 at 12:44 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
Hi Bill
I was out traveling last week, however, I made some progress on this.
If I disable the scanner ( changed the code to always return [] ) The build worked fine. So the issue is the scanner and how it adds depends to a target. I am unclear on why Ignore() is not working as expected. Scons wants to keep rebuilding because buildinf.h changed. If I don't have the Ignore() I get an error from the taskmaster on the second run with a circular depends. I would expect the only Ignore call would prevent rebuilds
As a workaround, I change the code from using the Parts Pattern object. which is basically a recursive Glob() at this point, to just copy the openssl source directory to the variant directory. This work as the c scanner is global on any C file being defined. By making this a directory the copy logic does not define any C file nodes. Since the C files are not defined as nodes they are not seen by the scanner to be scanned and added as a depends to the target of the Command() that generated the Makefile.
Is there an official way to turn off the scanner for a given command?? Or is this more of a bug with the Ignore() logic as Scons does not seem to "fully" ignore the depends added by the scanner.
either way, I have a workaround. However, it seems this is could be an unexpected catch 22 for people that have to call a "third party" build system to get a full build to work.
-Jason

________________________________
From: Jason Kenny
Sent: Friday, May 4, 2018 7:29 PM
To: SCons users mailing list
Subject: RE: [Scons-users] Having issue with scanner in Command()


In Parts the VCS_DIR is where the code is checked out too. The BUILD_DIR is basically the SCons Variant directory for the given “Part”/component. I was copying data to this place as OpenSSL does not have an out of source build option, and as such would “pollute” the source area.



I was looking at it more in details. If I build

“Scons _build/build_debug_posix-x86_64/openssl/Makefile”



Everything is fine SCons says everything is up to date the next round. If I build “_makeinstall/openssl/bin/c_rehash” which is defined in the second Command() the next pass has this problem. It seems for some reason once the generated building.h file is generated something is adding it as a depends. I am not sure at the moment if this is seen as implicit or explicated by the system. I am assuming it is implicate and being added by a scanner. However I have not found what added it as of yet. I don’t think it is anything in Parts. I did notice that if I remove the copyed->[] after everything is built remove the scons db file everything is fine. I think it has to do with my coping object as the source and they are getting scanned by the c-scanner but I am unclear how this would be adding it as a depends to the target. It has been a while since I have been in this code. I think SCons does not make a tree like:



Foo.exe

+ foo.obj

+ foo.c

+foo.h



But makes a



Foo.exe

+ foo.obj

+ foo.c

+ foo.h



My theory is the since SCons does the last case. Scons might be adding “generated” file of the openssl make build via the scanner at the wrong level. Since Scons would add the .h file not as a depends of the .c but to the target that depends on the .c file.



I think I need to do a test run with the C-scanner disabled to verify this



Jason



From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> On Behalf Of Bill Deegan
Sent: Friday, May 4, 2018 3:23 PM
To: SCons users mailing list <scons-***@scons.org<mailto:scons-***@scons.org>>
Subject: Re: [Scons-users] Having issue with scanner in Command()



What's VCS_DIR and BUILD_DIR ?



On Fri, May 4, 2018 at 1:18 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:

to simplify the log file the tree looks like this:

+-build::alias::openssl

+-build::alias::openssl::SDKBIN

| +-_sdks/debug_posix-x86_64_default/openssl_1.1.0_51bed083228027f76730230d116bace9/bin/c_rehash

| | +-_build/build_debug_posix-x86_64/openssl/_set_RPATH_/c_rehash

| | +-_makeinstall/openssl/bin/c_rehash

| | +-_build/build_debug_posix-x86_64/openssl/Makefile

| | +-_build/build_debug_posix-x86_64/openssl/crypto/ripemd/build.info<https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>

| | | +-_vcs/openssl/crypto/ripemd/build.info<https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>

....

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_win.c]

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/arm_arch.h]

| | +-_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h

| | | +-[_build/build_debug_posix-x86_64/openssl/Makefile]

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_nyi.c]


I am not sure why _makeinstall/openssl/bin/c_rehash -> _build/build_debug_posix-x86_64/openssl/Makefile ->_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h -> _build/build_debug_posix-x86_64/openssl/Makefile

I would think c_rehash should depend on the Makefile. I would not think Scons would "know" anything about buildinf.h

- Jason

________________________________

From: Jason Kenny <***@live.com<mailto:***@live.com>>
Sent: Friday, May 4, 2018 11:26 AM

To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()



copyed was me coping data to the variant directory to allow cross build to work better

log file is here https://bitbucket.org/snippets/dragon512/KeGax5<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fsnippets%2Fdragon512%2FKeGax5&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=%2Fn83xUdN3J5rmYczw5ss%2F9zcjkQnka5BC1nqEw8eLtk%3D&reserved=0>


Below is the Parts file I have been hacking on ( I hope to clean it up more...) It is based on work I have yet to publish in Parts in my branch.


-----
Import('*')
PartVersion("1.1.0")
files = Pattern(src_dir="${VCS_DIR}", excludes=[".git/*"])

copyed = env.CCopy(
source=files,
target="$BUILD_DIR",
copy_logic=CCopy.copy # could hard links be an issue????
)
out = env.Command(
["Makefile"],
copyed,
"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\
--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\
"
)

# env.Ignore("_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h","${VCS_DIR}/crypto/buildinf.h")
env.Ignore(out, ["crypto/buildinf.h"])



out = env.Command(
[
env.File("crypto/buildinf.h"),
"#_makeinstall/${PART_NAME}/bin/c_rehash",
"#_makeinstall/${PART_NAME}/bin/openssl",
"#_makeinstall/${PART_NAME}/include/openssl/aes.h",
"#_makeinstall/${PART_NAME}/include/openssl/camellia.h",
"#_makeinstall/${PART_NAME}/include/openssl/des.h",
"#_makeinstall/${PART_NAME}/include/openssl/e_os2.h",
"#_makeinstall/${PART_NAME}/include/openssl/md5.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem2.h",
"#_makeinstall/${PART_NAME}/include/openssl/rsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/stack.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509_vfy.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1.h",
"#_makeinstall/${PART_NAME}/include/openssl/cast.h",
"#_makeinstall/${PART_NAME}/include/openssl/dh.h",
"#_makeinstall/${PART_NAME}/include/openssl/err.h",
"#_makeinstall/${PART_NAME}/include/openssl/mdc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem.h",
"#_makeinstall/${PART_NAME}/include/openssl/safestack.h",
"#_makeinstall/${PART_NAME}/include/openssl/symhacks.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/cmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/dsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/evp.h",
"#_makeinstall/${PART_NAME}/include/openssl/modes.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs12.h",
"#_makeinstall/${PART_NAME}/include/openssl/seed.h",
"#_makeinstall/${PART_NAME}/include/openssl/tls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1t.h",
"#_makeinstall/${PART_NAME}/include/openssl/cms.h",
"#_makeinstall/${PART_NAME}/include/openssl/dtls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/hmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/objects.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs7.h",
"#_makeinstall/${PART_NAME}/include/openssl/sha.h",
"#_makeinstall/${PART_NAME}/include/openssl/ts.h",
"#_makeinstall/${PART_NAME}/include/openssl/async.h",
"#_makeinstall/${PART_NAME}/include/openssl/comp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ebcdic.h",
"#_makeinstall/${PART_NAME}/include/openssl/idea.h",
"#_makeinstall/${PART_NAME}/include/openssl/obj_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/rand.h",
"#_makeinstall/${PART_NAME}/include/openssl/srp.h",
"#_makeinstall/${PART_NAME}/include/openssl/txt_db.h",
"#_makeinstall/${PART_NAME}/include/openssl/bio.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf_api.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdh.h",
"#_makeinstall/${PART_NAME}/include/openssl/kdf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ocsp.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/srtp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ui.h",
"#_makeinstall/${PART_NAME}/include/openssl/blowfish.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/lhash.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslconf.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl2.h",
"#_makeinstall/${PART_NAME}/include/openssl/whrlpool.h",
"#_makeinstall/${PART_NAME}/include/openssl/bn.h",
"#_makeinstall/${PART_NAME}/include/openssl/crypto.h",
"#_makeinstall/${PART_NAME}/include/openssl/ec.h",
"#_makeinstall/${PART_NAME}/include/openssl/md2.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslv.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc5.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl3.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509.h",
"#_makeinstall/${PART_NAME}/include/openssl/buffer.h",
"#_makeinstall/${PART_NAME}/include/openssl/ct.h",
"#_makeinstall/${PART_NAME}/include/openssl/engine.h",
"#_makeinstall/${PART_NAME}/include/openssl/md4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ossl_typ.h",
"#_makeinstall/${PART_NAME}/include/openssl/ripemd.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509v3.h",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/afalg.so",
"#_makeinstall/${PART_NAME}/lib/libssl.a",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/capi.so",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/padlock.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so.1.1",
"#_makeinstall/${PART_NAME}/lib/libcrypto.a",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libcrypto.pc",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libssl.pc",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so.1.1",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/openssl.pc",
],
["Makefile"],
[
"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
"cd ${SOURCE.dir} ; make install"
]
)

env.InstallBin(
env.Glob("#_makeinstall/${PART_NAME}/bin/*")
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/*.a"), auto_add_libs=False)
env.InstallLib(
env.Glob("#_makeinstall/${PART_NAME}/lib/*.so*")

)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/libengines-1.1/*.so"), auto_add_libs=False, sub_dir="libengines-1.1")
env.InstallInclude( # bug we need to fix -JK
env.SdkInclude(
env.Glob("#_makeinstall/${PART_NAME}/include/openssl/*"),
sub_dir="openssl",
add_to_path=False
),
sub_dir="openssl"
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/pkgconfig/*.pc"), auto_add_libs=False, sub_dir="pkgconfig", add_to_path=False)



________________________________

From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> on behalf of Bill Deegan <***@baddogconsulting.com<mailto:***@baddogconsulting.com>>
Sent: Friday, May 4, 2018 10:40 AM
To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()



Jason,



I"m not aware of a Makefile scanner.



What's in variable 'copyed'?



Can you paste output of --tree=prune?

-Bill



On Fri, May 4, 2018 at 10:31 AM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:

Hi,

I am setting up a build with SCons that has to build openssl. I am using the Command() logic to call the native build system. I am having an issue with this code wanting to rebuild because of a file "crypto/buildinf.h" is rebuilt as part of the process with a new date value/ This causes SCons to say stuff needs to be rebuilt. The issue here is an odd circular reference that is forming up and I am unclear on what is adding it at this time. I am hoping before I dig to deep into this that some one might know, or have some idea on what is happening. Details

I have a two commands:

out = env.Command(

["Makefile"],

copyed,

"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\

--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\

--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\

"

)

Then I have a command

env.Ignore(out, ["crypto/buildinf.h"])



env.Command(
[

env.File("crypto/buildinf.h"),

"#_makeinstall/${PART_NAME}/bin/c_rehash",

...

],

["Makefile"],

[

"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),

"cd ${SOURCE.dir} ; make install"

] )



What is happening is that after the first run Scons will tell me it needs to rebuild because:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile' because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' changed

I have an Ignore line that should remove this... What is odd for me is that the next build command is run because:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' because `_build/build_debug_posix-x86_64/openssl/Makefile' changed

I seem to have a cycle of some kind. I am unclear on how to break it.

I am unclear on what scanner is adding this depends in Command. Do we have a generic Makefile scanner??
Any thoughts??

Jason

_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Ccae88553915f47d8c91a08d5b1d5712f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610452634906164&sdata=LJ6F2%2BiZCnp1WZOIAfNDmAs4%2F3h3JJNnFtz0GnVCX4g%3D&reserved=0>



_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=6C3axeb9ZEUCd0ra2hdKQ8%2BP5Nr1WGdNl0wPQPgBAwI%3D&reserved=0>
Bill Deegan
2018-05-14 21:21:47 UTC
Permalink
Yup..

Something like this.. (patch below won't apply.. just edit the file..)

+++ b/src/engine/SCons/Node/__init__.py
@@ -1149,7 +1149,9 @@ class Node(object, with_metaclass(NoSlotsPyPy)):
binfo.bdepends = self.depends
binfo.bdependsigs = [d.get_ninfo() for d in self.depends if d not
in ignore_set]

+ # TODO: If anything matches the ignore_set: bimplicit and
bimplicitsigs will have different lengths and potentially the items in each
list
will not represent the same file. (any item but the last one matches any
item in ignore_set)
binfo.bimplicit = self.implicit or []
+ binfo.bimplicit = [i for i in binfo.bimplicit if i not in
ignore_set]
binfo.bimplicitsigs = [i.get_ninfo() for i in binfo.bimplicit if i
not in ignore_set]


On Mon, May 14, 2018 at 5:00 PM, Jason Kenny <***@live.com> wrote:

> No.. did not know about this utility.
>
> I ran it the first round and it dumps a ton of info..
> I ran scons again, then ran the utility again and it dumps this...
>
> LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589 6128
> _vcs/openssl/LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589
> 6128
> 55b40265a26683fbced32365cba594b5 [<lambda>(target, source, env)]
> Makefile: 1d7b4a1b320ff883d02f50dbf26cbfb4 1526331304 498401
> Traceback (most recent call last):
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 547, in
> <module>
> Do_SConsignDB(Map_Module.get(dbm_name, dbm_name), dbm)(a)
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 427, in
> __call__
> self.printentries(dir, db[dir])
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 431, in
> printentries
> printentries(pickle.loads(val), dir)
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 370, in
> printentries
> printfield(name, entry.binfo)
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 334, in
> printfield
> outlist = field("implicit", entry, 0)
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 297, in field
> val = mapper(entry, name)
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 277, in
> map_bkids
> result.append(nodeinfo_string(bkids[i], bkidsigs[i], " "))
> IndexError: list index out of range
>
>
> Does this look like the issue you had mentioned?
>
> Jason
>
> ------------------------------
> *From:* Scons-users <scons-users-***@scons.org> on behalf of Bill
> Deegan <***@baddogconsulting.com>
> *Sent:* Monday, May 14, 2018 3:49 PM
>
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
> Did you try running sconsign on your .sconsign file?
>
> On Mon, May 14, 2018 at 2:05 PM, Jason Kenny <***@live.com> wrote:
>
> will be happy to try it out
> -Jason
> ------------------------------
> *From:* Scons-users <scons-users-***@scons.org> on behalf of Bill
> Deegan <***@baddogconsulting.com>
> *Sent:* Monday, May 14, 2018 12:05 PM
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
> Jason,
>
> I believe I have a patch for the rebuilds.
> I found a simliar issue working on another problem.
>
> If sconsign crashes reading the .sconsign then you likely have the same
> issue.
> Give it a try and let me know.
> I'm away from computer for a bit, but I'll send you the patch to try.
> Basically the sconsign ends up with mismatched md5's for file names but
> only when ignore is being used because the names aren't filtered, but the
> md5's are.
>
> -Bill
>
>
> On Mon, May 14, 2018 at 12:44 PM, Jason Kenny <***@live.com> wrote:
>
> Hi Bill
> I was out traveling last week, however, I made some progress on this.
> If I disable the scanner ( changed the code to always return [] ) The
> build worked fine. So the issue is the scanner and how it adds depends to a
> target. I am unclear on why Ignore() is not working as expected. Scons
> wants to keep rebuilding because buildinf.h changed. If I don't have the
> Ignore() I get an error from the taskmaster on the second run with a
> circular depends. I would expect the only Ignore call would prevent rebuilds
> As a workaround, I change the code from using the Parts Pattern object.
> which is basically a recursive Glob() at this point, to just copy the
> openssl source directory to the variant directory. This work as the c
> scanner is global on any C file being defined. By making this a directory
> the copy logic does not define any C file nodes. Since the C files are not
> defined as nodes they are not seen by the scanner to be scanned and added
> as a depends to the target of the Command() that generated the Makefile.
> Is there an official way to turn off the scanner for a given command?? Or
> is this more of a bug with the Ignore() logic as Scons does not seem to
> "fully" ignore the depends added by the scanner.
> either way, I have a workaround. However, it seems this is could be an
> unexpected catch 22 for people that have to call a "third party" build
> system to get a full build to work.
> -Jason
>
> ------------------------------
> *From:* Jason Kenny
> *Sent:* Friday, May 4, 2018 7:29 PM
> *To:* SCons users mailing list
> *Subject:* RE: [Scons-users] Having issue with scanner in Command()
>
>
> In Parts the VCS_DIR is where the code is checked out too. The BUILD_DIR
> is basically the SCons Variant directory for the given “Part”/component. I
> was copying data to this place as OpenSSL does not have an out of source
> build option, and as such would “pollute” the source area.
>
>
>
> I was looking at it more in details. If I build
>
> “Scons _build/build_debug_posix-x86_64/openssl/Makefile”
>
>
>
> Everything is fine SCons says everything is up to date the next round. If
> I build “_makeinstall/openssl/bin/c_rehash” which is defined in the
> second Command() the next pass has this problem. It seems for some reason
> once the generated building.h file is generated something is adding it as a
> depends. I am not sure at the moment if this is seen as implicit or
> explicated by the system. I am assuming it is implicate and being added by
> a scanner. However I have not found what added it as of yet. I don’t think
> it is anything in Parts. I did notice that if I remove the copyed->[] after
> everything is built remove the scons db file everything is fine. I think it
> has to do with my coping object as the source and they are getting scanned
> by the c-scanner but I am unclear how this would be adding it as a depends
> to the target. It has been a while since I have been in this code. I think
> SCons does not make a tree like:
>
>
>
> Foo.exe
>
> + foo.obj
>
> + foo.c
>
> +foo.h
>
>
>
> But makes a
>
>
>
> Foo.exe
>
> + foo.obj
>
> + foo.c
>
> + foo.h
>
>
>
> My theory is the since SCons does the last case. Scons might be adding
> “generated” file of the openssl make build via the scanner at the wrong
> level. Since Scons would add the .h file not as a depends of the .c but to
> the target that depends on the .c file.
>
>
>
> I think I need to do a test run with the C-scanner disabled to verify this
>
>
>
> Jason
>
>
>
> *From:* Scons-users <scons-users-***@scons.org> *On Behalf Of *Bill
> Deegan
> *Sent:* Friday, May 4, 2018 3:23 PM
> *To:* SCons users mailing list <scons-***@scons.org>
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> What's VCS_DIR and BUILD_DIR ?
>
>
>
> On Fri, May 4, 2018 at 1:18 PM, Jason Kenny <***@live.com> wrote:
>
> to simplify the log file the tree looks like this:
>
> +-build::alias::openssl
>
> +-build::alias::openssl::SDKBIN
>
> | +-_sdks/debug_posix-x86_64_default/openssl_1.1.0_51bed083228
> 027f76730230d116bace9/bin/c_rehash
>
> | | +-_build/build_debug_posix-x86_64/openssl/_set_RPATH_/c_rehash
>
> | | +-_makeinstall/openssl/bin/c_rehash
>
> | | +-_build/build_debug_posix-x86_64/openssl/Makefile
>
> | | +-_build/build_debug_posix-x86_64/openssl/crypto/ripemd/build.info
> <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>
>
> | | | +-_vcs/openssl/crypto/ripemd/build.info
> <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>
>
> ....
>
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_win.c]
>
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/arm_arch.h]
>
> | | +-_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h
>
> | | | +-[_build/build_debug_posix-x86_64/openssl/Makefile]
>
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_nyi.c]
>
>
>
> I am not sure why _makeinstall/openssl/bin/c_rehash ->
> _build/build_debug_posix-x86_64/openssl/Makefile ->
> _build/build_debug_posix-x86_64/openssl/crypto/buildinf.h ->
> _build/build_debug_posix-x86_64/openssl/Makefile
>
> I would think c_rehash should depend on the Makefile. I would not think
> Scons would "know" anything about buildinf.h
>
> - Jason
> ------------------------------
>
> *From:* Jason Kenny <***@live.com>
> *Sent:* Friday, May 4, 2018 11:26 AM
>
>
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> *copyed* was me coping data to the variant directory to allow cross build
> to work better
>
> log file is here https://bitbucket.org/snippets/dragon512/KeGax5
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fsnippets%2Fdragon512%2FKeGax5&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=%2Fn83xUdN3J5rmYczw5ss%2F9zcjkQnka5BC1nqEw8eLtk%3D&reserved=0>
>
>
> Below is the Parts file I have been hacking on ( I hope to clean it up
> more...) It is based on work I have yet to publish in Parts in my branch.
>
>
> -----
> Import('*')
> PartVersion("1.1.0")
> files = Pattern(src_dir="${VCS_DIR}", excludes=[".git/*"])
>
> copyed = env.CCopy(
> source=files,
> target="$BUILD_DIR",
> copy_logic=CCopy.copy # could hard links be an issue????
> )
> out = env.Command(
> ["Makefile"],
> copyed,
> "cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH
> enable-ec_nistp_64_gcc_128\
> --prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
> --openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64
> shared\
> "
> )
>
> # env.Ignore("_build/build_debug_posix-x86_64/openssl/crypto/b
> uildinf.h","${VCS_DIR}/crypto/buildinf.h")
> env.Ignore(out, ["crypto/buildinf.h"])
>
>
>
> out = env.Command(
> [
> env.File("crypto/buildinf.h"),
> "#_makeinstall/${PART_NAME}/bin/c_rehash",
> "#_makeinstall/${PART_NAME}/bin/openssl",
> "#_makeinstall/${PART_NAME}/include/openssl/aes.h",
> "#_makeinstall/${PART_NAME}/include/openssl/camellia.h",
> "#_makeinstall/${PART_NAME}/include/openssl/des.h",
> "#_makeinstall/${PART_NAME}/include/openssl/e_os2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md5.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pem2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/stack.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509_vfy.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cast.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dh.h",
> "#_makeinstall/${PART_NAME}/include/openssl/err.h",
> "#_makeinstall/${PART_NAME}/include/openssl/mdc2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pem.h",
> "#_makeinstall/${PART_NAME}/include/openssl/safestack.h",
> "#_makeinstall/${PART_NAME}/include/openssl/symhacks.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1_mac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cmac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/evp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/modes.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pkcs12.h",
> "#_makeinstall/${PART_NAME}/include/openssl/seed.h",
> "#_makeinstall/${PART_NAME}/include/openssl/tls1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1t.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cms.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dtls1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/hmac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/objects.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pkcs7.h",
> "#_makeinstall/${PART_NAME}/include/openssl/sha.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ts.h",
> "#_makeinstall/${PART_NAME}/include/openssl/async.h",
> "#_makeinstall/${PART_NAME}/include/openssl/comp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ebcdic.h",
> "#_makeinstall/${PART_NAME}/include/openssl/idea.h",
> "#_makeinstall/${PART_NAME}/include/openssl/obj_mac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rand.h",
> "#_makeinstall/${PART_NAME}/include/openssl/srp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/txt_db.h",
> "#_makeinstall/${PART_NAME}/include/openssl/bio.h",
> "#_makeinstall/${PART_NAME}/include/openssl/conf_api.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ecdh.h",
> "#_makeinstall/${PART_NAME}/include/openssl/kdf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ocsp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/srtp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ui.h",
> "#_makeinstall/${PART_NAME}/include/openssl/blowfish.h",
> "#_makeinstall/${PART_NAME}/include/openssl/conf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ecdsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/lhash.h",
> "#_makeinstall/${PART_NAME}/include/openssl/opensslconf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc4.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/whrlpool.h",
> "#_makeinstall/${PART_NAME}/include/openssl/bn.h",
> "#_makeinstall/${PART_NAME}/include/openssl/crypto.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ec.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/opensslv.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc5.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl3.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509.h",
> "#_makeinstall/${PART_NAME}/include/openssl/buffer.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ct.h",
> "#_makeinstall/${PART_NAME}/include/openssl/engine.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md4.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ossl_typ.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ripemd.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509v3.h",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/afalg.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.a",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/capi.so",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/padlock.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.so.1.1",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.a",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/libcrypto.pc",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/libssl.pc",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.so",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.so.1.1",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/openssl.pc",
> ],
> ["Makefile"],
> [
> "cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}}
> $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
> "cd ${SOURCE.dir} ; make install"
> ]
> )
>
> env.InstallBin(
> env.Glob("#_makeinstall/${PART_NAME}/bin/*")
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/*.a"),
> auto_add_libs=False)
> env.InstallLib(
> env.Glob("#_makeinstall/${PART_NAME}/lib/*.so*")
>
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/libengines-1.1/*.so"),
> auto_add_libs=False, sub_dir="libengines-1.1")
> env.InstallInclude( # bug we need to fix -JK
> env.SdkInclude(
> env.Glob("#_makeinstall/${PART_NAME}/include/openssl/*"),
> sub_dir="openssl",
> add_to_path=False
> ),
> sub_dir="openssl"
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/pkgconfig/*.pc"),
> auto_add_libs=False, sub_dir="pkgconfig", add_to_path=False)
>
>
> ------------------------------
>
> *From:* Scons-users <scons-users-***@scons.org> on behalf of Bill
> Deegan <***@baddogconsulting.com>
> *Sent:* Friday, May 4, 2018 10:40 AM
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> Jason,
>
>
>
> I"m not aware of a Makefile scanner.
>
>
>
> What's in variable 'copyed'?
>
>
>
> Can you paste output of --tree=prune?
>
> -Bill
>
>
>
> On Fri, May 4, 2018 at 10:31 AM, Jason Kenny <***@live.com> wrote:
>
> Hi,
>
> I am setting up a build with SCons that has to build openssl. I am using
> the Command() logic to call the native build system. I am having an issue
> with this code wanting to rebuild because of a file "crypto/buildinf.h" is
> rebuilt as part of the process with a new date value/ This causes SCons to
> say stuff needs to be rebuilt. The issue here is an odd circular reference
> that is forming up and I am unclear on what is adding it at this time. I am
> hoping before I dig to deep into this that some one might know, or have
> some idea on what is happening. Details
>
> I have a two commands:
>
>
> out = env.Command(
>
> ["Makefile"],
>
> copyed,
>
> "cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH
> enable-ec_nistp_64_gcc_128\
>
> --prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
>
> --openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64
> shared\
>
> "
>
> )
>
>
> Then I have a command
>
> env.Ignore(out, ["crypto/buildinf.h"])
>
>
>
> env.Command(
> [
>
> env.File("crypto/buildinf.h"),
>
> "#_makeinstall/${PART_NAME}/bin/c_rehash",
>
> ...
>
> ],
>
> ["Makefile"],
>
> [
>
> "cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}}
> $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
>
> "cd ${SOURCE.dir} ; make install"
>
> ] )
>
>
>
> What is happening is that after the first run Scons will tell me it needs
> to rebuild because:
>
> scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile'
> because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h'
> changed
>
> I have an Ignore line that should remove this... What is odd for me is
> that the next build command is run because:
>
> scons: rebuilding `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h'
> because `_build/build_debug_posix-x86_64/openssl/Makefile' changed
>
>
> I seem to have a cycle of some kind. I am unclear on how to break it.
>
>
> I am unclear on what scanner is adding this depends in Command. Do we have
> a generic Makefile scanner??
> Any thoughts??
>
> Jason
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Ccae88553915f47d8c91a08d5b1d5712f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610452634906164&sdata=LJ6F2%2BiZCnp1WZOIAfNDmAs4%2F3h3JJNnFtz0GnVCX4g%3D&reserved=0>
>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=6C3axeb9ZEUCd0ra2hdKQ8%2BP5Nr1WGdNl0wPQPgBAwI%3D&reserved=0>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C3d6fa86b3b704e0d3b0408d5b9bcdf81%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619143209334764&sdata=9XQji%2F6OPpBOB%2Fvk5%2F0KXcpUbuBudRz2trdZxTUM9Ac%3D&reserved=0>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C33e4200f953040bb564808d5b9dc4412%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619278038242537&sdata=cAn5DaMnoBZvmGhNiLcguy9XCeAx%2BQ1e4lDK6XvLBEI%3D&reserved=0>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
Jason Kenny
2018-05-14 23:56:12 UTC
Permalink
So I applied the patch to Node/__init__.py

The crash from running sconsign went away. So that is good


But the code still wants to rebuild.

Sconsign tells me the
Makefile: c469c39ede869a94e73f19970ca955b2 1526338830 498415


_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h: ee0ce32ceb3b0fb0a23540d9b091dbac 1526338422 2680



After a different run I see building.h change to

_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h: abc69bce6ce9b90148cdd62dc5b4ea47 1526339184 2680

Which repeats ( ie MD% changes) with every run.

Is there something else that might need to be patched?


Just in case it helps. On the second run of the build, --debug=explain tells me:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile' because:
`_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' is a new dependency
`_build/build_debug_posix-x86_64/openssl/apps/progs.h' is a new dependency

The third run tells me:
scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile' because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' changed

I clearly have a:
env.Ignore(['_build/build_debug_posix-x86_64/openssl/Makefile'], ["_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h"])

anyways .. looks like there is something else

-Jason

From: Scons-users <scons-users-***@scons.org> On Behalf Of Bill Deegan
Sent: Monday, May 14, 2018 4:22 PM
To: SCons users mailing list <scons-***@scons.org>
Subject: Re: [Scons-users] Having issue with scanner in Command()

Yup..

Something like this.. (patch below won't apply.. just edit the file..)

+++ b/src/engine/SCons/Node/__init__.py
@@ -1149,7 +1149,9 @@ class Node(object, with_metaclass(NoSlotsPyPy)):
binfo.bdepends = self.depends
binfo.bdependsigs = [d.get_ninfo() for d in self.depends if d not in ignore_set]

+ # TODO: If anything matches the ignore_set: bimplicit and bimplicitsigs will have different lengths and potentially the items in each list
will not represent the same file. (any item but the last one matches any item in ignore_set)
binfo.bimplicit = self.implicit or []
+ binfo.bimplicit = [i for i in binfo.bimplicit if i not in ignore_set]
binfo.bimplicitsigs = [i.get_ninfo() for i in binfo.bimplicit if i not in ignore_set]


On Mon, May 14, 2018 at 5:00 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
No.. did not know about this utility.

I ran it the first round and it dumps a ton of info..
I ran scons again, then ran the utility again and it dumps this...

LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589 6128
_vcs/openssl/LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589 6128
55b40265a26683fbced32365cba594b5 [<lambda>(target, source, env)]
Makefile: 1d7b4a1b320ff883d02f50dbf26cbfb4 1526331304 498401
Traceback (most recent call last):
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 547, in <module>
Do_SConsignDB(Map_Module.get(dbm_name, dbm_name), dbm)(a)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 427, in __call__
self.printentries(dir, db[dir])
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 431, in printentries
printentries(pickle.loads(val), dir)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 370, in printentries
printfield(name, entry.binfo)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 334, in printfield
outlist = field("implicit", entry, 0)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 297, in field
val = mapper(entry, name)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 277, in map_bkids
result.append(nodeinfo_string(bkids[i], bkidsigs[i], " "))
IndexError: list index out of range


Does this look like the issue you had mentioned?

Jason

________________________________
From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> on behalf of Bill Deegan <***@baddogconsulting.com<mailto:***@baddogconsulting.com>>
Sent: Monday, May 14, 2018 3:49 PM

To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()

Did you try running sconsign on your .sconsign file?

On Mon, May 14, 2018 at 2:05 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
will be happy to try it out
-Jason
________________________________
From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> on behalf of Bill Deegan <***@baddogconsulting.com<mailto:***@baddogconsulting.com>>
Sent: Monday, May 14, 2018 12:05 PM
To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()

Jason,

I believe I have a patch for the rebuilds.
I found a simliar issue working on another problem.

If sconsign crashes reading the .sconsign then you likely have the same issue.
Give it a try and let me know.
I'm away from computer for a bit, but I'll send you the patch to try.
Basically the sconsign ends up with mismatched md5's for file names but only when ignore is being used because the names aren't filtered, but the md5's are.

-Bill


On Mon, May 14, 2018 at 12:44 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
Hi Bill
I was out traveling last week, however, I made some progress on this.
If I disable the scanner ( changed the code to always return [] ) The build worked fine. So the issue is the scanner and how it adds depends to a target. I am unclear on why Ignore() is not working as expected. Scons wants to keep rebuilding because buildinf.h changed. If I don't have the Ignore() I get an error from the taskmaster on the second run with a circular depends. I would expect the only Ignore call would prevent rebuilds
As a workaround, I change the code from using the Parts Pattern object. which is basically a recursive Glob() at this point, to just copy the openssl source directory to the variant directory. This work as the c scanner is global on any C file being defined. By making this a directory the copy logic does not define any C file nodes. Since the C files are not defined as nodes they are not seen by the scanner to be scanned and added as a depends to the target of the Command() that generated the Makefile.
Is there an official way to turn off the scanner for a given command?? Or is this more of a bug with the Ignore() logic as Scons does not seem to "fully" ignore the depends added by the scanner.
either way, I have a workaround. However, it seems this is could be an unexpected catch 22 for people that have to call a "third party" build system to get a full build to work.
-Jason

________________________________
From: Jason Kenny
Sent: Friday, May 4, 2018 7:29 PM
To: SCons users mailing list
Subject: RE: [Scons-users] Having issue with scanner in Command()


In Parts the VCS_DIR is where the code is checked out too. The BUILD_DIR is basically the SCons Variant directory for the given “Part”/component. I was copying data to this place as OpenSSL does not have an out of source build option, and as such would “pollute” the source area.



I was looking at it more in details. If I build

“Scons _build/build_debug_posix-x86_64/openssl/Makefile”



Everything is fine SCons says everything is up to date the next round. If I build “_makeinstall/openssl/bin/c_rehash” which is defined in the second Command() the next pass has this problem. It seems for some reason once the generated building.h file is generated something is adding it as a depends. I am not sure at the moment if this is seen as implicit or explicated by the system. I am assuming it is implicate and being added by a scanner. However I have not found what added it as of yet. I don’t think it is anything in Parts. I did notice that if I remove the copyed->[] after everything is built remove the scons db file everything is fine. I think it has to do with my coping object as the source and they are getting scanned by the c-scanner but I am unclear how this would be adding it as a depends to the target. It has been a while since I have been in this code. I think SCons does not make a tree like:



Foo.exe

+ foo.obj

+ foo.c

+foo.h



But makes a



Foo.exe

+ foo.obj

+ foo.c

+ foo.h



My theory is the since SCons does the last case. Scons might be adding “generated” file of the openssl make build via the scanner at the wrong level. Since Scons would add the .h file not as a depends of the .c but to the target that depends on the .c file.



I think I need to do a test run with the C-scanner disabled to verify this



Jason



From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> On Behalf Of Bill Deegan
Sent: Friday, May 4, 2018 3:23 PM
To: SCons users mailing list <scons-***@scons.org<mailto:scons-***@scons.org>>
Subject: Re: [Scons-users] Having issue with scanner in Command()



What's VCS_DIR and BUILD_DIR ?



On Fri, May 4, 2018 at 1:18 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:

to simplify the log file the tree looks like this:

+-build::alias::openssl

+-build::alias::openssl::SDKBIN

| +-_sdks/debug_posix-x86_64_default/openssl_1.1.0_51bed083228027f76730230d116bace9/bin/c_rehash

| | +-_build/build_debug_posix-x86_64/openssl/_set_RPATH_/c_rehash

| | +-_makeinstall/openssl/bin/c_rehash

| | +-_build/build_debug_posix-x86_64/openssl/Makefile

| | +-_build/build_debug_posix-x86_64/openssl/crypto/ripemd/build.info<https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>

| | | +-_vcs/openssl/crypto/ripemd/build.info<https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>

....

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_win.c]

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/arm_arch.h]

| | +-_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h

| | | +-[_build/build_debug_posix-x86_64/openssl/Makefile]

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_nyi.c]


I am not sure why _makeinstall/openssl/bin/c_rehash -> _build/build_debug_posix-x86_64/openssl/Makefile ->_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h -> _build/build_debug_posix-x86_64/openssl/Makefile

I would think c_rehash should depend on the Makefile. I would not think Scons would "know" anything about buildinf.h

- Jason

________________________________

From: Jason Kenny <***@live.com<mailto:***@live.com>>
Sent: Friday, May 4, 2018 11:26 AM

To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()



copyed was me coping data to the variant directory to allow cross build to work better

log file is here https://bitbucket.org/snippets/dragon512/KeGax5<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fsnippets%2Fdragon512%2FKeGax5&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=%2Fn83xUdN3J5rmYczw5ss%2F9zcjkQnka5BC1nqEw8eLtk%3D&reserved=0>


Below is the Parts file I have been hacking on ( I hope to clean it up more...) It is based on work I have yet to publish in Parts in my branch.


-----
Import('*')
PartVersion("1.1.0")
files = Pattern(src_dir="${VCS_DIR}", excludes=[".git/*"])

copyed = env.CCopy(
source=files,
target="$BUILD_DIR",
copy_logic=CCopy.copy # could hard links be an issue????
)
out = env.Command(
["Makefile"],
copyed,
"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\
--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\
"
)

# env.Ignore("_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h","${VCS_DIR}/crypto/buildinf.h")
env.Ignore(out, ["crypto/buildinf.h"])



out = env.Command(
[
env.File("crypto/buildinf.h"),
"#_makeinstall/${PART_NAME}/bin/c_rehash",
"#_makeinstall/${PART_NAME}/bin/openssl",
"#_makeinstall/${PART_NAME}/include/openssl/aes.h",
"#_makeinstall/${PART_NAME}/include/openssl/camellia.h",
"#_makeinstall/${PART_NAME}/include/openssl/des.h",
"#_makeinstall/${PART_NAME}/include/openssl/e_os2.h",
"#_makeinstall/${PART_NAME}/include/openssl/md5.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem2.h",
"#_makeinstall/${PART_NAME}/include/openssl/rsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/stack.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509_vfy.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1.h",
"#_makeinstall/${PART_NAME}/include/openssl/cast.h",
"#_makeinstall/${PART_NAME}/include/openssl/dh.h",
"#_makeinstall/${PART_NAME}/include/openssl/err.h",
"#_makeinstall/${PART_NAME}/include/openssl/mdc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem.h",
"#_makeinstall/${PART_NAME}/include/openssl/safestack.h",
"#_makeinstall/${PART_NAME}/include/openssl/symhacks.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/cmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/dsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/evp.h",
"#_makeinstall/${PART_NAME}/include/openssl/modes.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs12.h",
"#_makeinstall/${PART_NAME}/include/openssl/seed.h",
"#_makeinstall/${PART_NAME}/include/openssl/tls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1t.h",
"#_makeinstall/${PART_NAME}/include/openssl/cms.h",
"#_makeinstall/${PART_NAME}/include/openssl/dtls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/hmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/objects.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs7.h",
"#_makeinstall/${PART_NAME}/include/openssl/sha.h",
"#_makeinstall/${PART_NAME}/include/openssl/ts.h",
"#_makeinstall/${PART_NAME}/include/openssl/async.h",
"#_makeinstall/${PART_NAME}/include/openssl/comp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ebcdic.h",
"#_makeinstall/${PART_NAME}/include/openssl/idea.h",
"#_makeinstall/${PART_NAME}/include/openssl/obj_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/rand.h",
"#_makeinstall/${PART_NAME}/include/openssl/srp.h",
"#_makeinstall/${PART_NAME}/include/openssl/txt_db.h",
"#_makeinstall/${PART_NAME}/include/openssl/bio.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf_api.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdh.h",
"#_makeinstall/${PART_NAME}/include/openssl/kdf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ocsp.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/srtp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ui.h",
"#_makeinstall/${PART_NAME}/include/openssl/blowfish.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/lhash.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslconf.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl2.h",
"#_makeinstall/${PART_NAME}/include/openssl/whrlpool.h",
"#_makeinstall/${PART_NAME}/include/openssl/bn.h",
"#_makeinstall/${PART_NAME}/include/openssl/crypto.h",
"#_makeinstall/${PART_NAME}/include/openssl/ec.h",
"#_makeinstall/${PART_NAME}/include/openssl/md2.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslv.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc5.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl3.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509.h",
"#_makeinstall/${PART_NAME}/include/openssl/buffer.h",
"#_makeinstall/${PART_NAME}/include/openssl/ct.h",
"#_makeinstall/${PART_NAME}/include/openssl/engine.h",
"#_makeinstall/${PART_NAME}/include/openssl/md4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ossl_typ.h",
"#_makeinstall/${PART_NAME}/include/openssl/ripemd.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509v3.h",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/afalg.so",
"#_makeinstall/${PART_NAME}/lib/libssl.a",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/capi.so",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/padlock.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so.1.1",
"#_makeinstall/${PART_NAME}/lib/libcrypto.a",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libcrypto.pc",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libssl.pc",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so.1.1",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/openssl.pc",
],
["Makefile"],
[
"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
"cd ${SOURCE.dir} ; make install"
]
)

env.InstallBin(
env.Glob("#_makeinstall/${PART_NAME}/bin/*")
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/*.a"), auto_add_libs=False)
env.InstallLib(
env.Glob("#_makeinstall/${PART_NAME}/lib/*.so*")

)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/libengines-1.1/*.so"), auto_add_libs=False, sub_dir="libengines-1.1")
env.InstallInclude( # bug we need to fix -JK
env.SdkInclude(
env.Glob("#_makeinstall/${PART_NAME}/include/openssl/*"),
sub_dir="openssl",
add_to_path=False
),
sub_dir="openssl"
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/pkgconfig/*.pc"), auto_add_libs=False, sub_dir="pkgconfig", add_to_path=False)


________________________________

From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> on behalf of Bill Deegan <***@baddogconsulting.com<mailto:***@baddogconsulting.com>>
Sent: Friday, May 4, 2018 10:40 AM
To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()



Jason,



I"m not aware of a Makefile scanner.



What's in variable 'copyed'?



Can you paste output of --tree=prune?

-Bill



On Fri, May 4, 2018 at 10:31 AM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:

Hi,

I am setting up a build with SCons that has to build openssl. I am using the Command() logic to call the native build system. I am having an issue with this code wanting to rebuild because of a file "crypto/buildinf.h" is rebuilt as part of the process with a new date value/ This causes SCons to say stuff needs to be rebuilt. The issue here is an odd circular reference that is forming up and I am unclear on what is adding it at this time. I am hoping before I dig to deep into this that some one might know, or have some idea on what is happening. Details

I have a two commands:

out = env.Command(

["Makefile"],

copyed,

"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\

--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\

--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\

"

)

Then I have a command

env.Ignore(out, ["crypto/buildinf.h"])



env.Command(
[

env.File("crypto/buildinf.h"),

"#_makeinstall/${PART_NAME}/bin/c_rehash",

...

],

["Makefile"],

[

"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),

"cd ${SOURCE.dir} ; make install"

] )



What is happening is that after the first run Scons will tell me it needs to rebuild because:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile' because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' changed

I have an Ignore line that should remove this... What is odd for me is that the next build command is run because:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' because `_build/build_debug_posix-x86_64/openssl/Makefile' changed

I seem to have a cycle of some kind. I am unclear on how to break it.

I am unclear on what scanner is adding this depends in Command. Do we have a generic Makefile scanner??
Any thoughts??

Jason

_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Ccae88553915f47d8c91a08d5b1d5712f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610452634906164&sdata=LJ6F2%2BiZCnp1WZOIAfNDmAs4%2F3h3JJNnFtz0GnVCX4g%3D&reserved=0>



_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=6C3axeb9ZEUCd0ra2hdKQ8%2BP5Nr1WGdNl0wPQPgBAwI%3D&reserved=0>



_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C3d6fa86b3b704e0d3b0408d5b9bcdf81%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619143209334764&sdata=9XQji%2F6OPpBOB%2Fvk5%2F0KXcpUbuBudRz2trdZxTUM9Ac%3D&reserved=0>


_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C33e4200f953040bb564808d5b9dc4412%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619278038242537&sdata=cAn5DaMnoBZvmGhNiLcguy9XCeAx%2BQ1e4lDK6XvLBEI%3D&reserved=0>


_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C1f6950fa0ebf4e01541908d5b9e0b9f4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619297199382690&sdata=%2FuOwUBmbGeFcRLv2%2B53VCBnRVFMVlJ8zVxUOLSmbNVo%3D&reserved=0>
Bill Deegan
2018-05-15 01:11:31 UTC
Permalink
Which decider are you using?
Timestamp-MD5?

On Mon, May 14, 2018 at 7:56 PM, Jason Kenny <***@live.com> wrote:

> So I applied the patch to Node/__init__.py
>
>
>
> The crash from running sconsign went away. So that is good

>
>
>
> But the code still wants to rebuild.
>
>
>
> Sconsign tells me the
>
> Makefile: c469c39ede869a94e73f19970ca955b2 1526338830 498415
>
> 

>
> _build/build_debug_posix-x86_64/openssl/crypto/buildinf.h:
> ee0ce32ceb3b0fb0a23540d9b091dbac 1526338422 2680
>
> 

>
>
>
> After a different run I see building.h change to
>
>
>
> _build/build_debug_posix-x86_64/openssl/crypto/buildinf.h:
> abc69bce6ce9b90148cdd62dc5b4ea47 1526339184 2680
>
>
>
> Which repeats ( ie MD% changes) with every run.
>
>
>
> Is there something else that might need to be patched?
>
>
>
>
>
> Just in case it helps. On the second run of the build, --debug=explain
> tells me:
>
>
>
> scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile'
> because:
>
> `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' is
> a new dependency
>
> `_build/build_debug_posix-x86_64/openssl/apps/progs.h' is a
> new dependency
>
>
>
> The third run tells me:
>
> scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile'
> because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h'
> changed
>
>
>
> I clearly have a:
>
> env.Ignore(['_build/build_debug_posix-x86_64/openssl/Makefile'],
> ["_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h"])
>
>
>
> anyways .. looks like there is something else
>
>
>
> -Jason
>
>
>
> *From:* Scons-users <scons-users-***@scons.org> * On Behalf Of *Bill
> Deegan
> *Sent:* Monday, May 14, 2018 4:22 PM
>
> *To:* SCons users mailing list <scons-***@scons.org>
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> Yup..
>
>
>
> Something like this.. (patch below won't apply.. just edit the file..)
>
>
>
> +++ b/src/engine/SCons/Node/__init__.py
> @@ -1149,7 +1149,9 @@ class Node(object, with_metaclass(NoSlotsPyPy)):
> binfo.bdepends = self.depends
> binfo.bdependsigs = [d.get_ninfo() for d in self.depends if d not
> in ignore_set]
>
> + # TODO: If anything matches the ignore_set: bimplicit and
> bimplicitsigs will have different lengths and potentially the items in each
> list
> will not represent the same file. (any item but the last one matches any
> item in ignore_set)
> binfo.bimplicit = self.implicit or []
> + binfo.bimplicit = [i for i in binfo.bimplicit if i not in
> ignore_set]
> binfo.bimplicitsigs = [i.get_ninfo() for i in binfo.bimplicit if
> i not in ignore_set]
>
>
>
>
>
> On Mon, May 14, 2018 at 5:00 PM, Jason Kenny <***@live.com> wrote:
>
> No.. did not know about this utility.
>
>
>
> I ran it the first round and it dumps a ton of info..
>
> I ran scons again, then ran the utility again and it dumps this...
>
>
>
> LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589 6128
> _vcs/openssl/LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589
> 6128
> 55b40265a26683fbced32365cba594b5 [<lambda>(target, source, env)]
> Makefile: 1d7b4a1b320ff883d02f50dbf26cbfb4 1526331304 498401
> Traceback (most recent call last):
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 547, in
> <module>
> Do_SConsignDB(Map_Module.get(dbm_name, dbm_name), dbm)(a)
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 427, in
> __call__
> self.printentries(dir, db[dir])
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 431, in
> printentries
> printentries(pickle.loads(val), dir)
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 370, in
> printentries
> printfield(name, entry.binfo)
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 334, in
> printfield
> outlist = field("implicit", entry, 0)
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 297, in field
> val = mapper(entry, name)
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 277, in
> map_bkids
> result.append(nodeinfo_string(bkids[i], bkidsigs[i], " "))
> IndexError: list index out of range
>
>
>
>
>
> Does this look like the issue you had mentioned?
>
>
>
> Jason
>
>
> ------------------------------
>
> *From:* Scons-users <scons-users-***@scons.org> on behalf of Bill
> Deegan <***@baddogconsulting.com>
> *Sent:* Monday, May 14, 2018 3:49 PM
>
>
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> Did you try running sconsign on your .sconsign file?
>
>
>
> On Mon, May 14, 2018 at 2:05 PM, Jason Kenny <***@live.com> wrote:
>
> will be happy to try it out
>
> -Jason
> ------------------------------
>
> *From:* Scons-users <scons-users-***@scons.org> on behalf of Bill
> Deegan <***@baddogconsulting.com>
> *Sent:* Monday, May 14, 2018 12:05 PM
> *To:* SCons users mailing list
>
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> Jason,
>
>
>
> I believe I have a patch for the rebuilds.
>
> I found a simliar issue working on another problem.
>
>
>
> If sconsign crashes reading the .sconsign then you likely have the same
> issue.
>
> Give it a try and let me know.
>
> I'm away from computer for a bit, but I'll send you the patch to try.
>
> Basically the sconsign ends up with mismatched md5's for file names but
> only when ignore is being used because the names aren't filtered, but the
> md5's are.
>
>
>
> -Bill
>
>
>
>
>
> On Mon, May 14, 2018 at 12:44 PM, Jason Kenny <***@live.com> wrote:
>
> Hi Bill
>
> I was out traveling last week, however, I made some progress on this.
>
> If I disable the scanner ( changed the code to always return [] ) The
> build worked fine. So the issue is the scanner and how it adds depends to a
> target. I am unclear on why Ignore() is not working as expected. Scons
> wants to keep rebuilding because buildinf.h changed. If I don't have the
> Ignore() I get an error from the taskmaster on the second run with a
> circular depends. I would expect the only Ignore call would prevent rebuilds
>
> As a workaround, I change the code from using the Parts Pattern object.
> which is basically a recursive Glob() at this point, to just copy the
> openssl source directory to the variant directory. This work as the c
> scanner is global on any C file being defined. By making this a directory
> the copy logic does not define any C file nodes. Since the C files are not
> defined as nodes they are not seen by the scanner to be scanned and added
> as a depends to the target of the Command() that generated the Makefile.
>
> Is there an official way to turn off the scanner for a given command?? Or
> is this more of a bug with the Ignore() logic as Scons does not seem to
> "fully" ignore the depends added by the scanner.
>
> either way, I have a workaround. However, it seems this is could be an
> unexpected catch 22 for people that have to call a "third party" build
> system to get a full build to work.
>
> -Jason
>
>
> ------------------------------
>
> *From:* Jason Kenny
> *Sent:* Friday, May 4, 2018 7:29 PM
> *To:* SCons users mailing list
> *Subject:* RE: [Scons-users] Having issue with scanner in Command()
>
>
>
> In Parts the VCS_DIR is where the code is checked out too. The BUILD_DIR
> is basically the SCons Variant directory for the given “Part”/component. I
> was copying data to this place as OpenSSL does not have an out of source
> build option, and as such would “pollute” the source area.
>
>
>
> I was looking at it more in details. If I build
>
> “Scons _build/build_debug_posix-x86_64/openssl/Makefile”
>
>
>
> Everything is fine SCons says everything is up to date the next round. If
> I build “_makeinstall/openssl/bin/c_rehash” which is defined in the
> second Command() the next pass has this problem. It seems for some reason
> once the generated building.h file is generated something is adding it as a
> depends. I am not sure at the moment if this is seen as implicit or
> explicated by the system. I am assuming it is implicate and being added by
> a scanner. However I have not found what added it as of yet. I don’t think
> it is anything in Parts. I did notice that if I remove the copyed->[] after
> everything is built remove the scons db file everything is fine. I think it
> has to do with my coping object as the source and they are getting scanned
> by the c-scanner but I am unclear how this would be adding it as a depends
> to the target. It has been a while since I have been in this code. I think
> SCons does not make a tree like:
>
>
>
> Foo.exe
>
> + foo.obj
>
> + foo.c
>
> +foo.h
>
>
>
> But makes a
>
>
>
> Foo.exe
>
> + foo.obj
>
> + foo.c
>
> + foo.h
>
>
>
> My theory is the since SCons does the last case. Scons might be adding
> “generated” file of the openssl make build via the scanner at the wrong
> level. Since Scons would add the .h file not as a depends of the .c but to
> the target that depends on the .c file.
>
>
>
> I think I need to do a test run with the C-scanner disabled to verify this
>
>
>
> Jason
>
>
>
> *From:* Scons-users <scons-users-***@scons.org> *On Behalf Of *Bill
> Deegan
> *Sent:* Friday, May 4, 2018 3:23 PM
> *To:* SCons users mailing list <scons-***@scons.org>
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> What's VCS_DIR and BUILD_DIR ?
>
>
>
> On Fri, May 4, 2018 at 1:18 PM, Jason Kenny <***@live.com> wrote:
>
> to simplify the log file the tree looks like this:
>
> +-build::alias::openssl
>
> +-build::alias::openssl::SDKBIN
>
> | +-_sdks/debug_posix-x86_64_default/openssl_1.1.0_
> 51bed083228027f76730230d116bace9/bin/c_rehash
>
> | | +-_build/build_debug_posix-x86_64/openssl/_set_RPATH_/c_rehash
>
> | | +-_makeinstall/openssl/bin/c_rehash
>
> | | +-_build/build_debug_posix-x86_64/openssl/Makefile
>
> | | +-_build/build_debug_posix-x86_64/openssl/crypto/ripemd/build.info
> <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>
>
> | | | +-_vcs/openssl/crypto/ripemd/build.info
> <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>
>
> ....
>
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_win.c]
>
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/arm_arch.h]
>
> | | +-_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h
>
> | | | +-[_build/build_debug_posix-x86_64/openssl/Makefile]
>
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_nyi.c]
>
>
>
> I am not sure why _makeinstall/openssl/bin/c_rehash ->
> _build/build_debug_posix-x86_64/openssl/Makefile ->
> _build/build_debug_posix-x86_64/openssl/crypto/buildinf.h ->
> _build/build_debug_posix-x86_64/openssl/Makefile
>
> I would think c_rehash should depend on the Makefile. I would not think
> Scons would "know" anything about buildinf.h
>
> - Jason
> ------------------------------
>
> *From:* Jason Kenny <***@live.com>
> *Sent:* Friday, May 4, 2018 11:26 AM
>
>
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> *copyed* was me coping data to the variant directory to allow cross build
> to work better
>
> log file is here https://bitbucket.org/snippets/dragon512/KeGax5
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fsnippets%2Fdragon512%2FKeGax5&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=%2Fn83xUdN3J5rmYczw5ss%2F9zcjkQnka5BC1nqEw8eLtk%3D&reserved=0>
>
>
> Below is the Parts file I have been hacking on ( I hope to clean it up
> more...) It is based on work I have yet to publish in Parts in my branch.
>
>
> -----
> Import('*')
> PartVersion("1.1.0")
> files = Pattern(src_dir="${VCS_DIR}", excludes=[".git/*"])
>
> copyed = env.CCopy(
> source=files,
> target="$BUILD_DIR",
> copy_logic=CCopy.copy # could hard links be an issue????
> )
> out = env.Command(
> ["Makefile"],
> copyed,
> "cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH
> enable-ec_nistp_64_gcc_128\
> --prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
> --openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64
> shared\
> "
> )
>
> # env.Ignore("_build/build_debug_posix-x86_64/openssl/
> crypto/buildinf.h","${VCS_DIR}/crypto/buildinf.h")
> env.Ignore(out, ["crypto/buildinf.h"])
>
>
>
> out = env.Command(
> [
> env.File("crypto/buildinf.h"),
> "#_makeinstall/${PART_NAME}/bin/c_rehash",
> "#_makeinstall/${PART_NAME}/bin/openssl",
> "#_makeinstall/${PART_NAME}/include/openssl/aes.h",
> "#_makeinstall/${PART_NAME}/include/openssl/camellia.h",
> "#_makeinstall/${PART_NAME}/include/openssl/des.h",
> "#_makeinstall/${PART_NAME}/include/openssl/e_os2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md5.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pem2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/stack.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509_vfy.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cast.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dh.h",
> "#_makeinstall/${PART_NAME}/include/openssl/err.h",
> "#_makeinstall/${PART_NAME}/include/openssl/mdc2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pem.h",
> "#_makeinstall/${PART_NAME}/include/openssl/safestack.h",
> "#_makeinstall/${PART_NAME}/include/openssl/symhacks.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1_mac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cmac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/evp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/modes.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pkcs12.h",
> "#_makeinstall/${PART_NAME}/include/openssl/seed.h",
> "#_makeinstall/${PART_NAME}/include/openssl/tls1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1t.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cms.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dtls1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/hmac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/objects.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pkcs7.h",
> "#_makeinstall/${PART_NAME}/include/openssl/sha.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ts.h",
> "#_makeinstall/${PART_NAME}/include/openssl/async.h",
> "#_makeinstall/${PART_NAME}/include/openssl/comp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ebcdic.h",
> "#_makeinstall/${PART_NAME}/include/openssl/idea.h",
> "#_makeinstall/${PART_NAME}/include/openssl/obj_mac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rand.h",
> "#_makeinstall/${PART_NAME}/include/openssl/srp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/txt_db.h",
> "#_makeinstall/${PART_NAME}/include/openssl/bio.h",
> "#_makeinstall/${PART_NAME}/include/openssl/conf_api.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ecdh.h",
> "#_makeinstall/${PART_NAME}/include/openssl/kdf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ocsp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/srtp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ui.h",
> "#_makeinstall/${PART_NAME}/include/openssl/blowfish.h",
> "#_makeinstall/${PART_NAME}/include/openssl/conf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ecdsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/lhash.h",
> "#_makeinstall/${PART_NAME}/include/openssl/opensslconf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc4.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/whrlpool.h",
> "#_makeinstall/${PART_NAME}/include/openssl/bn.h",
> "#_makeinstall/${PART_NAME}/include/openssl/crypto.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ec.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/opensslv.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc5.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl3.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509.h",
> "#_makeinstall/${PART_NAME}/include/openssl/buffer.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ct.h",
> "#_makeinstall/${PART_NAME}/include/openssl/engine.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md4.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ossl_typ.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ripemd.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509v3.h",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/afalg.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.a",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/capi.so",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/padlock.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.so.1.1",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.a",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/libcrypto.pc",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/libssl.pc",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.so",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.so.1.1",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/openssl.pc",
> ],
> ["Makefile"],
> [
> "cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}}
> $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
> "cd ${SOURCE.dir} ; make install"
> ]
> )
>
> env.InstallBin(
> env.Glob("#_makeinstall/${PART_NAME}/bin/*")
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/*.a"),
> auto_add_libs=False)
> env.InstallLib(
> env.Glob("#_makeinstall/${PART_NAME}/lib/*.so*")
>
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/libengines-1.1/*.so"),
> auto_add_libs=False, sub_dir="libengines-1.1")
> env.InstallInclude( # bug we need to fix -JK
> env.SdkInclude(
> env.Glob("#_makeinstall/${PART_NAME}/include/openssl/*"),
> sub_dir="openssl",
> add_to_path=False
> ),
> sub_dir="openssl"
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/pkgconfig/*.pc"),
> auto_add_libs=False, sub_dir="pkgconfig", add_to_path=False)
>
> ------------------------------
>
> *From:* Scons-users <scons-users-***@scons.org> on behalf of Bill
> Deegan <***@baddogconsulting.com>
> *Sent:* Friday, May 4, 2018 10:40 AM
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> Jason,
>
>
>
> I"m not aware of a Makefile scanner.
>
>
>
> What's in variable 'copyed'?
>
>
>
> Can you paste output of --tree=prune?
>
> -Bill
>
>
>
> On Fri, May 4, 2018 at 10:31 AM, Jason Kenny <***@live.com> wrote:
>
> Hi,
>
> I am setting up a build with SCons that has to build openssl. I am using
> the Command() logic to call the native build system. I am having an issue
> with this code wanting to rebuild because of a file "crypto/buildinf.h" is
> rebuilt as part of the process with a new date value/ This causes SCons to
> say stuff needs to be rebuilt. The issue here is an odd circular reference
> that is forming up and I am unclear on what is adding it at this time. I am
> hoping before I dig to deep into this that some one might know, or have
> some idea on what is happening. Details
>
> I have a two commands:
>
>
> out = env.Command(
>
> ["Makefile"],
>
> copyed,
>
> "cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH
> enable-ec_nistp_64_gcc_128\
>
> --prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
>
> --openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64
> shared\
>
> "
>
> )
>
>
> Then I have a command
>
> env.Ignore(out, ["crypto/buildinf.h"])
>
>
>
> env.Command(
> [
>
> env.File("crypto/buildinf.h"),
>
> "#_makeinstall/${PART_NAME}/bin/c_rehash",
>
> ...
>
> ],
>
> ["Makefile"],
>
> [
>
> "cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}}
> $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
>
> "cd ${SOURCE.dir} ; make install"
>
> ] )
>
>
>
> What is happening is that after the first run Scons will tell me it needs
> to rebuild because:
>
> scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile'
> because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h'
> changed
>
> I have an Ignore line that should remove this... What is odd for me is
> that the next build command is run because:
>
> scons: rebuilding `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h'
> because `_build/build_debug_posix-x86_64/openssl/Makefile' changed
>
>
> I seem to have a cycle of some kind. I am unclear on how to break it.
>
>
> I am unclear on what scanner is adding this depends in Command. Do we have
> a generic Makefile scanner??
> Any thoughts??
>
> Jason
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Ccae88553915f47d8c91a08d5b1d5712f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610452634906164&sdata=LJ6F2%2BiZCnp1WZOIAfNDmAs4%2F3h3JJNnFtz0GnVCX4g%3D&reserved=0>
>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=6C3axeb9ZEUCd0ra2hdKQ8%2BP5Nr1WGdNl0wPQPgBAwI%3D&reserved=0>
>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C3d6fa86b3b704e0d3b0408d5b9bcdf81%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619143209334764&sdata=9XQji%2F6OPpBOB%2Fvk5%2F0KXcpUbuBudRz2trdZxTUM9Ac%3D&reserved=0>
>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C33e4200f953040bb564808d5b9dc4412%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619278038242537&sdata=cAn5DaMnoBZvmGhNiLcguy9XCeAx%2BQ1e4lDK6XvLBEI%3D&reserved=0>
>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C1f6950fa0ebf4e01541908d5b9e0b9f4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619297199382690&sdata=%2FuOwUBmbGeFcRLv2%2B53VCBnRVFMVlJ8zVxUOLSmbNVo%3D&reserved=0>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
Jason Kenny
2018-05-15 01:16:21 UTC
Permalink
No

'MD5-timestamp'

Jason


From: Scons-users <scons-users-***@scons.org> On Behalf Of Bill Deegan
Sent: Monday, May 14, 2018 8:12 PM
To: SCons users mailing list <scons-***@scons.org>
Subject: Re: [Scons-users] Having issue with scanner in Command()

Which decider are you using?
Timestamp-MD5?

On Mon, May 14, 2018 at 7:56 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
So I applied the patch to Node/__init__.py

The crash from running sconsign went away. So that is good


But the code still wants to rebuild.

Sconsign tells me the
Makefile: c469c39ede869a94e73f19970ca955b2 1526338830 498415


_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h: ee0ce32ceb3b0fb0a23540d9b091dbac 1526338422 2680



After a different run I see building.h change to

_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h: abc69bce6ce9b90148cdd62dc5b4ea47 1526339184 2680

Which repeats ( ie MD% changes) with every run.

Is there something else that might need to be patched?


Just in case it helps. On the second run of the build, --debug=explain tells me:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile' because:
`_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' is a new dependency
`_build/build_debug_posix-x86_64/openssl/apps/progs.h' is a new dependency

The third run tells me:
scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile' because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' changed

I clearly have a:
env.Ignore(['_build/build_debug_posix-x86_64/openssl/Makefile'], ["_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h"])

anyways .. looks like there is something else

-Jason

From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> On Behalf Of Bill Deegan
Sent: Monday, May 14, 2018 4:22 PM

To: SCons users mailing list <scons-***@scons.org<mailto:scons-***@scons.org>>
Subject: Re: [Scons-users] Having issue with scanner in Command()

Yup..

Something like this.. (patch below won't apply.. just edit the file..)

+++ b/src/engine/SCons/Node/__init__.py
@@ -1149,7 +1149,9 @@ class Node(object, with_metaclass(NoSlotsPyPy)):
binfo.bdepends = self.depends
binfo.bdependsigs = [d.get_ninfo() for d in self.depends if d not in ignore_set]

+ # TODO: If anything matches the ignore_set: bimplicit and bimplicitsigs will have different lengths and potentially the items in each list
will not represent the same file. (any item but the last one matches any item in ignore_set)
binfo.bimplicit = self.implicit or []
+ binfo.bimplicit = [i for i in binfo.bimplicit if i not in ignore_set]
binfo.bimplicitsigs = [i.get_ninfo() for i in binfo.bimplicit if i not in ignore_set]


On Mon, May 14, 2018 at 5:00 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
No.. did not know about this utility.

I ran it the first round and it dumps a ton of info..
I ran scons again, then ran the utility again and it dumps this...

LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589 6128
_vcs/openssl/LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589 6128
55b40265a26683fbced32365cba594b5 [<lambda>(target, source, env)]
Makefile: 1d7b4a1b320ff883d02f50dbf26cbfb4 1526331304 498401
Traceback (most recent call last):
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 547, in <module>
Do_SConsignDB(Map_Module.get(dbm_name, dbm_name), dbm)(a)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 427, in __call__
self.printentries(dir, db[dir])
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 431, in printentries
printentries(pickle.loads(val), dir)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 370, in printentries
printfield(name, entry.binfo)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 334, in printfield
outlist = field("implicit", entry, 0)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 297, in field
val = mapper(entry, name)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 277, in map_bkids
result.append(nodeinfo_string(bkids[i], bkidsigs[i], " "))
IndexError: list index out of range


Does this look like the issue you had mentioned?

Jason

________________________________
From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> on behalf of Bill Deegan <***@baddogconsulting.com<mailto:***@baddogconsulting.com>>
Sent: Monday, May 14, 2018 3:49 PM

To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()

Did you try running sconsign on your .sconsign file?

On Mon, May 14, 2018 at 2:05 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
will be happy to try it out
-Jason
________________________________
From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> on behalf of Bill Deegan <***@baddogconsulting.com<mailto:***@baddogconsulting.com>>
Sent: Monday, May 14, 2018 12:05 PM
To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()

Jason,

I believe I have a patch for the rebuilds.
I found a simliar issue working on another problem.

If sconsign crashes reading the .sconsign then you likely have the same issue.
Give it a try and let me know.
I'm away from computer for a bit, but I'll send you the patch to try.
Basically the sconsign ends up with mismatched md5's for file names but only when ignore is being used because the names aren't filtered, but the md5's are.

-Bill


On Mon, May 14, 2018 at 12:44 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
Hi Bill
I was out traveling last week, however, I made some progress on this.
If I disable the scanner ( changed the code to always return [] ) The build worked fine. So the issue is the scanner and how it adds depends to a target. I am unclear on why Ignore() is not working as expected. Scons wants to keep rebuilding because buildinf.h changed. If I don't have the Ignore() I get an error from the taskmaster on the second run with a circular depends. I would expect the only Ignore call would prevent rebuilds
As a workaround, I change the code from using the Parts Pattern object. which is basically a recursive Glob() at this point, to just copy the openssl source directory to the variant directory. This work as the c scanner is global on any C file being defined. By making this a directory the copy logic does not define any C file nodes. Since the C files are not defined as nodes they are not seen by the scanner to be scanned and added as a depends to the target of the Command() that generated the Makefile.
Is there an official way to turn off the scanner for a given command?? Or is this more of a bug with the Ignore() logic as Scons does not seem to "fully" ignore the depends added by the scanner.
either way, I have a workaround. However, it seems this is could be an unexpected catch 22 for people that have to call a "third party" build system to get a full build to work.
-Jason

________________________________
From: Jason Kenny
Sent: Friday, May 4, 2018 7:29 PM
To: SCons users mailing list
Subject: RE: [Scons-users] Having issue with scanner in Command()


In Parts the VCS_DIR is where the code is checked out too. The BUILD_DIR is basically the SCons Variant directory for the given “Part”/component. I was copying data to this place as OpenSSL does not have an out of source build option, and as such would “pollute” the source area.



I was looking at it more in details. If I build

“Scons _build/build_debug_posix-x86_64/openssl/Makefile”



Everything is fine SCons says everything is up to date the next round. If I build “_makeinstall/openssl/bin/c_rehash” which is defined in the second Command() the next pass has this problem. It seems for some reason once the generated building.h file is generated something is adding it as a depends. I am not sure at the moment if this is seen as implicit or explicated by the system. I am assuming it is implicate and being added by a scanner. However I have not found what added it as of yet. I don’t think it is anything in Parts. I did notice that if I remove the copyed->[] after everything is built remove the scons db file everything is fine. I think it has to do with my coping object as the source and they are getting scanned by the c-scanner but I am unclear how this would be adding it as a depends to the target. It has been a while since I have been in this code. I think SCons does not make a tree like:



Foo.exe

+ foo.obj

+ foo.c

+foo.h



But makes a



Foo.exe

+ foo.obj

+ foo.c

+ foo.h



My theory is the since SCons does the last case. Scons might be adding “generated” file of the openssl make build via the scanner at the wrong level. Since Scons would add the .h file not as a depends of the .c but to the target that depends on the .c file.



I think I need to do a test run with the C-scanner disabled to verify this



Jason



From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> On Behalf Of Bill Deegan
Sent: Friday, May 4, 2018 3:23 PM
To: SCons users mailing list <scons-***@scons.org<mailto:scons-***@scons.org>>
Subject: Re: [Scons-users] Having issue with scanner in Command()



What's VCS_DIR and BUILD_DIR ?



On Fri, May 4, 2018 at 1:18 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:

to simplify the log file the tree looks like this:

+-build::alias::openssl

+-build::alias::openssl::SDKBIN

| +-_sdks/debug_posix-x86_64_default/openssl_1.1.0_51bed083228027f76730230d116bace9/bin/c_rehash

| | +-_build/build_debug_posix-x86_64/openssl/_set_RPATH_/c_rehash

| | +-_makeinstall/openssl/bin/c_rehash

| | +-_build/build_debug_posix-x86_64/openssl/Makefile

| | +-_build/build_debug_posix-x86_64/openssl/crypto/ripemd/build.info<https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>

| | | +-_vcs/openssl/crypto/ripemd/build.info<https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>

....

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_win.c]

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/arm_arch.h]

| | +-_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h

| | | +-[_build/build_debug_posix-x86_64/openssl/Makefile]

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_nyi.c]


I am not sure why _makeinstall/openssl/bin/c_rehash -> _build/build_debug_posix-x86_64/openssl/Makefile ->_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h -> _build/build_debug_posix-x86_64/openssl/Makefile

I would think c_rehash should depend on the Makefile. I would not think Scons would "know" anything about buildinf.h

- Jason

________________________________

From: Jason Kenny <***@live.com<mailto:***@live.com>>
Sent: Friday, May 4, 2018 11:26 AM

To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()



copyed was me coping data to the variant directory to allow cross build to work better

log file is here https://bitbucket.org/snippets/dragon512/KeGax5<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fsnippets%2Fdragon512%2FKeGax5&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=%2Fn83xUdN3J5rmYczw5ss%2F9zcjkQnka5BC1nqEw8eLtk%3D&reserved=0>


Below is the Parts file I have been hacking on ( I hope to clean it up more...) It is based on work I have yet to publish in Parts in my branch.


-----
Import('*')
PartVersion("1.1.0")
files = Pattern(src_dir="${VCS_DIR}", excludes=[".git/*"])

copyed = env.CCopy(
source=files,
target="$BUILD_DIR",
copy_logic=CCopy.copy # could hard links be an issue????
)
out = env.Command(
["Makefile"],
copyed,
"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\
--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\
"
)

# env.Ignore("_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h","${VCS_DIR}/crypto/buildinf.h")
env.Ignore(out, ["crypto/buildinf.h"])



out = env.Command(
[
env.File("crypto/buildinf.h"),
"#_makeinstall/${PART_NAME}/bin/c_rehash",
"#_makeinstall/${PART_NAME}/bin/openssl",
"#_makeinstall/${PART_NAME}/include/openssl/aes.h",
"#_makeinstall/${PART_NAME}/include/openssl/camellia.h",
"#_makeinstall/${PART_NAME}/include/openssl/des.h",
"#_makeinstall/${PART_NAME}/include/openssl/e_os2.h",
"#_makeinstall/${PART_NAME}/include/openssl/md5.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem2.h",
"#_makeinstall/${PART_NAME}/include/openssl/rsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/stack.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509_vfy.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1.h",
"#_makeinstall/${PART_NAME}/include/openssl/cast.h",
"#_makeinstall/${PART_NAME}/include/openssl/dh.h",
"#_makeinstall/${PART_NAME}/include/openssl/err.h",
"#_makeinstall/${PART_NAME}/include/openssl/mdc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem.h",
"#_makeinstall/${PART_NAME}/include/openssl/safestack.h",
"#_makeinstall/${PART_NAME}/include/openssl/symhacks.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/cmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/dsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/evp.h",
"#_makeinstall/${PART_NAME}/include/openssl/modes.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs12.h",
"#_makeinstall/${PART_NAME}/include/openssl/seed.h",
"#_makeinstall/${PART_NAME}/include/openssl/tls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1t.h",
"#_makeinstall/${PART_NAME}/include/openssl/cms.h",
"#_makeinstall/${PART_NAME}/include/openssl/dtls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/hmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/objects.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs7.h",
"#_makeinstall/${PART_NAME}/include/openssl/sha.h",
"#_makeinstall/${PART_NAME}/include/openssl/ts.h",
"#_makeinstall/${PART_NAME}/include/openssl/async.h",
"#_makeinstall/${PART_NAME}/include/openssl/comp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ebcdic.h",
"#_makeinstall/${PART_NAME}/include/openssl/idea.h",
"#_makeinstall/${PART_NAME}/include/openssl/obj_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/rand.h",
"#_makeinstall/${PART_NAME}/include/openssl/srp.h",
"#_makeinstall/${PART_NAME}/include/openssl/txt_db.h",
"#_makeinstall/${PART_NAME}/include/openssl/bio.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf_api.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdh.h",
"#_makeinstall/${PART_NAME}/include/openssl/kdf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ocsp.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/srtp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ui.h",
"#_makeinstall/${PART_NAME}/include/openssl/blowfish.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/lhash.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslconf.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl2.h",
"#_makeinstall/${PART_NAME}/include/openssl/whrlpool.h",
"#_makeinstall/${PART_NAME}/include/openssl/bn.h",
"#_makeinstall/${PART_NAME}/include/openssl/crypto.h",
"#_makeinstall/${PART_NAME}/include/openssl/ec.h",
"#_makeinstall/${PART_NAME}/include/openssl/md2.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslv.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc5.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl3.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509.h",
"#_makeinstall/${PART_NAME}/include/openssl/buffer.h",
"#_makeinstall/${PART_NAME}/include/openssl/ct.h",
"#_makeinstall/${PART_NAME}/include/openssl/engine.h",
"#_makeinstall/${PART_NAME}/include/openssl/md4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ossl_typ.h",
"#_makeinstall/${PART_NAME}/include/openssl/ripemd.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509v3.h",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/afalg.so",
"#_makeinstall/${PART_NAME}/lib/libssl.a",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/capi.so",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/padlock.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so.1.1",
"#_makeinstall/${PART_NAME}/lib/libcrypto.a",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libcrypto.pc",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libssl.pc",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so.1.1",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/openssl.pc",
],
["Makefile"],
[
"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
"cd ${SOURCE.dir} ; make install"
]
)

env.InstallBin(
env.Glob("#_makeinstall/${PART_NAME}/bin/*")
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/*.a"), auto_add_libs=False)
env.InstallLib(
env.Glob("#_makeinstall/${PART_NAME}/lib/*.so*")

)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/libengines-1.1/*.so"), auto_add_libs=False, sub_dir="libengines-1.1")
env.InstallInclude( # bug we need to fix -JK
env.SdkInclude(
env.Glob("#_makeinstall/${PART_NAME}/include/openssl/*"),
sub_dir="openssl",
add_to_path=False
),
sub_dir="openssl"
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/pkgconfig/*.pc"), auto_add_libs=False, sub_dir="pkgconfig", add_to_path=False)


________________________________

From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> on behalf of Bill Deegan <***@baddogconsulting.com<mailto:***@baddogconsulting.com>>
Sent: Friday, May 4, 2018 10:40 AM
To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()



Jason,



I"m not aware of a Makefile scanner.



What's in variable 'copyed'?



Can you paste output of --tree=prune?

-Bill



On Fri, May 4, 2018 at 10:31 AM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:

Hi,

I am setting up a build with SCons that has to build openssl. I am using the Command() logic to call the native build system. I am having an issue with this code wanting to rebuild because of a file "crypto/buildinf.h" is rebuilt as part of the process with a new date value/ This causes SCons to say stuff needs to be rebuilt. The issue here is an odd circular reference that is forming up and I am unclear on what is adding it at this time. I am hoping before I dig to deep into this that some one might know, or have some idea on what is happening. Details

I have a two commands:

out = env.Command(

["Makefile"],

copyed,

"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\

--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\

--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\

"

)

Then I have a command

env.Ignore(out, ["crypto/buildinf.h"])



env.Command(
[

env.File("crypto/buildinf.h"),

"#_makeinstall/${PART_NAME}/bin/c_rehash",

...

],

["Makefile"],

[

"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),

"cd ${SOURCE.dir} ; make install"

] )



What is happening is that after the first run Scons will tell me it needs to rebuild because:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile' because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' changed

I have an Ignore line that should remove this... What is odd for me is that the next build command is run because:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' because `_build/build_debug_posix-x86_64/openssl/Makefile' changed

I seem to have a cycle of some kind. I am unclear on how to break it.

I am unclear on what scanner is adding this depends in Command. Do we have a generic Makefile scanner??
Any thoughts??

Jason

_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Ccae88553915f47d8c91a08d5b1d5712f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610452634906164&sdata=LJ6F2%2BiZCnp1WZOIAfNDmAs4%2F3h3JJNnFtz0GnVCX4g%3D&reserved=0>



_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=6C3axeb9ZEUCd0ra2hdKQ8%2BP5Nr1WGdNl0wPQPgBAwI%3D&reserved=0>



_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C3d6fa86b3b704e0d3b0408d5b9bcdf81%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619143209334764&sdata=9XQji%2F6OPpBOB%2Fvk5%2F0KXcpUbuBudRz2trdZxTUM9Ac%3D&reserved=0>


_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C33e4200f953040bb564808d5b9dc4412%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619278038242537&sdata=cAn5DaMnoBZvmGhNiLcguy9XCeAx%2BQ1e4lDK6XvLBEI%3D&reserved=0>


_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C1f6950fa0ebf4e01541908d5b9e0b9f4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619297199382690&sdata=%2FuOwUBmbGeFcRLv2%2B53VCBnRVFMVlJ8zVxUOLSmbNVo%3D&reserved=0>


_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C8d76ed5233fd4f2951bd08d5ba00d2b7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619435053455498&sdata=5u%2B7TYAKrx4qjdKd9I%2BR9w3%2Bpa4pKCGwcnmVbCODhr0%3D&reserved=0>
Bill Deegan
2018-05-15 01:44:43 UTC
Permalink
Did you try checking the md5's of some of the "changed files" against the
actual files?
Are you running from the master branch?

On Mon, May 14, 2018 at 9:16 PM, Jason Kenny <***@live.com> wrote:

> No
>
>
>
> 'MD5-timestamp'
>
>
>
> Jason
>
>
>
>
>
> *From:* Scons-users <scons-users-***@scons.org> * On Behalf Of *Bill
> Deegan
> *Sent:* Monday, May 14, 2018 8:12 PM
>
> *To:* SCons users mailing list <scons-***@scons.org>
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> Which decider are you using?
>
> Timestamp-MD5?
>
>
>
> On Mon, May 14, 2018 at 7:56 PM, Jason Kenny <***@live.com> wrote:
>
> So I applied the patch to Node/__init__.py
>
>
>
> The crash from running sconsign went away. So that is good

>
>
>
> But the code still wants to rebuild.
>
>
>
> Sconsign tells me the
>
> Makefile: c469c39ede869a94e73f19970ca955b2 1526338830 498415
>
> 

>
> _build/build_debug_posix-x86_64/openssl/crypto/buildinf.h:
> ee0ce32ceb3b0fb0a23540d9b091dbac 1526338422 2680
>
> 

>
>
>
> After a different run I see building.h change to
>
>
>
> _build/build_debug_posix-x86_64/openssl/crypto/buildinf.h:
> abc69bce6ce9b90148cdd62dc5b4ea47 1526339184 2680
>
>
>
> Which repeats ( ie MD% changes) with every run.
>
>
>
> Is there something else that might need to be patched?
>
>
>
>
>
> Just in case it helps. On the second run of the build, --debug=explain
> tells me:
>
>
>
> scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile'
> because:
>
> `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' is
> a new dependency
>
> `_build/build_debug_posix-x86_64/openssl/apps/progs.h' is a
> new dependency
>
>
>
> The third run tells me:
>
> scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile'
> because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h'
> changed
>
>
>
> I clearly have a:
>
> env.Ignore(['_build/build_debug_posix-x86_64/openssl/Makefile'],
> ["_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h"])
>
>
>
> anyways .. looks like there is something else
>
>
>
> -Jason
>
>
>
> *From:* Scons-users <scons-users-***@scons.org> *On Behalf Of *Bill
> Deegan
> *Sent:* Monday, May 14, 2018 4:22 PM
>
>
> *To:* SCons users mailing list <scons-***@scons.org>
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> Yup..
>
>
>
> Something like this.. (patch below won't apply.. just edit the file..)
>
>
>
> +++ b/src/engine/SCons/Node/__init__.py
> @@ -1149,7 +1149,9 @@ class Node(object, with_metaclass(NoSlotsPyPy)):
> binfo.bdepends = self.depends
> binfo.bdependsigs = [d.get_ninfo() for d in self.depends if d not
> in ignore_set]
>
> + # TODO: If anything matches the ignore_set: bimplicit and
> bimplicitsigs will have different lengths and potentially the items in each
> list
> will not represent the same file. (any item but the last one matches any
> item in ignore_set)
> binfo.bimplicit = self.implicit or []
> + binfo.bimplicit = [i for i in binfo.bimplicit if i not in
> ignore_set]
> binfo.bimplicitsigs = [i.get_ninfo() for i in binfo.bimplicit if
> i not in ignore_set]
>
>
>
>
>
> On Mon, May 14, 2018 at 5:00 PM, Jason Kenny <***@live.com> wrote:
>
> No.. did not know about this utility.
>
>
>
> I ran it the first round and it dumps a ton of info..
>
> I ran scons again, then ran the utility again and it dumps this...
>
>
>
> LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589 6128
> _vcs/openssl/LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589
> 6128
> 55b40265a26683fbced32365cba594b5 [<lambda>(target, source, env)]
> Makefile: 1d7b4a1b320ff883d02f50dbf26cbfb4 1526331304 498401
> Traceback (most recent call last):
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 547, in
> <module>
> Do_SConsignDB(Map_Module.get(dbm_name, dbm_name), dbm)(a)
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 427, in
> __call__
> self.printentries(dir, db[dir])
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 431, in
> printentries
> printentries(pickle.loads(val), dir)
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 370, in
> printentries
> printfield(name, entry.binfo)
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 334, in
> printfield
> outlist = field("implicit", entry, 0)
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 297, in field
> val = mapper(entry, name)
> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 277, in
> map_bkids
> result.append(nodeinfo_string(bkids[i], bkidsigs[i], " "))
> IndexError: list index out of range
>
>
>
>
>
> Does this look like the issue you had mentioned?
>
>
>
> Jason
>
>
> ------------------------------
>
> *From:* Scons-users <scons-users-***@scons.org> on behalf of Bill
> Deegan <***@baddogconsulting.com>
> *Sent:* Monday, May 14, 2018 3:49 PM
>
>
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> Did you try running sconsign on your .sconsign file?
>
>
>
> On Mon, May 14, 2018 at 2:05 PM, Jason Kenny <***@live.com> wrote:
>
> will be happy to try it out
>
> -Jason
> ------------------------------
>
> *From:* Scons-users <scons-users-***@scons.org> on behalf of Bill
> Deegan <***@baddogconsulting.com>
> *Sent:* Monday, May 14, 2018 12:05 PM
> *To:* SCons users mailing list
>
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> Jason,
>
>
>
> I believe I have a patch for the rebuilds.
>
> I found a simliar issue working on another problem.
>
>
>
> If sconsign crashes reading the .sconsign then you likely have the same
> issue.
>
> Give it a try and let me know.
>
> I'm away from computer for a bit, but I'll send you the patch to try.
>
> Basically the sconsign ends up with mismatched md5's for file names but
> only when ignore is being used because the names aren't filtered, but the
> md5's are.
>
>
>
> -Bill
>
>
>
>
>
> On Mon, May 14, 2018 at 12:44 PM, Jason Kenny <***@live.com> wrote:
>
> Hi Bill
>
> I was out traveling last week, however, I made some progress on this.
>
> If I disable the scanner ( changed the code to always return [] ) The
> build worked fine. So the issue is the scanner and how it adds depends to a
> target. I am unclear on why Ignore() is not working as expected. Scons
> wants to keep rebuilding because buildinf.h changed. If I don't have the
> Ignore() I get an error from the taskmaster on the second run with a
> circular depends. I would expect the only Ignore call would prevent rebuilds
>
> As a workaround, I change the code from using the Parts Pattern object.
> which is basically a recursive Glob() at this point, to just copy the
> openssl source directory to the variant directory. This work as the c
> scanner is global on any C file being defined. By making this a directory
> the copy logic does not define any C file nodes. Since the C files are not
> defined as nodes they are not seen by the scanner to be scanned and added
> as a depends to the target of the Command() that generated the Makefile.
>
> Is there an official way to turn off the scanner for a given command?? Or
> is this more of a bug with the Ignore() logic as Scons does not seem to
> "fully" ignore the depends added by the scanner.
>
> either way, I have a workaround. However, it seems this is could be an
> unexpected catch 22 for people that have to call a "third party" build
> system to get a full build to work.
>
> -Jason
>
>
> ------------------------------
>
> *From:* Jason Kenny
> *Sent:* Friday, May 4, 2018 7:29 PM
> *To:* SCons users mailing list
> *Subject:* RE: [Scons-users] Having issue with scanner in Command()
>
>
>
> In Parts the VCS_DIR is where the code is checked out too. The BUILD_DIR
> is basically the SCons Variant directory for the given “Part”/component. I
> was copying data to this place as OpenSSL does not have an out of source
> build option, and as such would “pollute” the source area.
>
>
>
> I was looking at it more in details. If I build
>
> “Scons _build/build_debug_posix-x86_64/openssl/Makefile”
>
>
>
> Everything is fine SCons says everything is up to date the next round. If
> I build “_makeinstall/openssl/bin/c_rehash” which is defined in the
> second Command() the next pass has this problem. It seems for some reason
> once the generated building.h file is generated something is adding it as a
> depends. I am not sure at the moment if this is seen as implicit or
> explicated by the system. I am assuming it is implicate and being added by
> a scanner. However I have not found what added it as of yet. I don’t think
> it is anything in Parts. I did notice that if I remove the copyed->[] after
> everything is built remove the scons db file everything is fine. I think it
> has to do with my coping object as the source and they are getting scanned
> by the c-scanner but I am unclear how this would be adding it as a depends
> to the target. It has been a while since I have been in this code. I think
> SCons does not make a tree like:
>
>
>
> Foo.exe
>
> + foo.obj
>
> + foo.c
>
> +foo.h
>
>
>
> But makes a
>
>
>
> Foo.exe
>
> + foo.obj
>
> + foo.c
>
> + foo.h
>
>
>
> My theory is the since SCons does the last case. Scons might be adding
> “generated” file of the openssl make build via the scanner at the wrong
> level. Since Scons would add the .h file not as a depends of the .c but to
> the target that depends on the .c file.
>
>
>
> I think I need to do a test run with the C-scanner disabled to verify this
>
>
>
> Jason
>
>
>
> *From:* Scons-users <scons-users-***@scons.org> *On Behalf Of *Bill
> Deegan
> *Sent:* Friday, May 4, 2018 3:23 PM
> *To:* SCons users mailing list <scons-***@scons.org>
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> What's VCS_DIR and BUILD_DIR ?
>
>
>
> On Fri, May 4, 2018 at 1:18 PM, Jason Kenny <***@live.com> wrote:
>
> to simplify the log file the tree looks like this:
>
> +-build::alias::openssl
>
> +-build::alias::openssl::SDKBIN
>
> | +-_sdks/debug_posix-x86_64_default/openssl_1.1.0_
> 51bed083228027f76730230d116bace9/bin/c_rehash
>
> | | +-_build/build_debug_posix-x86_64/openssl/_set_RPATH_/c_rehash
>
> | | +-_makeinstall/openssl/bin/c_rehash
>
> | | +-_build/build_debug_posix-x86_64/openssl/Makefile
>
> | | +-_build/build_debug_posix-x86_64/openssl/crypto/ripemd/build.info
> <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>
>
> | | | +-_vcs/openssl/crypto/ripemd/build.info
> <https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>
>
> ....
>
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_win.c]
>
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/arm_arch.h]
>
> | | +-_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h
>
> | | | +-[_build/build_debug_posix-x86_64/openssl/Makefile]
>
> | | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_nyi.c]
>
>
>
> I am not sure why _makeinstall/openssl/bin/c_rehash ->
> _build/build_debug_posix-x86_64/openssl/Makefile ->
> _build/build_debug_posix-x86_64/openssl/crypto/buildinf.h ->
> _build/build_debug_posix-x86_64/openssl/Makefile
>
> I would think c_rehash should depend on the Makefile. I would not think
> Scons would "know" anything about buildinf.h
>
> - Jason
> ------------------------------
>
> *From:* Jason Kenny <***@live.com>
> *Sent:* Friday, May 4, 2018 11:26 AM
>
>
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> *copyed* was me coping data to the variant directory to allow cross build
> to work better
>
> log file is here https://bitbucket.org/snippets/dragon512/KeGax5
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fsnippets%2Fdragon512%2FKeGax5&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=%2Fn83xUdN3J5rmYczw5ss%2F9zcjkQnka5BC1nqEw8eLtk%3D&reserved=0>
>
>
> Below is the Parts file I have been hacking on ( I hope to clean it up
> more...) It is based on work I have yet to publish in Parts in my branch.
>
>
> -----
> Import('*')
> PartVersion("1.1.0")
> files = Pattern(src_dir="${VCS_DIR}", excludes=[".git/*"])
>
> copyed = env.CCopy(
> source=files,
> target="$BUILD_DIR",
> copy_logic=CCopy.copy # could hard links be an issue????
> )
> out = env.Command(
> ["Makefile"],
> copyed,
> "cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH
> enable-ec_nistp_64_gcc_128\
> --prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
> --openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64
> shared\
> "
> )
>
> # env.Ignore("_build/build_debug_posix-x86_64/openssl/
> crypto/buildinf.h","${VCS_DIR}/crypto/buildinf.h")
> env.Ignore(out, ["crypto/buildinf.h"])
>
>
>
> out = env.Command(
> [
> env.File("crypto/buildinf.h"),
> "#_makeinstall/${PART_NAME}/bin/c_rehash",
> "#_makeinstall/${PART_NAME}/bin/openssl",
> "#_makeinstall/${PART_NAME}/include/openssl/aes.h",
> "#_makeinstall/${PART_NAME}/include/openssl/camellia.h",
> "#_makeinstall/${PART_NAME}/include/openssl/des.h",
> "#_makeinstall/${PART_NAME}/include/openssl/e_os2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md5.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pem2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/stack.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509_vfy.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cast.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dh.h",
> "#_makeinstall/${PART_NAME}/include/openssl/err.h",
> "#_makeinstall/${PART_NAME}/include/openssl/mdc2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pem.h",
> "#_makeinstall/${PART_NAME}/include/openssl/safestack.h",
> "#_makeinstall/${PART_NAME}/include/openssl/symhacks.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1_mac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cmac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/evp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/modes.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pkcs12.h",
> "#_makeinstall/${PART_NAME}/include/openssl/seed.h",
> "#_makeinstall/${PART_NAME}/include/openssl/tls1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/asn1t.h",
> "#_makeinstall/${PART_NAME}/include/openssl/cms.h",
> "#_makeinstall/${PART_NAME}/include/openssl/dtls1.h",
> "#_makeinstall/${PART_NAME}/include/openssl/hmac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/objects.h",
> "#_makeinstall/${PART_NAME}/include/openssl/pkcs7.h",
> "#_makeinstall/${PART_NAME}/include/openssl/sha.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ts.h",
> "#_makeinstall/${PART_NAME}/include/openssl/async.h",
> "#_makeinstall/${PART_NAME}/include/openssl/comp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ebcdic.h",
> "#_makeinstall/${PART_NAME}/include/openssl/idea.h",
> "#_makeinstall/${PART_NAME}/include/openssl/obj_mac.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rand.h",
> "#_makeinstall/${PART_NAME}/include/openssl/srp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/txt_db.h",
> "#_makeinstall/${PART_NAME}/include/openssl/bio.h",
> "#_makeinstall/${PART_NAME}/include/openssl/conf_api.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ecdh.h",
> "#_makeinstall/${PART_NAME}/include/openssl/kdf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ocsp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/srtp.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ui.h",
> "#_makeinstall/${PART_NAME}/include/openssl/blowfish.h",
> "#_makeinstall/${PART_NAME}/include/openssl/conf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ecdsa.h",
> "#_makeinstall/${PART_NAME}/include/openssl/lhash.h",
> "#_makeinstall/${PART_NAME}/include/openssl/opensslconf.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc4.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/whrlpool.h",
> "#_makeinstall/${PART_NAME}/include/openssl/bn.h",
> "#_makeinstall/${PART_NAME}/include/openssl/crypto.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ec.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md2.h",
> "#_makeinstall/${PART_NAME}/include/openssl/opensslv.h",
> "#_makeinstall/${PART_NAME}/include/openssl/rc5.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl3.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509.h",
> "#_makeinstall/${PART_NAME}/include/openssl/buffer.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ct.h",
> "#_makeinstall/${PART_NAME}/include/openssl/engine.h",
> "#_makeinstall/${PART_NAME}/include/openssl/md4.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ossl_typ.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ripemd.h",
> "#_makeinstall/${PART_NAME}/include/openssl/ssl.h",
> "#_makeinstall/${PART_NAME}/include/openssl/x509v3.h",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/afalg.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.a",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/capi.so",
> "#_makeinstall/${PART_NAME}/lib/engines-1.1/padlock.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.so",
> "#_makeinstall/${PART_NAME}/lib/libssl.so.1.1",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.a",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/libcrypto.pc",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/libssl.pc",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.so",
> "#_makeinstall/${PART_NAME}/lib/libcrypto.so.1.1",
> "#_makeinstall/${PART_NAME}/lib/pkgconfig/openssl.pc",
> ],
> ["Makefile"],
> [
> "cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}}
> $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
> "cd ${SOURCE.dir} ; make install"
> ]
> )
>
> env.InstallBin(
> env.Glob("#_makeinstall/${PART_NAME}/bin/*")
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/*.a"),
> auto_add_libs=False)
> env.InstallLib(
> env.Glob("#_makeinstall/${PART_NAME}/lib/*.so*")
>
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/libengines-1.1/*.so"),
> auto_add_libs=False, sub_dir="libengines-1.1")
> env.InstallInclude( # bug we need to fix -JK
> env.SdkInclude(
> env.Glob("#_makeinstall/${PART_NAME}/include/openssl/*"),
> sub_dir="openssl",
> add_to_path=False
> ),
> sub_dir="openssl"
> )
> env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/pkgconfig/*.pc"),
> auto_add_libs=False, sub_dir="pkgconfig", add_to_path=False)
>
> ------------------------------
>
> *From:* Scons-users <scons-users-***@scons.org> on behalf of Bill
> Deegan <***@baddogconsulting.com>
> *Sent:* Friday, May 4, 2018 10:40 AM
> *To:* SCons users mailing list
> *Subject:* Re: [Scons-users] Having issue with scanner in Command()
>
>
>
> Jason,
>
>
>
> I"m not aware of a Makefile scanner.
>
>
>
> What's in variable 'copyed'?
>
>
>
> Can you paste output of --tree=prune?
>
> -Bill
>
>
>
> On Fri, May 4, 2018 at 10:31 AM, Jason Kenny <***@live.com> wrote:
>
> Hi,
>
> I am setting up a build with SCons that has to build openssl. I am using
> the Command() logic to call the native build system. I am having an issue
> with this code wanting to rebuild because of a file "crypto/buildinf.h" is
> rebuilt as part of the process with a new date value/ This causes SCons to
> say stuff needs to be rebuilt. The issue here is an odd circular reference
> that is forming up and I am unclear on what is adding it at this time. I am
> hoping before I dig to deep into this that some one might know, or have
> some idea on what is happening. Details
>
> I have a two commands:
>
>
> out = env.Command(
>
> ["Makefile"],
>
> copyed,
>
> "cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH
> enable-ec_nistp_64_gcc_128\
>
> --prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
>
> --openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64
> shared\
>
> "
>
> )
>
>
> Then I have a command
>
> env.Ignore(out, ["crypto/buildinf.h"])
>
>
>
> env.Command(
> [
>
> env.File("crypto/buildinf.h"),
>
> "#_makeinstall/${PART_NAME}/bin/c_rehash",
>
> ...
>
> ],
>
> ["Makefile"],
>
> [
>
> "cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}}
> $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
>
> "cd ${SOURCE.dir} ; make install"
>
> ] )
>
>
>
> What is happening is that after the first run Scons will tell me it needs
> to rebuild because:
>
> scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile'
> because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h'
> changed
>
> I have an Ignore line that should remove this... What is odd for me is
> that the next build command is run because:
>
> scons: rebuilding `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h'
> because `_build/build_debug_posix-x86_64/openssl/Makefile' changed
>
>
> I seem to have a cycle of some kind. I am unclear on how to break it.
>
>
> I am unclear on what scanner is adding this depends in Command. Do we have
> a generic Makefile scanner??
> Any thoughts??
>
> Jason
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Ccae88553915f47d8c91a08d5b1d5712f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610452634906164&sdata=LJ6F2%2BiZCnp1WZOIAfNDmAs4%2F3h3JJNnFtz0GnVCX4g%3D&reserved=0>
>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=6C3axeb9ZEUCd0ra2hdKQ8%2BP5Nr1WGdNl0wPQPgBAwI%3D&reserved=0>
>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C3d6fa86b3b704e0d3b0408d5b9bcdf81%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619143209334764&sdata=9XQji%2F6OPpBOB%2Fvk5%2F0KXcpUbuBudRz2trdZxTUM9Ac%3D&reserved=0>
>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C33e4200f953040bb564808d5b9dc4412%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619278038242537&sdata=cAn5DaMnoBZvmGhNiLcguy9XCeAx%2BQ1e4lDK6XvLBEI%3D&reserved=0>
>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C1f6950fa0ebf4e01541908d5b9e0b9f4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619297199382690&sdata=%2FuOwUBmbGeFcRLv2%2B53VCBnRVFMVlJ8zVxUOLSmbNVo%3D&reserved=0>
>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C8d76ed5233fd4f2951bd08d5ba00d2b7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619435053455498&sdata=5u%2B7TYAKrx4qjdKd9I%2BR9w3%2Bpa4pKCGwcnmVbCODhr0%3D&reserved=0>
>
>
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
Jason Kenny
2018-05-15 02:17:42 UTC
Permalink
I am running Scons that was installed with pip
 v3.0.1.74b2c53bc42290e911b334a6b44f187da698a668

>>Did you try checking the md5's of some of the "changed files" against the actual files?

If I understand correctly.. the file in _build/build_debug_posix-x86_64/openssl/crypto/buildinf.h did change. The openssl build system seems to call a buildinf.pl file that generates the buildinf.h file with an updated string that looks like a date-timestamp of the build. This was why I was wanting to Ignore this file or add it as a Requires(), either way Scons seems to want to rebuild because this fail changes every build.

From what I can see Scons is running the command to make the makefile

env.Command(
["Makefile"],
copied,
"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\
--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\
"
)

Then it run the command to do the build ie (reduced as the target list is long)

env.Command(
[
"#_makeinstall/${PART_NAME}/bin/c_rehash",


],
["Makefile"],
[
"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
"cd ${SOURCE.dir} ; make install"
]
)

This command run and updates buildinf.h. it then stores the information.

Running sconsign tool and I see two entries for buildinf.h MD5 value looks like same:


_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h: 816483dd4f92108eee77fd0c8d74d5a9 1526350199 2680


buildinf.h: 816483dd4f92108eee77fd0c8d74d5a9 1526350199 2680

Jason

From: Scons-users <scons-users-***@scons.org> On Behalf Of Bill Deegan
Sent: Monday, May 14, 2018 8:45 PM
To: SCons users mailing list <scons-***@scons.org>
Subject: Re: [Scons-users] Having issue with scanner in Command()

Did you try checking the md5's of some of the "changed files" against the actual files?
Are you running from the master branch?

On Mon, May 14, 2018 at 9:16 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
No

'MD5-timestamp'

Jason


From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> On Behalf Of Bill Deegan
Sent: Monday, May 14, 2018 8:12 PM

To: SCons users mailing list <scons-***@scons.org<mailto:scons-***@scons.org>>
Subject: Re: [Scons-users] Having issue with scanner in Command()

Which decider are you using?
Timestamp-MD5?

On Mon, May 14, 2018 at 7:56 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
So I applied the patch to Node/__init__.py

The crash from running sconsign went away. So that is good


But the code still wants to rebuild.

Sconsign tells me the
Makefile: c469c39ede869a94e73f19970ca955b2 1526338830 498415


_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h: ee0ce32ceb3b0fb0a23540d9b091dbac 1526338422 2680



After a different run I see building.h change to

_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h: abc69bce6ce9b90148cdd62dc5b4ea47 1526339184 2680

Which repeats ( ie MD% changes) with every run.

Is there something else that might need to be patched?


Just in case it helps. On the second run of the build, --debug=explain tells me:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile' because:
`_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' is a new dependency
`_build/build_debug_posix-x86_64/openssl/apps/progs.h' is a new dependency

The third run tells me:
scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile' because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' changed

I clearly have a:
env.Ignore(['_build/build_debug_posix-x86_64/openssl/Makefile'], ["_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h"])

anyways .. looks like there is something else

-Jason

From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> On Behalf Of Bill Deegan
Sent: Monday, May 14, 2018 4:22 PM

To: SCons users mailing list <scons-***@scons.org<mailto:scons-***@scons.org>>
Subject: Re: [Scons-users] Having issue with scanner in Command()

Yup..

Something like this.. (patch below won't apply.. just edit the file..)

+++ b/src/engine/SCons/Node/__init__.py
@@ -1149,7 +1149,9 @@ class Node(object, with_metaclass(NoSlotsPyPy)):
binfo.bdepends = self.depends
binfo.bdependsigs = [d.get_ninfo() for d in self.depends if d not in ignore_set]

+ # TODO: If anything matches the ignore_set: bimplicit and bimplicitsigs will have different lengths and potentially the items in each list
will not represent the same file. (any item but the last one matches any item in ignore_set)
binfo.bimplicit = self.implicit or []
+ binfo.bimplicit = [i for i in binfo.bimplicit if i not in ignore_set]
binfo.bimplicitsigs = [i.get_ninfo() for i in binfo.bimplicit if i not in ignore_set]


On Mon, May 14, 2018 at 5:00 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
No.. did not know about this utility.

I ran it the first round and it dumps a ton of info..
I ran scons again, then ran the utility again and it dumps this...

LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589 6128
_vcs/openssl/LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589 6128
55b40265a26683fbced32365cba594b5 [<lambda>(target, source, env)]
Makefile: 1d7b4a1b320ff883d02f50dbf26cbfb4 1526331304 498401
Traceback (most recent call last):
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 547, in <module>
Do_SConsignDB(Map_Module.get(dbm_name, dbm_name), dbm)(a)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 427, in __call__
self.printentries(dir, db[dir])
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 431, in printentries
printentries(pickle.loads(val), dir)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 370, in printentries
printfield(name, entry.binfo)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 334, in printfield
outlist = field("implicit", entry, 0)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 297, in field
val = mapper(entry, name)
File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 277, in map_bkids
result.append(nodeinfo_string(bkids[i], bkidsigs[i], " "))
IndexError: list index out of range


Does this look like the issue you had mentioned?

Jason

________________________________
From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> on behalf of Bill Deegan <***@baddogconsulting.com<mailto:***@baddogconsulting.com>>
Sent: Monday, May 14, 2018 3:49 PM

To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()

Did you try running sconsign on your .sconsign file?

On Mon, May 14, 2018 at 2:05 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
will be happy to try it out
-Jason
________________________________
From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> on behalf of Bill Deegan <***@baddogconsulting.com<mailto:***@baddogconsulting.com>>
Sent: Monday, May 14, 2018 12:05 PM
To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()

Jason,

I believe I have a patch for the rebuilds.
I found a simliar issue working on another problem.

If sconsign crashes reading the .sconsign then you likely have the same issue.
Give it a try and let me know.
I'm away from computer for a bit, but I'll send you the patch to try.
Basically the sconsign ends up with mismatched md5's for file names but only when ignore is being used because the names aren't filtered, but the md5's are.

-Bill


On Mon, May 14, 2018 at 12:44 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:
Hi Bill
I was out traveling last week, however, I made some progress on this.
If I disable the scanner ( changed the code to always return [] ) The build worked fine. So the issue is the scanner and how it adds depends to a target. I am unclear on why Ignore() is not working as expected. Scons wants to keep rebuilding because buildinf.h changed. If I don't have the Ignore() I get an error from the taskmaster on the second run with a circular depends. I would expect the only Ignore call would prevent rebuilds
As a workaround, I change the code from using the Parts Pattern object. which is basically a recursive Glob() at this point, to just copy the openssl source directory to the variant directory. This work as the c scanner is global on any C file being defined. By making this a directory the copy logic does not define any C file nodes. Since the C files are not defined as nodes they are not seen by the scanner to be scanned and added as a depends to the target of the Command() that generated the Makefile.
Is there an official way to turn off the scanner for a given command?? Or is this more of a bug with the Ignore() logic as Scons does not seem to "fully" ignore the depends added by the scanner.
either way, I have a workaround. However, it seems this is could be an unexpected catch 22 for people that have to call a "third party" build system to get a full build to work.
-Jason

________________________________
From: Jason Kenny
Sent: Friday, May 4, 2018 7:29 PM
To: SCons users mailing list
Subject: RE: [Scons-users] Having issue with scanner in Command()


In Parts the VCS_DIR is where the code is checked out too. The BUILD_DIR is basically the SCons Variant directory for the given “Part”/component. I was copying data to this place as OpenSSL does not have an out of source build option, and as such would “pollute” the source area.



I was looking at it more in details. If I build

“Scons _build/build_debug_posix-x86_64/openssl/Makefile”



Everything is fine SCons says everything is up to date the next round. If I build “_makeinstall/openssl/bin/c_rehash” which is defined in the second Command() the next pass has this problem. It seems for some reason once the generated building.h file is generated something is adding it as a depends. I am not sure at the moment if this is seen as implicit or explicated by the system. I am assuming it is implicate and being added by a scanner. However I have not found what added it as of yet. I don’t think it is anything in Parts. I did notice that if I remove the copyed->[] after everything is built remove the scons db file everything is fine. I think it has to do with my coping object as the source and they are getting scanned by the c-scanner but I am unclear how this would be adding it as a depends to the target. It has been a while since I have been in this code. I think SCons does not make a tree like:



Foo.exe

+ foo.obj

+ foo.c

+foo.h



But makes a



Foo.exe

+ foo.obj

+ foo.c

+ foo.h



My theory is the since SCons does the last case. Scons might be adding “generated” file of the openssl make build via the scanner at the wrong level. Since Scons would add the .h file not as a depends of the .c but to the target that depends on the .c file.



I think I need to do a test run with the C-scanner disabled to verify this



Jason



From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> On Behalf Of Bill Deegan
Sent: Friday, May 4, 2018 3:23 PM
To: SCons users mailing list <scons-***@scons.org<mailto:scons-***@scons.org>>
Subject: Re: [Scons-users] Having issue with scanner in Command()



What's VCS_DIR and BUILD_DIR ?



On Fri, May 4, 2018 at 1:18 PM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:

to simplify the log file the tree looks like this:

+-build::alias::openssl

+-build::alias::openssl::SDKBIN

| +-_sdks/debug_posix-x86_64_default/openssl_1.1.0_51bed083228027f76730230d116bace9/bin/c_rehash

| | +-_build/build_debug_posix-x86_64/openssl/_set_RPATH_/c_rehash

| | +-_makeinstall/openssl/bin/c_rehash

| | +-_build/build_debug_posix-x86_64/openssl/Makefile

| | +-_build/build_debug_posix-x86_64/openssl/crypto/ripemd/build.info<https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>

| | | +-_vcs/openssl/crypto/ripemd/build.info<https://nam01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fbuild.info&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=1LliS9gWIMdwRhA93U2fKW7HYbJLqp19YyohEjAcZGk%3D&reserved=0>

....

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_win.c]

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/arm_arch.h]

| | +-_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h

| | | +-[_build/build_debug_posix-x86_64/openssl/Makefile]

| | +-[_build/build_debug_posix-x86_64/openssl/crypto/LPdir_nyi.c]


I am not sure why _makeinstall/openssl/bin/c_rehash -> _build/build_debug_posix-x86_64/openssl/Makefile ->_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h -> _build/build_debug_posix-x86_64/openssl/Makefile

I would think c_rehash should depend on the Makefile. I would not think Scons would "know" anything about buildinf.h

- Jason

________________________________

From: Jason Kenny <***@live.com<mailto:***@live.com>>
Sent: Friday, May 4, 2018 11:26 AM

To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()



copyed was me coping data to the variant directory to allow cross build to work better

log file is here https://bitbucket.org/snippets/dragon512/KeGax5<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbitbucket.org%2Fsnippets%2Fdragon512%2FKeGax5&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=%2Fn83xUdN3J5rmYczw5ss%2F9zcjkQnka5BC1nqEw8eLtk%3D&reserved=0>


Below is the Parts file I have been hacking on ( I hope to clean it up more...) It is based on work I have yet to publish in Parts in my branch.


-----
Import('*')
PartVersion("1.1.0")
files = Pattern(src_dir="${VCS_DIR}", excludes=[".git/*"])

copyed = env.CCopy(
source=files,
target="$BUILD_DIR",
copy_logic=CCopy.copy # could hard links be an issue????
)
out = env.Command(
["Makefile"],
copyed,
"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\
--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\
"
)

# env.Ignore("_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h","${VCS_DIR}/crypto/buildinf.h")
env.Ignore(out, ["crypto/buildinf.h"])



out = env.Command(
[
env.File("crypto/buildinf.h"),
"#_makeinstall/${PART_NAME}/bin/c_rehash",
"#_makeinstall/${PART_NAME}/bin/openssl",
"#_makeinstall/${PART_NAME}/include/openssl/aes.h",
"#_makeinstall/${PART_NAME}/include/openssl/camellia.h",
"#_makeinstall/${PART_NAME}/include/openssl/des.h",
"#_makeinstall/${PART_NAME}/include/openssl/e_os2.h",
"#_makeinstall/${PART_NAME}/include/openssl/md5.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem2.h",
"#_makeinstall/${PART_NAME}/include/openssl/rsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/stack.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509_vfy.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1.h",
"#_makeinstall/${PART_NAME}/include/openssl/cast.h",
"#_makeinstall/${PART_NAME}/include/openssl/dh.h",
"#_makeinstall/${PART_NAME}/include/openssl/err.h",
"#_makeinstall/${PART_NAME}/include/openssl/mdc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/pem.h",
"#_makeinstall/${PART_NAME}/include/openssl/safestack.h",
"#_makeinstall/${PART_NAME}/include/openssl/symhacks.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/cmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/dsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/evp.h",
"#_makeinstall/${PART_NAME}/include/openssl/modes.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs12.h",
"#_makeinstall/${PART_NAME}/include/openssl/seed.h",
"#_makeinstall/${PART_NAME}/include/openssl/tls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/asn1t.h",
"#_makeinstall/${PART_NAME}/include/openssl/cms.h",
"#_makeinstall/${PART_NAME}/include/openssl/dtls1.h",
"#_makeinstall/${PART_NAME}/include/openssl/hmac.h",
"#_makeinstall/${PART_NAME}/include/openssl/objects.h",
"#_makeinstall/${PART_NAME}/include/openssl/pkcs7.h",
"#_makeinstall/${PART_NAME}/include/openssl/sha.h",
"#_makeinstall/${PART_NAME}/include/openssl/ts.h",
"#_makeinstall/${PART_NAME}/include/openssl/async.h",
"#_makeinstall/${PART_NAME}/include/openssl/comp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ebcdic.h",
"#_makeinstall/${PART_NAME}/include/openssl/idea.h",
"#_makeinstall/${PART_NAME}/include/openssl/obj_mac.h",
"#_makeinstall/${PART_NAME}/include/openssl/rand.h",
"#_makeinstall/${PART_NAME}/include/openssl/srp.h",
"#_makeinstall/${PART_NAME}/include/openssl/txt_db.h",
"#_makeinstall/${PART_NAME}/include/openssl/bio.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf_api.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdh.h",
"#_makeinstall/${PART_NAME}/include/openssl/kdf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ocsp.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc2.h",
"#_makeinstall/${PART_NAME}/include/openssl/srtp.h",
"#_makeinstall/${PART_NAME}/include/openssl/ui.h",
"#_makeinstall/${PART_NAME}/include/openssl/blowfish.h",
"#_makeinstall/${PART_NAME}/include/openssl/conf.h",
"#_makeinstall/${PART_NAME}/include/openssl/ecdsa.h",
"#_makeinstall/${PART_NAME}/include/openssl/lhash.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslconf.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl2.h",
"#_makeinstall/${PART_NAME}/include/openssl/whrlpool.h",
"#_makeinstall/${PART_NAME}/include/openssl/bn.h",
"#_makeinstall/${PART_NAME}/include/openssl/crypto.h",
"#_makeinstall/${PART_NAME}/include/openssl/ec.h",
"#_makeinstall/${PART_NAME}/include/openssl/md2.h",
"#_makeinstall/${PART_NAME}/include/openssl/opensslv.h",
"#_makeinstall/${PART_NAME}/include/openssl/rc5.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl3.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509.h",
"#_makeinstall/${PART_NAME}/include/openssl/buffer.h",
"#_makeinstall/${PART_NAME}/include/openssl/ct.h",
"#_makeinstall/${PART_NAME}/include/openssl/engine.h",
"#_makeinstall/${PART_NAME}/include/openssl/md4.h",
"#_makeinstall/${PART_NAME}/include/openssl/ossl_typ.h",
"#_makeinstall/${PART_NAME}/include/openssl/ripemd.h",
"#_makeinstall/${PART_NAME}/include/openssl/ssl.h",
"#_makeinstall/${PART_NAME}/include/openssl/x509v3.h",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/afalg.so",
"#_makeinstall/${PART_NAME}/lib/libssl.a",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/capi.so",
"#_makeinstall/${PART_NAME}/lib/engines-1.1/padlock.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so",
"#_makeinstall/${PART_NAME}/lib/libssl.so.1.1",
"#_makeinstall/${PART_NAME}/lib/libcrypto.a",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libcrypto.pc",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/libssl.pc",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so",
"#_makeinstall/${PART_NAME}/lib/libcrypto.so.1.1",
"#_makeinstall/${PART_NAME}/lib/pkgconfig/openssl.pc",
],
["Makefile"],
[
"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),
"cd ${SOURCE.dir} ; make install"
]
)

env.InstallBin(
env.Glob("#_makeinstall/${PART_NAME}/bin/*")
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/*.a"), auto_add_libs=False)
env.InstallLib(
env.Glob("#_makeinstall/${PART_NAME}/lib/*.so*")

)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/libengines-1.1/*.so"), auto_add_libs=False, sub_dir="libengines-1.1")
env.InstallInclude( # bug we need to fix -JK
env.SdkInclude(
env.Glob("#_makeinstall/${PART_NAME}/include/openssl/*"),
sub_dir="openssl",
add_to_path=False
),
sub_dir="openssl"
)
env.InstallLib(env.Glob("#_makeinstall/${PART_NAME}/lib/pkgconfig/*.pc"), auto_add_libs=False, sub_dir="pkgconfig", add_to_path=False)


________________________________

From: Scons-users <scons-users-***@scons.org<mailto:scons-users-***@scons.org>> on behalf of Bill Deegan <***@baddogconsulting.com<mailto:***@baddogconsulting.com>>
Sent: Friday, May 4, 2018 10:40 AM
To: SCons users mailing list
Subject: Re: [Scons-users] Having issue with scanner in Command()



Jason,



I"m not aware of a Makefile scanner.



What's in variable 'copyed'?



Can you paste output of --tree=prune?

-Bill



On Fri, May 4, 2018 at 10:31 AM, Jason Kenny <***@live.com<mailto:***@live.com>> wrote:

Hi,

I am setting up a build with SCons that has to build openssl. I am using the Command() logic to call the native build system. I am having an issue with this code wanting to rebuild because of a file "crypto/buildinf.h" is rebuilt as part of the process with a new date value/ This causes SCons to say stuff needs to be rebuilt. The issue here is an odd circular reference that is forming up and I am unclear on what is adding it at this time. I am hoping before I dig to deep into this that some one might know, or have some idea on what is happening. Details

I have a two commands:

out = env.Command(

["Makefile"],

copyed,

"cd ${TARGET.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\

--prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\

--openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared\

"

)

Then I have a command

env.Ignore(out, ["crypto/buildinf.h"])



env.Command(
[

env.File("crypto/buildinf.h"),

"#_makeinstall/${PART_NAME}/bin/c_rehash",

...

],

["Makefile"],

[

"cd ${{SOURCE.dir}} ; make all CC=${{CC}} CXX=${{CXX}} $(-j{jobs}$)".format(jobs=env.GetOption('num_jobs')),

"cd ${SOURCE.dir} ; make install"

] )



What is happening is that after the first run Scons will tell me it needs to rebuild because:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/Makefile' because `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' changed

I have an Ignore line that should remove this... What is odd for me is that the next build command is run because:

scons: rebuilding `_build/build_debug_posix-x86_64/openssl/crypto/buildinf.h' because `_build/build_debug_posix-x86_64/openssl/Makefile' changed

I seem to have a cycle of some kind. I am unclear on how to break it.

I am unclear on what scanner is adding this depends in Command. Do we have a generic Makefile scanner??
Any thoughts??

Jason

_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Ccae88553915f47d8c91a08d5b1d5712f%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610452634906164&sdata=LJ6F2%2BiZCnp1WZOIAfNDmAs4%2F3h3JJNnFtz0GnVCX4g%3D&reserved=0>



_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Cc105254391724c91923b08d5b1fcdf80%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636610621989426130&sdata=6C3axeb9ZEUCd0ra2hdKQ8%2BP5Nr1WGdNl0wPQPgBAwI%3D&reserved=0>



_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C3d6fa86b3b704e0d3b0408d5b9bcdf81%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619143209334764&sdata=9XQji%2F6OPpBOB%2Fvk5%2F0KXcpUbuBudRz2trdZxTUM9Ac%3D&reserved=0>


_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://nam01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C33e4200f953040bb564808d5b9dc4412%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619278038242537&sdata=cAn5DaMnoBZvmGhNiLcguy9XCeAx%2BQ1e4lDK6XvLBEI%3D&reserved=0>


_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C1f6950fa0ebf4e01541908d5b9e0b9f4%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619297199382690&sdata=%2FuOwUBmbGeFcRLv2%2B53VCBnRVFMVlJ8zVxUOLSmbNVo%3D&reserved=0>


_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7C8d76ed5233fd4f2951bd08d5ba00d2b7%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619435053455498&sdata=5u%2B7TYAKrx4qjdKd9I%2BR9w3%2Bpa4pKCGwcnmVbCODhr0%3D&reserved=0>


_______________________________________________
Scons-users mailing list
Scons-***@scons.org<mailto:Scons-***@scons.org>
https://pairlist4.pair.net/mailman/listinfo/scons-users<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpairlist4.pair.net%2Fmailman%2Flistinfo%2Fscons-users&data=02%7C01%7C%7Cef2d90046e9c40aab7e508d5ba0574ce%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C636619454957756866&sdata=0Ben0aGPYazD3ShDyljIcPe0PRhj3kyIpglo7FaVwyA%3D&reserved=0>
Mats Wichmann
2018-05-15 12:58:47 UTC
Permalink
On 05/14/2018 03:21 PM, Bill Deegan wrote:
> Yup..
>
> Something like this.. (patch below won't apply.. just edit the file..)
>
> +++ b/src/engine/SCons/Node/__init__.py
> @@ -1149,7 +1149,9 @@ class Node(object, with_metaclass(NoSlotsPyPy)):
> binfo.bdepends = self.depends
> binfo.bdependsigs = [d.get_ninfo() for d in self.depends if d not
> in ignore_set]
>
> + # TODO: If anything matches the ignore_set: bimplicit and
> bimplicitsigs will have different lengths and potentially the items in each
> list
> will not represent the same file. (any item but the last one matches any
> item in ignore_set)
> binfo.bimplicit = self.implicit or []
> + binfo.bimplicit = [i for i in binfo.bimplicit if i not in
> ignore_set]
> binfo.bimplicitsigs = [i.get_ninfo() for i in binfo.bimplicit if i
> not in ignore_set]
>
>
> On Mon, May 14, 2018 at 5:00 PM, Jason Kenny <***@live.com> wrote:
>
>> No.. did not know about this utility.
>>
>> I ran it the first round and it dumps a ton of info..
>> I ran scons again, then ran the utility again and it dumps this...
>>
>> LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589 6128
>> _vcs/openssl/LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589
>> 6128
>> 55b40265a26683fbced32365cba594b5 [<lambda>(target, source, env)]
>> Makefile: 1d7b4a1b320ff883d02f50dbf26cbfb4 1526331304 498401
>> Traceback (most recent call last):
>> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 547, in
>> <module>
>> Do_SConsignDB(Map_Module.get(dbm_name, dbm_name), dbm)(a)
>> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 427, in
>> __call__
>> self.printentries(dir, db[dir])
>> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 431, in
>> printentries
>> printentries(pickle.loads(val), dir)
>> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 370, in
>> printentries
>> printfield(name, entry.binfo)
>> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 334, in
>> printfield
>> outlist = field("implicit", entry, 0)
>> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 297, in field
>> val = mapper(entry, name)
>> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 277, in
>> map_bkids
>> result.append(nodeinfo_string(bkids[i], bkidsigs[i], " "))
>> IndexError: list index out of range
>>
>>
>> Does this look like the issue you had mentioned?
>>
>> Jason
>>

Just for grins I ran sconsign here and it dumps with the same type of error:
...
File "/usr/bin/sconsign", line 277, in map_bkids
result.append(nodeinfo_string(bkids[i], bkidsigs[i], " "))
IndexError: list index out of range
Bill Deegan
2018-05-15 17:43:48 UTC
Permalink
Yup. If you have any Ignore()'s then this is likely to happen without the
patch.
It's a work in progress as I'm trying tor resolve some tests which fail
when run on windows and also when run with the changed in the Pull request
for 2980.


On Tue, May 15, 2018 at 8:58 AM, Mats Wichmann <***@wichmann.us> wrote:

> On 05/14/2018 03:21 PM, Bill Deegan wrote:
> > Yup..
> >
> > Something like this.. (patch below won't apply.. just edit the file..)
> >
> > +++ b/src/engine/SCons/Node/__init__.py
> > @@ -1149,7 +1149,9 @@ class Node(object, with_metaclass(NoSlotsPyPy)):
> > binfo.bdepends = self.depends
> > binfo.bdependsigs = [d.get_ninfo() for d in self.depends if d
> not
> > in ignore_set]
> >
> > + # TODO: If anything matches the ignore_set: bimplicit and
> > bimplicitsigs will have different lengths and potentially the items in
> each
> > list
> > will not represent the same file. (any item but the last one matches any
> > item in ignore_set)
> > binfo.bimplicit = self.implicit or []
> > + binfo.bimplicit = [i for i in binfo.bimplicit if i not in
> > ignore_set]
> > binfo.bimplicitsigs = [i.get_ninfo() for i in binfo.bimplicit
> if i
> > not in ignore_set]
> >
> >
> > On Mon, May 14, 2018 at 5:00 PM, Jason Kenny <***@live.com> wrote:
> >
> >> No.. did not know about this utility.
> >>
> >> I ran it the first round and it dumps a ton of info..
> >> I ran scons again, then ran the utility again and it dumps this...
> >>
> >> LICENSE: cae6da10f4ffd9703214776d2aabce32 1525462589 6128
> >> _vcs/openssl/LICENSE: cae6da10f4ffd9703214776d2aabce32
> 1525462589
> >> 6128
> >> 55b40265a26683fbced32365cba594b5 [<lambda>(target, source,
> env)]
> >> Makefile: 1d7b4a1b320ff883d02f50dbf26cbfb4 1526331304 498401
> >> Traceback (most recent call last):
> >> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 547, in
> >> <module>
> >> Do_SConsignDB(Map_Module.get(dbm_name, dbm_name), dbm)(a)
> >> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 427, in
> >> __call__
> >> self.printentries(dir, db[dir])
> >> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 431, in
> >> printentries
> >> printentries(pickle.loads(val), dir)
> >> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 370, in
> >> printentries
> >> printfield(name, entry.binfo)
> >> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 334, in
> >> printfield
> >> outlist = field("implicit", entry, 0)
> >> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 297, in
> field
> >> val = mapper(entry, name)
> >> File "/home/jkenny/code/dev/buildenv/bin/sconsign", line 277, in
> >> map_bkids
> >> result.append(nodeinfo_string(bkids[i], bkidsigs[i], " "))
> >> IndexError: list index out of range
> >>
> >>
> >> Does this look like the issue you had mentioned?
> >>
> >> Jason
> >>
>
> Just for grins I ran sconsign here and it dumps with the same type of
> error:
> ...
> File "/usr/bin/sconsign", line 277, in map_bkids
> result.append(nodeinfo_string(bkids[i], bkidsigs[i], " "))
> IndexError: list index out of range
>
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
Mats Wichmann
2018-05-15 18:01:02 UTC
Permalink
On 05/15/2018 11:43 AM, Bill Deegan wrote:
> Yup. If you have any Ignore()'s then this is likely to happen without the
> patch.
> It's a work in progress as I'm trying tor resolve some tests which fail
> when run on windows and also when run with the changed in the Pull request
> for 2980.

I didn't realize we had any, but grepping shows we do - even if I'm not
sure what the purpose is. Do these even make any sense at all?

# Copy test configuration
Command("examples/ResourceContainerConfig.xml",
"examples/ResourceContainerConfig.xml", Copy("$TARGET", "$SOURCE"))
Ignore("examples/ResourceContainerConfig.xml",
"examples/ResourceContainerConfig.xml")

... and

# Copy test configuration
Command("./ResourceContainerTestConfig.xml",
"./ResourceContainerTestConfig.xml", Copy("$TARGET", "$SOURCE"))
Ignore("./ResourceContainerTestConfig.xml",
"./ResourceContainerTestConfig.xml")
Command("./ResourceContainerInvalidConfig.xml",
"./ResourceContainerInvalidConfig.xml", Copy("$TARGET", "$SOURCE"))
Ignore("./ResourceContainerInvalidConfig.xml",
"./ResourceContainerInvalidConfig.xml")
Command("./TestBundleJava/hue-0.1-jar-with-dependencies.jar",
"./TestBundleJava/hue-0.1-jar-with-dependencies.jar",
Copy("$TARGET", "$SOURCE"))
Ignore("./TestBundleJava/hue-0.1-jar-with-dependencies.jar",
"./TestBundleJava/hue-0.1-jar-with-dependencies.jar")
Bill Deegan
2018-05-15 18:23:47 UTC
Permalink
Weird. So it's copying onto itself?

On Tue, May 15, 2018 at 2:01 PM, Mats Wichmann <***@wichmann.us> wrote:

> On 05/15/2018 11:43 AM, Bill Deegan wrote:
> > Yup. If you have any Ignore()'s then this is likely to happen without the
> > patch.
> > It's a work in progress as I'm trying tor resolve some tests which fail
> > when run on windows and also when run with the changed in the Pull
> request
> > for 2980.
>
> I didn't realize we had any, but grepping shows we do - even if I'm not
> sure what the purpose is. Do these even make any sense at all?
>
> # Copy test configuration
> Command("examples/ResourceContainerConfig.xml",
> "examples/ResourceContainerConfig.xml", Copy("$TARGET",
> "$SOURCE"))
> Ignore("examples/ResourceContainerConfig.xml",
> "examples/ResourceContainerConfig.xml")
>
> ... and
>
> # Copy test configuration
> Command("./ResourceContainerTestConfig.xml",
> "./ResourceContainerTestConfig.xml", Copy("$TARGET", "$SOURCE"))
> Ignore("./ResourceContainerTestConfig.xml",
> "./ResourceContainerTestConfig.xml")
> Command("./ResourceContainerInvalidConfig.xml",
> "./ResourceContainerInvalidConfig.xml", Copy("$TARGET",
> "$SOURCE"))
> Ignore("./ResourceContainerInvalidConfig.xml",
> "./ResourceContainerInvalidConfig.xml")
> Command("./TestBundleJava/hue-0.1-jar-with-dependencies.jar",
> "./TestBundleJava/hue-0.1-jar-with-dependencies.jar",
> Copy("$TARGET", "$SOURCE"))
> Ignore("./TestBundleJava/hue-0.1-jar-with-dependencies.jar",
> "./TestBundleJava/hue-0.1-jar-with-dependencies.jar")
> _______________________________________________
> Scons-users mailing list
> Scons-***@scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
Mats Wichmann
2018-05-15 19:59:51 UTC
Permalink
On 05/15/2018 12:23 PM, Bill Deegan wrote:
> Weird. So it's copying onto itself?

sure looking like it to me... copy to itself, then ignore the "changed
file" which would otherwise trigger a "rebuild". Hmmm.

I can't find a history to give me hints, some "git log -L" work shows
this logic was there on first commit of the script.

>
> On Tue, May 15, 2018 at 2:01 PM, Mats Wichmann <***@wichmann.us> wrote:
>
>> On 05/15/2018 11:43 AM, Bill Deegan wrote:
>>> Yup. If you have any Ignore()'s then this is likely to happen without the
>>> patch.
>>> It's a work in progress as I'm trying tor resolve some tests which fail
>>> when run on windows and also when run with the changed in the Pull
>> request
>>> for 2980.
>>
>> I didn't realize we had any, but grepping shows we do - even if I'm not
>> sure what the purpose is. Do these even make any sense at all?
>>
>> # Copy test configuration
>> Command("examples/ResourceContainerConfig.xml",
>> "examples/ResourceContainerConfig.xml", Copy("$TARGET",
>> "$SOURCE"))
>> Ignore("examples/ResourceContainerConfig.xml",
>> "examples/ResourceContainerConfig.xml")
Mats Wichmann
2018-05-15 20:50:36 UTC
Permalink
On 05/15/2018 01:59 PM, Mats Wichmann wrote:
> On 05/15/2018 12:23 PM, Bill Deegan wrote:
>> Weird. So it's copying onto itself?
>
> sure looking like it to me... copy to itself, then ignore the "changed
> file" which would otherwise trigger a "rebuild". Hmmm.

well, the light went on, it wasn't so complicated after all. since we
run with duplicate=0, the "source" files in the variant dir exist only
in the mind of scons, and then later when a test is run, the test
configuration file isn't there with scons out of the picture.

but surely there is a more best-practice way to say "make sure this file
exists in the variant dir even after scons quits"?
Loading...