-
Notifications
You must be signed in to change notification settings - Fork 2
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
Supporting statically linked IOCs #75
Conversation
base/build-static-ioc.sh
Outdated
version=$(git describe) | ||
|
||
echo $version > $IOC-version | ||
echo ".git/" > /tmp/globs |
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.
The necessary globs for building afc-epics-ioc correctly are still going to be determined.
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.
Has this been resolved?
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.
Isn't better to squash this commit with the previous, keeping the changes tracking with the change itself?
I'm not sure. The change is a combination of all the other commits in the PR, IMO. Even if the last commit was the one to tie everything together 🤔 |
f9093d6
to
2f2713b
Compare
There is one thing that I don't like about letting them in the same commit: when reverting a commit, you need to be careful not to revert the changelog. Thus, this is necessarily partial revert. But you should probably also specify in the log that you did this, so not a big deal. On the other hand, it is pretty handy for blaming changes. For this case, I also understand this a whole PR change that is being described. So I'm okay with it as is. |
@henriquesimoes I didn't copy the directory inside the container as we had discussed, for the reasons laid out in the commit message. Let me know what you think. |
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.
I didn't copy the directory inside the container as we had discussed, for the reasons laid out in the commit message. Let me know what you think.
That's fine. It would be easier if EPICS supported out-of-tree compilation.
Assuming we merge #75 , this will require an update :) |
3d361aa
to
a081469
Compare
c62312d
to
b27a3b0
Compare
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.
Well, changes look right to me. Nice to know that the build system keeps everything inside O.*
. It is good to merge for me.
WDYT about adding bash to the following in e7eeebc?
I have been disappointed by the syntax highlight for bash
in GitHub. Not sure if shell
behaves differently or if all of them are not properly rendered.
This makes it possible to build fully statically linked IOCs easily.
Git is likely to be useful for build steps and should be included in the image by default.
When building statically linked binaries, it is necessary to link them to all libraries, so it becomes necessary for COMMANDLINE_LIBRARY to point to libreadline and its dependency, ncurses. The static version of said dependency was also missing from the container. We are repurposing a mechanism intended to support older Linux distros, not static linking, and care should be taken to make sure it keeps working when base is updated.
This script automates building fully statically linked IOCs using the musl image, and includes documentation for how to use it in the README. It was decided to use the mount point directory directly for builds instead of copying the source into a different directory in the container, even though it would remove the need to overwrite and then restore configure/ files. Doing otherwise would require the container to stay up for SKIP_CLEAN=1 to be relevant, and it would still require additional complexity in lnls-build-static-ioc, in order to copy the source into the right place, which would also require rsync in the build image to work properly. Using "O.*" in the tar glob file allows us to avoid calling "make clean" at any stage, and therefore calling "make -C iocBoot" is also unnecessary.
No description provided.