-
Notifications
You must be signed in to change notification settings - Fork 6
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
Upgrade Go to 1.18 #7
Conversation
2816c57
to
6029e95
Compare
@eduardvintila What gccgo version should we use? I'm using
All prs mentioned in the description are merged. |
@StefanJum, you should use version 12, as stated in the description (though indeed I did not mention explicitly |
6029e95
to
79a26b7
Compare
I've updated the documentation. |
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.
@eduardvintila new issue, any idea on this one?
CRITICAL:root:2
workdir/libs/libgo/Makefile.build:3: workdir/apps/helloworld-go/build/go/apphelloworldgo/Makefile: No such file or directory
make[3]: *** No rule to make target 'workdir/apps/helloworld-go/build/go/apphelloworldgo/Makefile'. Stop.
@StefanJum hmm, did you also update |
Yes, it's weird, I've built it in a docker container and everything builds and runs fine, but if I try to build locally it fails. |
@StefanJum , you need |
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.
Nice work, @eduardvintila
I have a question: could we reduce the number of files modified by this PR by not including the autogenerated files and generating them on the fly?
@@ -1,11 +1,12 @@ | |||
// This file was automatically generated by mksyscall.awk | |||
// Code generated by mksyscall.awk. DO NOT EDIT. |
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.
If this file was automatically generated, could we add a rule in the makefile for that generating it of including it per se?
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.
mksyscall.awk
is from the upstream gcc
build system. It's not integrated with Unikraft, and I don't see an easy way to add a rule in the Makefile for the moment. Ofc it would be ideal if we could automate this, but I don't think it's feasible for this release :).
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.
Ok, let's stick with this. Maybe you should open a issue regarding this so we don't lose it in the comments.
@@ -0,0 +1,3548 @@ | |||
# This file has been auto-generated for go1.18 gccgo (GCC) 12.1.0. |
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.
Same here
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 one is generated by the helper scripts, found in the scripts/
directory (also introduced with this PR). In a similar manner, lib-musl
also includes generated Makefiles for each component (i.e. Makefile.uk.musl.complex, Makefile.uk.musl.signal etc.), providing also helper scripts to generate them. So I think we should keep this approach for consistency.
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.
Nice work, @eduardvintila
Reviewed-by: Radu Nichita radunichita99@gmail.com
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.
@eduardvintila everything seems to work fine.
One comment I have it's that everything is done very x86
-targeted (i.e. adding -D__x86_64__
, x86
headers and source files, setting x86
in config files, etc.), and this might be an issue if we want to add arm support in the future.
We tried (with @razvand) to compile this for arm and we eventually made it to the linking step, but I would make everything that is architecture specific depend on $(ARCH)
being set to x86_64
.
@StefanJum, @eduardvintila, we will have only x86_64 for Go this release. I had made progress with the AArch64 part, but it requires further work. We'll do it after the release and have a sub-release with Go support for AArch64. |
1199562
to
ae29375
Compare
@StefanJum, you're right. I've refactored the makefiles and some source files to emphasize which parts are architecture dependent. @razvand, for an ARM build to work, the |
One more thing @eduardvintila, I think we should add compiler version checks in the |
This commit upgrades the library version to 1.18 by using the upstream GO runtime library provided by GCC12. New Makefile rules are introduced to compartimentalize GO pacakge bulding. Helper scripts are also added to assist with creation of such Makefiles. Glue code was also added to help with compatibility, and additional headers from `libffi` and `libbacktrace` were also introduced. Co-authored-by: Marc Rittinghaus <marc.rittinghaus@unikraft.io> Co-authored-by: Eduard Vintilă <eduard.vintila47@gmail.com> Signed-off-by: Marc Rittinghaus <marc.rittinghaus@unikraft.io> Signed-off-by: Eduard Vintilă <eduard.vintila47@gmail.com>
Signed-off-by: Eduard Vintilă <eduard.vintila47@gmail.com>
ae29375
to
77ec7f6
Compare
Thank you, @StefanJum - I've included your suggestion! Also updated the PR based on the changes introduced by this commit from Unikraft core. |
@eduardvintila I get these errors, I remember I've got them before but I can't figure out what I did to get pass them.
Any unmerged pr that I need or some extra config options? |
@StefanJum Nope, no additional PR is needed. It looks like the same syscalls are provided by two seperate libraries. By any chance, do you have both |
Yes, that was it. It's really messed up, it was selected even if it did not show up in the config menu (due to the |
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.
Anyway this works, we need to soon get rid of ukmmap
tho.
Thanks a lot for the work @eduardvintila 🎉 🎉
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.
Reviewed-by: Stefan Jumarea stefanjumarea02@gmail.com
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.
Approved-by: Razvan Deaconescu razvand@unikraft.io
Signed-off-by: Eduard Vintilă <eduard.vintila47@gmail.com> Reviewed-by: Radu Nichita <radunichita99@gmail.com> Reviewed-by: Stefan Jumarea <stefanjumarea02@gmail.com> Approved-by: Razvan Deaconescu <razvand@unikraft.io> Tested-by: Unikraft CI <monkey@unikraft.io> GitHub-Closes: #7
This PR is part of a series of PRs that work in conjunction for the update of Go support to 1.18:
For testing, make sure to pass to QEMU the
-cpu host
argument (this is necessary because the paging API and ukvmem are required bylibgo
as part of Virtual Address space management, and somehow the default CPU just won't handle 1GB pages).Only GCC12 (with gccgo >=12) and x86 is supported for the moment.