Skip to content
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

Shell script refactoring [Ryan] #31

Merged
merged 61 commits into from
Aug 25, 2014
Merged

Shell script refactoring [Ryan] #31

merged 61 commits into from
Aug 25, 2014

Conversation

PerryBhandal
Copy link
Member

Ryan,
When you get some time can you review my pull request, and verify that everything builds as expected on OS X?

Under Linux Mint 16 I've verified that the following two builds work:

  1. A clean build from scratch of sh_improvements.
  2. I pulled the master branch, ran setup. I then built all examples. After that I merged in my changes, deleted the conf files, re-generated them, ran set up, and ran the app build again.

Both worked without any issues.

Important Note

Once this pull request is merged, we'll need everyone who pulls these changes to re-generate their conf files.

… as exiting if a verification tool is specified but not found.
…gured to use the new non-env extlibs folder, as well as remote downloading (as opposed to including the source within NTRT).
PerryBhandal added a commit that referenced this pull request Aug 25, 2014
…vements

Hi all,
I've merged these changes. I've tested it thoroughly, both with clean builds, as well as merging in from existing builds. I've done my best to ensure that none of these changes will cause problems, but there are a lot of changes. I'll keep a close eye on my e-mail in case any problems arise, and I'll try to get them resolved asap.

I'd recommend that you make a backup of your NTRTsim dir before you pull the most recent master. In the event you pull the master, encounter problems later and don't have a backup, you can checkout commit 031bcd1 as a temporary stopgap. It's the most recent version of master prior to my changes.

If you notice any problems at all, please let me know!

Also, just another quick note to be sure everyone sees it: you'll need to delete your existing conf files and run setup.sh to re-generate them after pulling my changes.

Perry
@PerryBhandal PerryBhandal merged commit f065105 into master Aug 25, 2014
@PerryBhandal PerryBhandal deleted the sh_improvements branch August 25, 2014 05:54
@PerryBhandal
Copy link
Member Author

Hi all,
I've gone ahead and merged this pull request. I've tested it thoroughly, both with clean builds, as well as merging from existing branches. That being said, there were a lot of changes in this branch. I'll keep a close eye on my e-mail for the next few days. If you notice any problems, please let me know and I'll look into it asap.

I recommend that you take a backup of your existing NTRTsim before trying to pull the changes to master. In the event you run into problems, don't have a backup and need a temporary stopgap, you can revert to commit 031bcd1. It's the last master commit prior to my changes.

Also, just a reminder again that once you pull these changes you will need to delete your existing conf files and run setup.sh to re-generate them.

Perry

@vsunspiral
Copy link
Contributor

everything builds find for me! thanks!
vytas

On Aug 24, 2014, at 10:58 PM, Perry Bhandal notifications@github.com wrote:

Hi all,
I've gone ahead and merged this pull request. I've tested it thoroughly, both with clean builds, as well as merging from existing branches. That being said, there were a lot of changes in this branch. I'll keep a close eye on my e-mail for the next few days. If you notice any problems, please let me know and I'll look into it asap.

I recommend that you take a backup of your existing NTRTsim before trying to pull the changes to master. In the event you run into problems, don't have a backup and need a temporary stopgap, you can revert to commit 031bcd1. It's the last master commit prior to my changes.

Also, just a reminder again that once you pull these changes you will need to delete your existing conf files and run setup.sh to re-generate them.

Perry


Reply to this email directly or view it on GitHub.


Vytas SunSpiral
Dynamic Tensegrity Robotics Lab
cell- 510-847-4600
Office: 650-604-4363
N269 Rm. 100

Stinger Ghaffarian Technologies
Intelligent Robotics Group
NASA Ames Research Center

I will not tiptoe cautiously through life only to
arrive safely at death.

@ryan1248
Copy link
Contributor

Hi Perry,

This looks good for the most part. I am getting some errors during the
build process, for instance:

CMake Error: your CXX compiler: "NTRTsim/env/build/g++" was not found.
Please set CMAKE_CXX_COMPILER to a valid compiler path or name.

I think this is related to a change in build.sh separating the functions
for linux and osx building. Maybe we should think about creating a symlink
to the appropriate c++ compiler under env (e.g. env/bin/cpp => /usr/bin/g++
for mac; then we can use the same function for both mac and linux building?
This would be similar to creating the symlink to cmake in the setup_env.sh
script. Thoughts?

-Ryan

On Sun, Aug 24, 2014 at 8:35 AM, Perry Bhandal notifications@github.com
wrote:

Ryan,
When you get some time can you review my pull request, and verify that
everything builds as expected on OS X?

Under Linux Mint 16 I've verified that the following two builds work:

  1. A clean build from scratch of sh_improvements.
  2. I pulled the master branch, ran setup. I then built all examples. After
    that I merged in my changes, deleted the conf files, re-generated them, ran
    set up, and ran the app build again.

Both worked without any issues.
Important Note

Once this pull request is merged, we'll need everyone who pulls these

changes to re-generate their conf files.

You can merge this Pull Request by running

git pull https://github.com/NASA-Tensegrity-Robotics-Toolkit/NTRTsim sh_improvements

Or view, comment on, or merge it at:

#31
Commit Summary

  • Pulled all functions up, and removed duplicate osx compile function.
  • Consolidated all setup script calls into a single general function.
  • Added comments for cryptic sections of code.
  • Initial services commit.
  • Breaking helpers down into separate files.
  • Finished services configuration section.
  • Initial import of helper functions.
  • Added resolving for all common paths.
  • Added services configuration section.
  • Resolved script specific path problems.
  • Removed all references to env_dir.
  • Swapped downloads, bin, build and env_name constants into helper
    file.
  • Removed debugging statement.
  • Moved definitions out of functions file into a separate definitions
    source file.
  • Added sourcing of common definitions file.
  • Removed read_options as it was unused.
  • Removed common prefix writable check and replaced it with a
    parameterized helper.
  • Extracted common package installation functions from boost into a
    general helper.
  • Clarified which areas of the service configuration can be modified,
    and which can't.
  • Removed global header file.
  • Swapped setup to new header.
  • Reversed true/false integers.
  • Extracted common functions into helpers.
  • Moved functions for testing now extracted helper functions into a
    separate helper function test file.
  • Generalized check_directory_exists and check_file_exists functions.
  • Changed all directory existence check calls to use
    check_directory_exists helper.
  • Added helper to create a directory if it doesn't exist.
  • Added SRC_DIR path constant.
  • Switched build.sh to use helpers for paths rather than manually
    defining them.
  • Updated create_directory_if_noexist to exit if directory creation
    fails. Added an associated test.
  • Fixed if conditional for directory existence testing.
  • Removed lingering exit from debugging.
  • Fixed mkdir call, had clobbered out the p flag.
  • Swapped all directory creations over to helper function.
  • Moved helper functions from services/bash/* to bin/setup/helpers/*
  • Changed all relative script paths to use new helpers directory.
  • Updated file headers to remove all references to bash services
    folder.
  • Fixed path for helpers dir.
  • Updated helper paths to reflect new relative position in helpers
    directory.
  • Added helper to see if a user has a binary available in their path.
    Also included associated tests.
  • Added a flag for doing MD5 verification.
  • Updated MD5_SUM_BINARY to specify a binary by name rather than being
    a boolean.
  • Added verification of md5 hash verification tool's existence, as
    well as exiting if a verification tool is specified but not found.
  • Replaced SHA1 hashes with MD5 hashes for boost and bullet.
  • Added method for md5 verification, as well as its associated test
    method.
  • Removed debugging exit.
  • Added check for md5 hashing being disabled.
  • Added MD5 verification call for both boost and bullet.
  • Fixed has_command definition, clobbered it accidentally.
  • Set md5 hashing to simply use the hash, and ignore the file name.
  • Remomoved file names from pre-defined hashes.
  • Removed all MD5 calls, as well as the MD5 binary flag.
  • Made all helper paths relative to their nearest defined parent.
  • Added ENV_BIN_DIR to differentiate between BIN_DIR (base/bin) and
    ENV_BIN_DIR (base/env/bin)
  • Modified cmake call to use dynamic relative paths from helper,
    rather than a static relative path.

File Changes

Patch Links:

https://github.com/NASA-Tensegrity-Robotics-Toolkit/NTRTsim/pull/31.patch

https://github.com/NASA-Tensegrity-Robotics-Toolkit/NTRTsim/pull/31.diff


Reply to this email directly or view it on GitHub
#31.

@PerryBhandal
Copy link
Member Author

Hi Ryan,
Good catch. Given how small the fix is, I put it into the multi_core branch, as I don't think it will cause any problems.

That said, when you get a moment can you do a clean checkout of the multi_core branch, and do a setup and a build to ensure that not only is the compiler path issue resolved, but also to check whether multi-core building works without any problems on OS X?

We're discussing the latter in issue #32.

Thanks,
Perry

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants