-
Notifications
You must be signed in to change notification settings - Fork 2
HYRAX-2012: Add -fPIC to the build flags for proj #104
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
33a0fb4
Add -fPIC to the buid flags for proj
jgallagher59701 4012a32
Trial fix for missing 'lib64' dirs when -rpath is used on RHEL8/9
jgallagher59701 b98898b
Merge branch 'master' into jhrg/HYRAX-2012-proj-fPIC
jgallagher59701 98f7845
Another stab at it
jgallagher59701 b70f9dd
Merge branch 'jhrg/HYRAX-2012-proj-fPIC' of https://github.com/OPENDA…
jgallagher59701 68e1ca4
Repair the Makefile
jgallagher59701 8519e06
Try and set the build number to 12 for all the platforms.
jgallagher59701 0d9000e
Use the global value of EXPECTED_DEPS_COUNT
jgallagher59701 97264c0
I fixed a 'copy-pasta' bug in .travis.yml and added a plan to improve…
jgallagher59701 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| # Travis Performance Plan | ||
|
|
||
| ## Goals | ||
|
|
||
| Improve the performance of [`.travis.yml`](/Users/jimg/src/opendap/hyrax/hyrax-dependencies/.travis.yml) and identify ways to simplify it without changing the end result. | ||
|
|
||
| ## Plan | ||
|
|
||
| 1. Establish a baseline and confirm where time is going. | ||
|
|
||
| Measure one or two recent runs by job type and break the runtime into `apt`, Docker startup, `dnf update`, dependency build, packaging, and deploy. This matters because the biggest likely cost in the current setup is not Travis YAML parsing, but repeated dependency rebuilds and the `dnf -y update` inside [travis/build-for-rocky8.sh](/Users/jimg/src/opendap/hyrax/hyrax-dependencies/travis/build-for-rocky8.sh#L57) and [travis/build-for-rocky9.sh](/Users/jimg/src/opendap/hyrax/hyrax-dependencies/travis/build-for-rocky9.sh#L58). | ||
|
|
||
| 2. Add Travis cache for downloaded sources and build state. | ||
|
|
||
| The Makefile is already stamp-driven, which is a good fit for caching. The first cache pass should preserve: | ||
|
|
||
| - `downloads/` | ||
| - `src/` | ||
| - repo-root `*-stamp` files | ||
| - job-specific install trees such as `$HOME/install`, `$HOME/rocky8/install`, and `$HOME/rocky9/install` | ||
|
|
||
| That gives Travis a chance to skip re-downloading, re-unpacking, re-configuring, and re-installing unchanged dependencies on later runs. | ||
|
|
||
| 3. Split caches by platform and add explicit cache-bust controls. | ||
|
|
||
| Do not share one cache across Ubuntu, Rocky 8, and Rocky 9. Their binaries and toolchains are different. Use separate cache namespaces per job, and add a simple manual cache version variable so the cache can be invalidated cleanly when [Makefile](/Users/jimg/src/opendap/hyrax/hyrax-dependencies/Makefile), dependency versions, or the Rocky build scripts change. | ||
|
|
||
| 4. Start with safe caching, then optionally expand to installed artifacts. | ||
|
|
||
| Phase 1 should cache only source downloads, extracted source trees, and stamp files. That is low-risk and should already remove a lot of rebuild work. | ||
|
|
||
| Phase 2 can cache the installed prefixes too, but only after validating that reused installs remain correct when compiler flags or dependency versions change. This is where a cache version key becomes important. | ||
|
|
||
| 5. Remove or reduce the unconditional `dnf update` in the Rocky jobs. | ||
|
|
||
| Both Rocky scripts do a full `dnf -y update` on every run. That is usually expensive and tends to defeat repeatability as well as caching. The better plan is: | ||
|
|
||
| - build or refresh the Docker images ahead of time with the needed packages baked in, then stop doing the full update in Travis | ||
| - or make the update conditional so it only runs when intentionally refreshing the builder image | ||
|
|
||
| This is likely one of the highest-impact improvements. | ||
|
|
||
| 6. Decide whether Docker image pull and update behavior should be stabilized. | ||
|
|
||
| If the Travis host is always pulling a moving `:latest` image, builds can slow down and become less reproducible. Pinning [`.travis.yml`](/Users/jimg/src/opendap/hyrax/hyrax-dependencies/.travis.yml#L82) and [`.travis.yml`](/Users/jimg/src/opendap/hyrax/hyrax-dependencies/.travis.yml#L109) to versioned builder tags would help both performance predictability and cache usefulness. | ||
|
|
||
| 7. Make packaging and deploy work happen only after a successful cache-aware build check. | ||
|
|
||
| Each job currently creates tarballs after `make`. Once caching is in place, keep the packaging step but make sure the build verification still proves the cache was valid, for example with `make list-built` and [travis/check-installed](/Users/jimg/src/opendap/hyrax/hyrax-dependencies/travis/check-installed#L1). This preserves the end result while reducing unnecessary compilation. | ||
|
|
||
| 8. Add a short validation phase for cache correctness. | ||
|
|
||
| Run the jobs twice in a row on the same branch and compare logs. The second run should show most dependency targets being skipped because the stamp files and install trees are already present. Then test one intentional dependency version change to confirm the cache-bust process works. | ||
|
|
||
| ## Separate Simplification Step | ||
|
|
||
| 9. Simplify `.travis.yml` without changing outputs. | ||
|
|
||
| The three jobs in [`.travis.yml`](/Users/jimg/src/opendap/hyrax/hyrax-dependencies/.travis.yml#L53) repeat a lot of setup, packaging, and logging. A clean simplification pass would: | ||
|
|
||
| - use shared YAML anchors or a small wrapper script for the repeated tarball and packaging logic | ||
| - parameterize the Rocky jobs by image name, artifact name, and helper script instead of duplicating nearly identical blocks | ||
| - remove dead or unused structure such as the `never` stage if it is no longer serving a purpose | ||
| - fix minor cleanup issues such as the likely typo `mkdir -vp $"install_dir"` in [`.travis.yml`](/Users/jimg/src/opendap/hyrax/hyrax-dependencies/.travis.yml#L107), which should be `"$install_dir"` | ||
|
|
||
| ## Recommended Order | ||
|
|
||
| 1. Cache `downloads/`, `src/`, and stamp files. | ||
| 2. Remove `dnf -y update` from per-build execution by baking it into the Rocky images. | ||
| 3. Add optional caching for installed prefixes. | ||
| 4. Simplify `.travis.yml` by deduplicating job logic. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| #!/bin/bash | ||
|
|
||
| echo "###################################################################" | ||
| echo "# proj_libdir: '$proj_libdir'" | ||
| echo "# deps_libdir: '$deps_libdir'" | ||
| echo "# PKG_CONFIG_PATH: '$PKG_CONFIG_PATH'" | ||
| echo "# CPPFLAGS: '$CPPFLAGS'" | ||
| echo "# LDFLAGS: '$LDFLAGS'" | ||
| echo "# OSTYPE: '$OSTYPE'" | ||
| echo "#" | ||
| pkg-config --list-all | awk '{print "## "$0; }' - | ||
| for dir in $proj_libdir; do | ||
| echo "#" | ||
| echo "# ls -l $dir " | ||
| ls -l "$dir" | ||
| if test -d "$dir/pkgconfig"; then | ||
| echo "#" | ||
| echo "# ls -l $dir/pkgconfig: " | ||
| ls -l "$dir/pkgconfig" | ||
| fi | ||
| if test -f "$dir/pkgconfig/proj.pc"; then | ||
| echo "#" | ||
| echo "# awk '{print \"## \"\$0;}' $dir/pkgconfig/proj.pc: " | ||
| awk '{print "## "$0;}' "$dir/pkgconfig/proj.pc" | ||
| fi | ||
| done | ||
| echo "#" | ||
| echo "# pkg-config --exists proj" | ||
| pkg-config --exists proj | ||
| if test $? -eq 0; then echo "# pkg-config FOUND proj"; else echo "# pkg-config FAILED to find proj"; fi | ||
| echo "#" | ||
| echo "###################################################################" |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.