[opensuse-packaging] Building gcc5-go for SLES12
Hi everybody, I needed a gcc-go package to build git-lfs for SLES12: https://build.opensuse.org/project/show/home:ojkastl_buildservice:git-lfs_fo... So I tried to build it myself, which worked by hacking the spec and disabling some java stuff, as you can see in the revisions: https://build.opensuse.org/package/revisions/home:ojkastl_buildservice:git-l... My gcc-packaging-newbie question is: Is this the intended way? Would this normally be solved by some prjconf entries enabling the gcc-go subpackage? Or is this triggered by some other mechanism? And: If build_java has to be disabled to build go, does this mean one cannot build both at the same time? Just trying to get the concept behind that... Thanks in advance! Johannes
On Feb 05 2018, Johannes Kastl
So I tried to build it myself, which worked by hacking the spec and disabling some java stuff, as you can see in the revisions: https://build.opensuse.org/package/revisions/home:ojkastl_buildservice:git-l...
gcc5-go is already available in devel:languages:go/gcc5, why do you need to change anything at all? Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi Andreas, On 05.02.18 14:13 Andreas Schwab wrote:
On Feb 05 2018, Johannes Kastl
wrote: So I tried to build it myself, which worked by hacking the spec and disabling some java stuff, as you can see in the revisions: https://build.opensuse.org/package/revisions/home:ojkastl_buildservice:git-l...
gcc5-go is already available in devel:languages:go/gcc5, why do you need to change anything at all?
Then let me rephase my question: How was it built there? My question was not about where to find a working gcc5-go, but more about the concept of building gcc5-go and all the stuff going on in the background. Johannes
On Feb 05 2018, Johannes Kastl
Hi Andreas,
On 05.02.18 14:13 Andreas Schwab wrote:
On Feb 05 2018, Johannes Kastl
wrote: So I tried to build it myself, which worked by hacking the spec and disabling some java stuff, as you can see in the revisions: https://build.opensuse.org/package/revisions/home:ojkastl_buildservice:git-l...
gcc5-go is already available in devel:languages:go/gcc5, why do you need to change anything at all?
Then let me rephase my question: How was it built there?
As a subpackage of the gcc5 package. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On Feb 05 2018, Johannes Kastl
On 05.02.18 14:27 Andreas Schwab wrote:
Then let me rephase my question: How was it built there?
As a subpackage of the gcc5 package.
Andreas, do you actually believe this answer is helpful?
Yes. This is the whole truth. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi Johannes!
On Feb 5, 2018, at 2:25 PM, Johannes Kastl
wrote: Then let me rephase my question: How was it built there?
My question was not about where to find a working gcc5-go, but more about the concept of building gcc5-go and all the stuff going on in the background.
I am not sure about the specific details of the gcc package in SLE or openSUSE, but generally you do not need any version of the go compiler to build gccgo. gccgo can be compiled as long as you have a working version of gcc which is not too old. The only compiler of the gcc compiler suite that I know of which needs to be bootstrapped is gnat. You need a working Ada (gnat) compiler to build gnat. gcj, gccgo and gdc can all be built just using a C compiler. I have bootstrapped gcc in Debian on new architectures several times and so far it was always gnat that caused a circular dependency on itself if it was enabled in the gcc package. Adrian-- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 02/05/2018 01:55 PM, Johannes Kastl wrote:
Hi everybody,
I needed a gcc-go package to build git-lfs for SLES12: https://build.opensuse.org/project/show/home:ojkastl_buildservice:git-lfs_fo...
So I tried to build it myself, which worked by hacking the spec and disabling some java stuff, as you can see in the revisions: https://build.opensuse.org/package/revisions/home:ojkastl_buildservice:git-l...
My gcc-packaging-newbie question is: Is this the intended way? Would this normally be solved by some prjconf entries enabling the gcc-go subpackage? Or is this triggered by some other mechanism?
And: If build_java has to be disabled to build go, does this mean one cannot build both at the same time? Just trying to get the concept behind that...
Thanks in advance! Johannes
Hi, which error where you getting if java was enabled? -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 05.02.18 14:37 Jordi Massaguer Pla wrote:
which error where you getting if java was enabled?
I just never got a gcc5-go package being built. To *me* this looked like it was an either-this-or-that:
# We don't want to build java %ifarch mips %define build_java 0 %define build_libjava 0 %else %define build_java 1 %define build_libjava 0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1} %endif
%define build_cp 1 %define build_fortran !0%{?building_libjava:1}%{?building_libffi:1} %define build_objc !0%{?building_libjava:1}%{?building_libffi:1} %define build_objcp !0%{?building_libjava:1}%{?building_libffi:1} %define build_go !0%{?building_libjava:1}%{?building_libffi:1}
On non-mips build_java and build_libjava are set, and build_go somehow takes that into account. I had no time to deepdive there, but setting build_java and build_libjava to 0 got me a gcc5-go package... That was why I was asking for insights. ;-) Johannes
On Feb 05 2018, Johannes Kastl
On 05.02.18 14:37 Jordi Massaguer Pla wrote:
which error where you getting if java was enabled?
I just never got a gcc5-go package being built.
To *me* this looked like it was an either-this-or-that:
# We don't want to build java %ifarch mips %define build_java 0 %define build_libjava 0 %else %define build_java 1 %define build_libjava 0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1} %endif
%define build_cp 1 %define build_fortran !0%{?building_libjava:1}%{?building_libffi:1} %define build_objc !0%{?building_libjava:1}%{?building_libffi:1} %define build_objcp !0%{?building_libjava:1}%{?building_libffi:1} %define build_go !0%{?building_libjava:1}%{?building_libffi:1}
On non-mips build_java and build_libjava are set, and build_go somehow takes that into account.
build_libjava and building_libjava are different macros. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 05.02.18 14:49 Andreas Schwab wrote:
On non-mips build_java and build_libjava are set, and build_go somehow takes that into account.
build_libjava and building_libjava are different macros.
NO! No really? You don't say. Wow. Honestly, why do you think I am puzzled? And why do you think I wrote "somehow takes that into account"? I had no gcc5-go package being built, then I changed the java stuff, and there was a gcc5-go package. So, somehow this seems to work. By chance, by accident, by deep cosmic whatever, I do not know. That is why I asked you guys for an explanation. But thanks, Andreas, now I know that those macros are not the same. Wow. Johannes
Try asking intelligent questions, nobody can read your mind. Andreas. -- Andreas Schwab, SUSE Labs, schwab@suse.de GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EEA B9D7 "And now for something completely different." -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi, On Mon, 5 Feb 2018, Johannes Kastl wrote:
On 05.02.18 14:49 Andreas Schwab wrote:
On non-mips build_java and build_libjava are set, and build_go somehow takes that into account.
build_libjava and building_libjava are different macros.
NO! No really? You don't say. Wow.
Well, from your snippet quoted above it indeed can be inferred that not seeing this (small) difference caused your confusion. Because, no, setting or not setting build_java or build_libjava does _not_ influence build_go but defining building_libjava does. Of course, now that your package just hardcodes build_go to 1 nothing of the two settings should make a difference either way. If you can show us a logfile where it _does_ make a difference, or your hardcoding of build_go didn't work, please show us; it might indicate a bug. (Though of course, using such old go compiler might not be the best idea, better to start right from gcc7?).
Honestly, why do you think I am puzzled? And why do you think I wrote "somehow takes that into account"?
I had no gcc5-go package being built, then I changed the java stuff, and there was a gcc5-go package. So, somehow this seems to work. By chance, by accident, by deep cosmic whatever, I do not know.
Show us where this was the case, then we can tell. (E.g. look at the current difference between your and devel:languages:go gcc5 package (osc rdiff): Index: gcc5.spec =================================================================== --- gcc5.spec (revision 1) +++ gcc5.spec (revision 3) @@ -68,15 +68,16 @@ %define build_java 0 %define build_libjava 0 %else -%define build_java 1 -%define build_libjava 0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1} +%define build_java 0 +%define build_libjava 0 %endif %define build_cp 1 %define build_fortran !0%{?building_libjava:1}%{?building_libffi:1} %define build_objc !0%{?building_libjava:1}%{?building_libffi:1} %define build_objcp !0%{?building_libjava:1}%{?building_libffi:1} -%define build_go !0%{?building_libjava:1}%{?building_libffi:1} +#%define build_go !0%{?building_libjava:1}%{?building_libffi:1} +%define build_go 1 %if %{build_objcp} %define build_cp 1 What you're claiming is that the first change makes a difference regarding building go. That's hard to believe. Indeed when I just rebuild the package without any of the two above changes it builds a gcc5-go just fine.) -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi Michael, On 06.02.18 14:34 Michael Matz wrote:
What you're claiming
Sorry if that is what you were reading out of my mail. I was not intending to claim anything, I was just puzzled by the things I saw and did not find a logical explanation.
is that the first change makes a difference regarding building go. That's hard to believe. Indeed when I just rebuild the package without any of the two above changes it builds a gcc5-go just fine.)
I cannot reproduce the issue. I just tested again, by linkpac'ing gcc5 to a new test project. There I get a gcc5-go package, as soon as the build is finished, without having to change anything in the spec. I am sure I had not gotten an gcc5-go package before my changes, as I was trying to get one to get git-lfs building. I can only guess that this might have been some kind of hiccup or an unfortunate combination of settings somehow, but as I cannot reproduce it, let's set this to solved. Thanks for your answer (and the other one as well) and the help! Kind Regards, Johannes
On Mon, 5 Feb 2018, Johannes Kastl wrote:
On 05.02.18 14:37 Jordi Massaguer Pla wrote:
which error where you getting if java was enabled?
I just never got a gcc5-go package being built.
To *me* this looked like it was an either-this-or-that:
# We don't want to build java %ifarch mips %define build_java 0 %define build_libjava 0 %else %define build_java 1 %define build_libjava 0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1} %endif
%define build_cp 1 %define build_fortran !0%{?building_libjava:1}%{?building_libffi:1} %define build_objc !0%{?building_libjava:1}%{?building_libffi:1} %define build_objcp !0%{?building_libjava:1}%{?building_libffi:1} %define build_go !0%{?building_libjava:1}%{?building_libffi:1}
On non-mips build_java and build_libjava are set, and build_go somehow takes that into account. I had no time to deepdive there, but setting build_java and build_libjava to 0 got me a gcc5-go package...
That was why I was asking for insights. ;-)
Simply do not re-build gcc ;) Use what is available - SLE12 should also have gcc7-go via the toolchain module now. Short answer to your question above: there are multiple .spec files involved in a GCC build and libjava is built from a different one than go. Richard. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
Hi Richard, On 06.02.18 11:32 Richard Biener wrote:
Simply do not re-build gcc ;)
I would prefer not to ;-)
Use what is available - SLE12 should also have gcc7-go via the toolchain module now.
But how to build against that in OBS? Or did I just miss Substituting "gcc-go" with "gcc7-go" and only tried substituting it with gcc5-go?
Short answer to your question above: there are multiple .spec files involved in a GCC build and libjava is built from a different one than go.
Thanks for the answer to the java-or-go question. As for the original question, was it by chance that changing the %define lines did get me a working gcc5-go package? Or what is the normal process? Not that I plan to do this frequently, but I'd like to understand the mechanism behind all the %define stuff... ;-) Johannes
Hi, On Tue, 6 Feb 2018, Johannes Kastl wrote:
Thanks for the answer to the java-or-go question.
As for the original question, was it by chance that changing the %define lines did get me a working gcc5-go package?
You must have misremembered. None of your two changes is required. Without them gcc5-go is created fine (I checked). Hardcoding build_go also works.
Or what is the normal process? Not that I plan to do this frequently, but I'd like to understand the mechanism behind all the %define stuff... ;-)
You seemed to have understood it actually, you just managed to confuse yourself in thinking it weren't working as you thought it did. Ciao, Michael. -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
On 02/05/2018 01:55 PM, Johannes Kastl wrote:
Hi everybody,
I needed a gcc-go package to build git-lfs for SLES12: https://build.opensuse.org/project/show/home:ojkastl_buildservice:git-lfs_fo...
So I tried to build it myself, which worked by hacking the spec and disabling some java stuff, as you can see in the revisions: https://build.opensuse.org/package/revisions/home:ojkastl_buildservice:git-l...
My gcc-packaging-newbie question is: Is this the intended way? Would this normally be solved by some prjconf entries enabling the gcc-go subpackage? Or is this triggered by some other mechanism?
And: If build_java has to be disabled to build go, does this mean one cannot build both at the same time? Just trying to get the concept behind that...
Thanks in advance! Johannes
I don't think we disabled that here: https://build.opensuse.org/package/show/devel:languages:go/gcc5 -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org
participants (6)
-
Andreas Schwab
-
Johannes Kastl
-
John Paul Adrian Glaubitz
-
Jordi Massaguer Pla
-
Michael Matz
-
Richard Biener