Building inside the spack-stage build directory?

1,021 views
Skip to first unread message

Jim Galarowicz

unread,
Jul 16, 2015, 8:38:53 PM7/16/15
to sp...@googlegroups.com, Don Maghrak
Hi all,

I have a question about how to debug in the spack build environment.    We are having trouble with getting our cbtf-krell build to execute correctly.   We wanted to add some debug lines to the source and do a make ; make install in the build directory, as we usually do when we are building outside of the spack build environment.

We went into the /tmp/spack-stage/spack-stage-IPdP11/cbtf-krell directory and made the source changes.   Then changed directory into the cmake build directory and tried to a do a make.

Scanning dependencies of target collectionTool
[ 98%] Building CXX object core/collectionTool/CMakeFiles/collectionTool.dir/collectionTool.cpp.o
Spack compiler must be run from spack!  Input SPACK_PREFIX was missing!
make[2]: *** [core/collectionTool/CMakeFiles/collectionTool.dir/collectionTool.cpp.o] Error 1
make[1]: *** [core/collectionTool/CMakeFiles/collectionTool.dir/all] Error 2
make: *** [all] Error 2
[jeg@localhost build_cbtf_krell]$


So, we figured out the SPACK_PREFIX needs to be set to the cbtf-krell install directory path and set that.

$ export SPACK_PREFIX=~/new_spack_fork/spack/opt/spack/Linux-x86_64/gcc-4.8.3/cbtf-krell-1.5-ujrctwhgm33taaaprbfaq33jw5xngzgv

[ 98%] Building CXX object core/collectionTool/CMakeFiles/collectionTool.dir/collectionTool.cpp.o
Spack compiler must be run from spack!  Input SPACK_ENV_PATH was missing!
make[2]: *** [core/collectionTool/CMakeFiles/collectionTool.dir/collectionTool.cpp.o] Error 1
make[1]: *** [core/collectionTool/CMakeFiles/collectionTool.dir/all] Error 2
make: *** [all] Error 2
[jeg@localhost build_cbtf_krell]$


We are not sure how or what goes into the SPACK_ENV_PATH?

Are we missing something or isn't there a way to do this that is easier than putting the source changes in a tarball and rebuilding from scratch each time?   Is there a way to set up the build environment and do rebuilds from the staging area?

Thanks,
Jim G

Todd Gamblin

unread,
Jul 17, 2015, 1:25:17 PM7/17/15
to Jim Galarowicz, sp...@googlegroups.com, Don Maghrak
Hi Jim,

If you want to get the environment for a particular build, see here:


So, for example:

spack env <spec> bash

If you have the shell support enabled, you can do this:

spack stage openspeedshop # fetch and expand tarball (or check out repo)
spack cd openspeedshop # cd to stage directory

# start bash with oss build environment
spack env openspeedshop bash

Based on conversations with Mark Miller, we're debating just combining all three of those commands into "spack shell" or something similar.

-Todd



--
You received this message because you are subscribed to the Google Groups "Spack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spack+un...@googlegroups.com.
To post to this group, send email to sp...@googlegroups.com.
Visit this group at http://groups.google.com/group/spack.
For more options, visit https://groups.google.com/d/optout.

Jim Galarowicz

unread,
Jul 17, 2015, 2:42:10 PM7/17/15
to Todd Gamblin, sp...@googlegroups.com, Don Maghrak
Thanks Todd!

spack env cbtf-krell bash

did the trick.  I was able to build from the staging directory!

Yeah!

Jim G

Tom Barron

unread,
Feb 2, 2016, 4:21:51 PM2/2/16
to Spack, j...@krellinst.org, d...@krellinst.org
Hi, Todd,

The link you provide in this message no longer appears to point anything. Where would I find this document now?

Thanks...
Tom

Todd Gamblin

unread,
Feb 3, 2016, 1:26:20 PM2/3/16
to Tom Barron, Spack, j...@krellinst.org, d...@krellinst.org
Hi Tom,

Sorry, that link should be:


-Todd

From: <sp...@googlegroups.com> on behalf of Tom Barron <tusc...@gmail.com>
Date: Tuesday, February 2, 2016 at 2:21 PM
To: Spack <sp...@googlegroups.com>
Cc: "j...@krellinst.org" <j...@krellinst.org>, "d...@krellinst.org" <d...@krellinst.org>
Subject: Re: [spack] Building inside the spack-stage build directory?
Hi, Todd,

The link you provide in this message no longer appears to point anything. Where would I find this document now?

Thanks...
Tom

On Friday, July 17, 2015 at 1:25:17 PM UTC-4, Todd Gamblin wrote:
Hi Jim,

If you want to get the environment for a particular build, see here:


So, for example:

spack env <spec> bash

If you have the shell support enabled, you can do this:

spack stage openspeedshop# fetch and expand tarball (or check out repo)
spack cd openspeedshop# cd to stage directory

--
You received this message because you are subscribed to the Google Groups "Spack" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spack+un...@googlegroups.com.
To post to this group, send email to sp...@googlegroups.com.
Visit this group at http://secure-web.cisco.com/1eqVeFYrSJc9mPisEm0zf7A5ynQYIGwQMZUBbK4ZtiwZNFcrj21iEEJhOqaec1CoHda9olVo1QsFuZ0pE_h42znq3gZfZNnr-s6SonMv8uLTuwR96rseCMAdzm5QYrn23BWV9qQDlZnpKo3iRZuKmw-XkwjSO5pQae94938vLIORB7xwJn6R3rqSbNBWZ3ggjwrTrPcHZWaTn7-c2Wq2k5E3wP6nDfK26kAalOG7T5Ip7rC39UwH3fyUffTKkX4gKbZEXnNZTleVvLOyO3YqewuI435MjH56wmwUYwCQfcfMcM64r90uF_rboo-pwQ3LKQJn3dWMkvuWFkKwiqm45wEFUXO0aA1Wzxh-9twGom1ry6ERr9fAexkZzmA850NIHTXpDUVLIBs-cIX9mX2ICBqHYTtIDgNit-bDBfiWa1Ag/l37%3Ahttps%3A%2F%2Fgroups.google.com%2Fgroup%2Fspacke.
For more options, visit https://secure-web.cisco.com/1PXAhfRqwSxQH5ZQ8VpJLndkox_w8mqZ02lKJcoFPPgsNyyak6IBh_A_r94BYVVD3JgNKTsCpxWjkVD0xqza8Wq9Ye0ULlA3uRyg4WZVvA9Jp9yon2-MU3s3MhxbF2gML8EsdRTbJLXomlvc2UtpP87T9HvpPW-E-7SbZooConaV1oRa9d7yARZeGfs_hA7v2FGILOjUyJIz-IEzIMKBNE_F1MI1FBHeywQ3udz-I548s1sBF7K8pQrIvKgpT0t8qJxmGbWp96TOQ2vYtR35sge3_Ya1tKkj2DFi5Gu9ANbNatexHwtGkADZpaXt8c2hHCMUVjTiWVT-lfF5Jn9NkEleWI-pGg7xx82ZT7jirLKWWe2JxChOOxFntPX3DD2s9jeMA4phH403iZTe6P80jKA/https%3A%2F%2Fgroups.google.com%2Fd%2Foptout.
Reply all
Reply to author
Forward
0 new messages