New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add some shell scripts to help set up developer environment #16
Conversation
This is not ready yet, just posting it here so others can see where I'm going with it |
Thanks for posting this @adammoody! My feeling is that these scripts are too specific to your workflow to serve as "official" developer documentation. If the general directions for developers isn't as simple as
then we're doing something wrong. If you want to have them in-tree for convenience, my suggestion is to put them under a top-level "contrib" directory. This sends a signal that they're not an officially maintained part of the tree. |
Moved these to scripts directory for now, instead of setup. The contrib directory as recommended by @nedbass is being used by our configure, so I didn't want to step on anything there. |
That seems like a build system bug. Can you share some details about what you ran into? There's no existing contrib directory in the tree. Are you saying that one appeared after you run configure? |
Ready for review... the autogen.sh was specifiying "aclocal -I contrib/aclocal" and throwing an error about not finding the directory. I changed that to "m4" instead on the build PR, which fixes the warning. So it doesn't need contrib. I've left the setup scripts in the scripts subdirectory. |
I'd still much rather see this go in a |
@nedbass, I moved the setup scripts back to contrib. I think something like spack will help with most of this, but this is just meant as a temporary solution so we can all build while waiting for a better method. |
Thanks for making that change @adammoody. To address the checkpatch warnings about file permissions, I'll submit a PR to add an exemption for the |
contrib/README.md
Outdated
# Prepare developer environment | ||
|
||
Commands to set up a developer environment for UnifyCR. | ||
Requires that gcc v4.9.3+ is in your path: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good to add some explanation about why someone might use these scripts, e.g.
This procedure is provided for users working on systems where the required tools and dependencies are not available in packaged form. Most users should use the standard build process documented in the UnifyCR README.
This README should probably be renamed to something like README.buildme.md
since other unrelated files may eventually live in contrib
.
--break-one-line-headers | ||
|
||
# always use braces | ||
--add-braces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will trigger complaints from checkpatch.pl about unnecessary braces for one-line conditional statements.
contrib/buildme_dependencies
Outdated
pushd deps | ||
installdir=`pwd`/install | ||
rm -rf $installdir | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trailing whitespace in this file:
ERROR: trailing whitespace
#342: FILE: contrib/buildme_dependencies:11:
+ $
ERROR: trailing whitespace
#348: FILE: contrib/buildme_dependencies:17:
+ $
ERROR: trailing whitespace
#351: FILE: contrib/buildme_dependencies:20:
+ $
ERROR: trailing whitespace
#355: FILE: contrib/buildme_dependencies:24:
+ $
ERROR: trailing whitespace
#359: FILE: contrib/buildme_dependencies:28:
+ $
ERROR: trailing whitespace
#362: FILE: contrib/buildme_dependencies:31:
+ $
ERROR: trailing whitespace
#373: FILE: contrib/buildme_dependencies:42:
+ $
@@ -0,0 +1,10 @@ | |||
#leveldb.pc | |||
prefix=__INSTALLDIR__ | |||
exec_prefix=__INSTALLDIR__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trailing whitespace
autotools | ||
deps | ||
install | ||
setup/astyle* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should this be contrib/astyle?
@adammoody would you be opposed to adding .sh extensions to the scripts to make the style checker happy? I'd prefer to avoid changing the stock kernel checkpatch.pl to add an exemption for contrib. We can always ignore those style errors if you do object to the extensions, but it may be a good idea to establish that naming convention. |
edit setup README fix markdown in setup README rename setup to contrib add entries to gitignore for building from setup scripts autotools is using contrib, so go back to setup for now add astyle scripts style: force braces move setup files to scripts instead move setup files to scripts instead add instructions on how to run checkpatch script astyle options closer to checkpatch specify that newer gcc is needed for astyle avoid using custom autotools for now
added .sh to the buildme scripts |
I've got a spack package started, and it does encode those dependencies. End users can use spack, and they won't need the buildme scripts at all. They are not for end users. As developers, we might also be able to do that, in which case we can drop the buildme files altogether. They're just a hacky work around for now until we have something better. |
@adammoody sorry to be a nag about all of this. It's just that in my experience hacky workarounds tend to stick around longer than we plan. And it seems like spack already does what your buildme scripts do in a more clean and simple way. So why not skip the temporary hack and go straight to something we can live with for a while? |
# This is the 1st commit message: # This is a combination of 14 commits. # This is the 1st commit message: initial behavior debug # This is the commit message #2: fix int/long/size_t/off_t confusion # This is the commit message LLNL#3: more size_t fixes # This is the commit message LLNL#4: code rationalization # This is the commit message LLNL#5: debug logging # This is the commit message LLNL#6: more debugging # This is the commit message LLNL#7: more understanding # This is the commit message LLNL#8: more reasonable constant values # This is the commit message LLNL#9: zero buffers before use # This is the commit message LLNL#10: more cleanup and callocs # This is the commit message LLNL#11: append uid to runstate file # This is the commit message LLNL#12: create runstate file after MPI_Init # This is the commit message LLNL#13: simplify client context copy # This is the commit message LLNL#14: debug meta_batch_get # This is the commit message #2: sysio-writeread example improvements # This is the commit message LLNL#3: tons more understanding and size_t cleanup # This is the commit message LLNL#4: build fixes # This is the commit message LLNL#5: build fixes # This is the commit message LLNL#6: build fixes # This is the commit message LLNL#7: build fixes # This is the commit message LLNL#8: build fixes # This is the commit message LLNL#9: build fixes # This is the commit message LLNL#10: simplify lio_listio aiocb_list setup # This is the commit message LLNL#11: clean up mdhim range_server_bget leveldb code # This is the commit message LLNL#12: add server include path # This is the commit message LLNL#13: add common include path # This is the commit message LLNL#14: remove old macros # This is the commit message LLNL#15: build fixes # This is the commit message LLNL#16: fix value computed not used warning # This is the commit message LLNL#17: fix printf formats # This is the commit message LLNL#18: build fixes # This is the commit message LLNL#19: fix UNIFYCR_VAL_SZ definition # This is the commit message LLNL#20: fix mismatch between client and server read request structs
This adds a few shell scripts one can execute to prepare the environment for developers. I always forget the commands, so it helps to encode them in a file. This should help ensure we're working from a similar starting point.
Description
Adds a few scripts and a README in the setup/ directory. One script fetches and builds autotools, so we're working from the same set. Another downloads and builds leveldb. The third builds unifycr.
Motivation and Context
How Has This Been Tested?
Types of changes
Checklist: