-
Notifications
You must be signed in to change notification settings - Fork 40
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 Stack build to Travis CI #1109
Comments
Travis-CI build for the stack fails with
@edugrasa this line in rnl-utils was recently added for the SK_Buff work can you offer a pointer as to how to fix this up ? |
In 2-3 days I will be doing a pull request with updated code that no longer uses netlink, so I think it's worth waiting and not solving this issue. Do you agree? |
Fine let me know when the pull request is being processed and I'll bring it into this branch for the Travis CI build. |
We tried Travis a while back during PRISTINE with Marc, and one of the problems was that the free version of Travis had a build time limit, which was exceeded when trying to build a complete kernel. Now that the stack is built out-of-tree it may work. Do you have an estimate of the build time on a VM? |
If someone would have spare server capacity, there are ways to couple github with external CIs. Private instances of Travis CI, or gitlab CI (not sure if repo can be external) or some of the newer CIs. |
@dstaesse I don't have a specific build time, but I can say that I've recently managed to build it in a Docker VM on a Mac so it should be possible to build within a CI environment now. |
@msune I really like and have used GitLab CI. However I think the project has to be within a GitLab instance for it to be then built on an associated GLRunner. As you say though all I need is some nice offer to host a private GitLab / GLRunner instance and I can get it running up there. |
@edugrasa a question for you in regards to the build that is hosted on Travis CI. The build is currently failing with
From what I can tell IFF_PHONY_HEADROOM is defined in include/linux/netdevice.h, line 1381 (as a enumerator). However this only appears in Kernel headers from v4.6 onwards. Ubuntu 14.04 (which is one the base images for Travis CI) is on v4.4, so IFF_PHONY_HEADROOM is not defined. Is there some way we can get around this ? |
@miguelpdl The current implementation supports kernels versions v4.9 onwards, not sure if IFF_PHONY_HEADROOM would be the only problem in trying to support v4.6 kernels. Is it possible to get a machine with kernel v4.9.x to do the build? |
Ahh okay, v4.9 onwards. But the problem is not in getting a machine and installing a newer kernel. The Travis CI environment is Ubuntu 14.04.5 LTS with kernel version: 4.4.0-93-generic which is as pointed out by the Ubuntu LTS kernel support page. Even when looking at Ubuntu 16.04 LTS support v4.6 kernel is not on the roadmap, it will be at best v4.5 in 2018. So out of the box, at best a Ubuntu 16.10 OS would have to be in place to build the arcfire branch. Looks like I'll have to look for an alternative CI environment. |
I'm no expert here, but is it possible to setup Travis so that it cross-compiles for kernel v4.9? (similar to what buildroot does for building Linux images) |
@miguelpdl The problem was never the environment, only the build time was. The C++ compilation of user space takes quite some time. If Travis/Jenkins scraps the VM after 50 minutes because it thinks it hangs, it won't build the complete stack. We need to be able to build the entire thing before the time expires. |
Probably this is not an issue anymore? Even in a Raspberry Pi (model 3B) user-space compilation takes less than 50 minutes.. Probably the issue was total build time when the full kernel had to be compiled? This is not required anymore.. |
@miguelpdl I think it should be possible using Github's https://developer.github.com/v3/repos/hooks/#test-a-push-hook But this sounds very convoluted, and wouldn't be easily integrated with PR (reviewing etc...). There is always an option of using Travis CI payed plan (69$/month) |
@miguelpdl A different option may also be to download the latest kernel + headers from the Ubuntu kernel-ppa, to install them through dpkg and then install IRATI. |
Can the entire IRATI code be compiled as a kernel module + libs + apps? One alternative option would be to prepare a Debian with the kernel pre-compiled, and do the module compilation only as part of the build, plus the rest of user-space and apps. It is not ideal, as you would want to do both in-kernel and modules. But it's better than nothing. |
@msune The whole kernel space is compiled out of tree these days AFAIK. The problem is that the module compilation requires kernel headers that are new enough. But your point remains valid. One could for instance also only compile the userspace. Or try my suggested approach above of getting the latest kernel and headers from the kernel-ppa and trying it like that. |
There should be enough time to comply kernel modules + user-space only. In the old days, the entire kernel was compiled as part of the build (and the kernel was already around 42minutes or so, so timeouts were more than possible). I have to download the code back, and give it a try with the new featurea 😄 |
Yes, I am not worried about it timing out. I was merely stating that if it is the case that updating to kernel headers that are new enough is too difficult, one could simply do a userspace only compilation. (Since the checks for the syscalls are gone I assume) @edugrasa Can probably confirm this. |
Hi,
Some observations:
1) The compilation time now is acceptable, because we don't need to compile
the whole kernel and modules, but just some kernel modules.
2) It is not necessary to build the kernel modules against the running
kernel (4.4). You can build the modules against any directory with kernel
sources that have been "prepared".
$ wget linux-sources-4.9.tar.gz
$ tar zxvf linux-sources-4.9.tar.gz
$ cd linux-sources-4.9
$ make defconfig
$ make modules_prepare
Then you need to modify the kernel Makefile to change dir to
/path/to/linux-sources-4.9
$ make -C /path/to/linux-sources-4.9 modules M= ....
In the real world the ./configure is expected to provide an option to
compile the kernel modules against a given local path, so that it can
generate the proper makefile.
See for instance what has been done for rlite https://pastebin.com/4Q67bW7c
(look for --kernbuilddir and KERNBUILDDIR). Makefile template here (
https://pastebin.com/Xf6YT3CA).
Cheers,
Vincenzo
2017-09-12 8:46 GMT-07:00 Sander Vrijders <notifications@github.com>:
… Yes, I am not worried about it timing out. I was merely stating that if it
is the case that updating to kernel headers that are new enough is too
difficult, one could simply do a userspace only compilation. (Since the
checks for the syscalls are gone I assume) @edugrasa
<https://github.com/edugrasa> Can probably confirm this.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1109 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEsSwfldTosWAlr5oou7tog5Ul-rBRC-ks5shqdkgaJpZM4Obd1q>
.
--
Vincenzo Maffione
|
Hi Vincenzo, I adopted that kernel configuration option from rlite to IRATI, should be the same unless I made an error :P (if so I'll fix asap). Therefore what you say should be possible in IRATI as well |
Sure it is possible! But have you actually tried to compile the modules against external sources as outlined above? (can't try right now, sorry) |
Not yet, maybe we can help @miguelpdl set it up |
@msune Yes looking at the PUSH hook that should work (Github repo to GitLab CI Runner) but it is convoluted and for sure all the PR would be missing, so not the best option. Paying for bootstrap Travis CI will not help, the environment is still a docker container with Ubuntu 14.04 LTS, so I would not have the privileges to change the kernel up to v4.9 that's needed for the build.
|
@sandervrijders good option, and I see they already cover the v4.9 version needed at http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.9/ However as just mentioned to Marc, since the TraviCI, and CircleCI use Docker containers with Ubuntu LTS 14.04 then I have no privileges to install the new kernel into the environment before then starting the IRATI stack build. I will of course do this on a local machine, thanks
|
@vmaffione thanks for insights, seems achievable. I've looked at the configure and Makefile created for rlite on this case, and the use of KERNBUILDDIR is very clear. However @edugrasa I think changes to the IRATI stack would be needed to support this. As far as I can see in the IRATI stack build environment the KERNBUILDDIR is set in stack/kernel/Makefile.in which in turn is really set in stack/kernel/configure. But this is all set up with default values in place, with the expectation that v4.9 (or greater) kernel headers are in place. So I think some work would be needed here first to allow an option like --kernbuilddir. Also would it be an idea to use an option --kernbuilddir in the script 'stack/install-from-scratch', more so than hidden further down in the 'stack/compile-kernel' or 'stack/kernel/configure' scripts ? All in all I think that if this is a route to go, then a new issue (feature request) should be raised. I'll keep trying the CI build somehow through this issue.
|
I'm surprised IRATI kernel does not compile on 4.4 or 4.6, as Linux
internal APIs didn't change that much in this range What is the dependency
that breaks across these versions?
I personally don't think the "install-from-scratch" script is something that people (or us) should use. I would try to stick to the standard ./configure && make.
2017-09-15 3:59 GMT-07:00 Miguel Ponce de Leon <notifications@github.com>:
… @vmaffione <https://github.com/vmaffione> thanks for insights, seems
achievable.
I've looked at the configure and Makefile created for rlite on this case,
and the use of KERNBUILDDIR is very clear.
However @edugrasa <https://github.com/edugrasa> I think changes to the
IRATI stack would be needed to support this.
As far as I can see in the IRATI stack build environment the KERNBUILDDIR
is set in stack/kernel/Makefile.in which in turn is really set in
stack/kernel/configure. But this is all set up with default values in
place, with the expectation that v4.9 (or greater) kernel headers are in
place. So I think some work would be needed here first to allow an option
like --kernbuilddir.
Also would it be an idea to use an option --kernbuilddir in the script
'stack/install-from-scratch', more so than hidden further down in the
'stack/compile-kernel' or 'stack/kernel/configure' scripts ?
All in all I think that if this is a route to go, then a new issue
(feature request) should be raised. I'll keep trying the CI build somehow
through this issue.
$ wget linux-sources-4.9.tar.gz
$ tar zxvf linux-sources-4.9.tar.gz
$ cd linux-sources-4.9
$ make defconfig
$ make modules_prepare
Then you need to modify the kernel Makefile to change dir to
/path/to/linux-sources-4.9
$ make -C /path/to/linux-sources-4.9 modules M= ....
In the real world the ./configure is expected to provide an option to
compile the kernel modules against a given local path, so that it can
generate the proper makefile.
See for instance what has been done for rlite
https://pastebin.com/4Q67bW7c
(look for --kernbuilddir and KERNBUILDDIR). Makefile template here (
https://pastebin.com/Xf6YT3CA).
Cheers,
Vincenzo
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1109 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AEsSwXoDEUDJlyRO_oTd6ne-5rQXrItAks5silimgaJpZM4Obd1q>
.
--
Vincenzo Maffione
|
@vmaffione okay (in regards to "install-from-scratch" script). In regards to the IRATI kernel compile on 4.4 or 4.6. if you look at the configure script it uses $(uname -r) to locate the modules and header files, which is all fine and dandy when v4.9 the linux kernel is installed on the machine you are building with however as highlighted in the earlier comments the CI build on TravisCI is currently failing with
IFF_PHONY_HEADROOM is defined in include/linux/netdevice.h, line 1381 (as a enumerator). However this only appears in Kernel headers from v4.6 onwards. So this will not compile with v4.4 as far as I can tell.
|
Hi @miguelpdl , @vmaffione, I'm adding the changes to be able to change the kernel build directory. It doesn't compile with v4.4 for the reason you state and also do to changes in the queueing disciplines API. I'm trying now with v4.6
|
v4.6 doesn't have the problem Miguel reported, but the changes to the qdisc API were not there yet. Therefore 4.9 is the minimum version required I'm afraid... |
Ok I see the problem.
we can upgrade this to kernel feature probing later (look for |
Ok, will try the quick hack, should be ready tomorrow morning |
@miguelpdl @vmaffione |
Back on this item I can confirm that the build works on Debian 8 environment. And in a round about way it builds on Ubuntu 16.04 too (v4.4 kernel). Most things seems to run fine until an error at the end.
It's an error so as far as I can tell it does not break the build, but it certainly doesn't look right. In looking at this issue it appears to be caused by a new and stricter method of kernel module signing on Ubuntu 16.04. More can be read here about Ubuntu 16.04, make install leads to ssl error. Does this mean a new issue should be raised against the IRATI Stack, in regards to DKMS installation being the recommended way on Ubuntu ? |
Finally built the IRATI Stack on a GitLab Runner successfully But there's a few notes to write up before I can request a merge. |
Another comment here that might be worth raising as an feature request (i.e. Issue). The current process to build the IRATI Stack is
But shouldn't the process be
Now I (think) I know why the build is done like this. The |
Fixed by #1137 |
I've re-opened this issue as the task as first laid out by the ticket "Add Stack build to Travis CI" was not really complete with the last commit. The last PR really just ensured that the IRATI Stack would build on the Gitlab Runner, running off the mirrored repo for the stack over in Gitalb world. That is not an ideal scenario as the mirroring can take between 20 minutes to 18 hours to cross over to the Gitlab side, so the real task here was to get the Travis CI service building the stack. After much trial and error, the Travis CI build service now builds the Stack. Some of the issues encountered included:
Now I've merged in the latest commits from the arcfire branch, the build passes again so will created a new merge request and hopefully we can truly close out this ticket. |
Also of note the build over on Gitlab still passes too with these changes. |
Travis CI is a hosted, distributed continuous integration service used to build and test software projects. The plan is to add a continuous build of the IRATI stack to the Travis CI system
The text was updated successfully, but these errors were encountered: