Skip to content
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 golang 1.19 and update of copyright year #203

Open
wants to merge 44 commits into
base: master
Choose a base branch
from

Conversation

Hammond95
Copy link

@Hammond95 Hammond95 commented Aug 11, 2022

What has changed

  • patched a bug in the python script fetching go binaries urls:

    def _fetch_links(base_url=DEFAULT_BASE_URL, max_fetch=20):

    This code probably should be improved since the links grow in time.

  • updated copyright:

    gimme/gimme

    Line 58 in 01e9428

    readonly GIMME_COPYRIGHT="Copyright (c) 2015-2022 gimme contributors"

  • add go 1.19 to version list:

    gimme/gimme

    Line 288 in 01e9428

    local versions=("1.19" "1.18" "1.17" "1.16" "1.15" "1.14" "1.13" "1.12" "1.11" "1.10" "1.9" "1.8" "1.7" "1.6" "1.5" "1.4")

  • add a better method to compare version numbers in runtests:

    gimme/runtests

    Line 21 in 01e9428

    version() { echo "$@" | tr -d '[:alpha:]' | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4); }'; }

    gimme/runtests

    Line 90 in 01e9428

    if [[ $(version "$v") -lt $(version 1.5.0) && "${v}" != "tip" && "${v}" != "master" ]]; then

  • updated shfmt and shellcheck versions:

    gimme/.travis.yml

    Lines 14 to 15 in 01e9428

    - SHFMT_VERSION="v3.5.1"
    - SHCHK_VERSION="v0.8.0"

  • expanded matrix in order to test separately failing builds:

    gimme/.travis.yml

    Lines 23 to 51 in 01e9428

    matrix:
    - env:
    TARGET: "native"
    GO_VERSIONS: "$(sed -n -e '/^[^#]/p' < .testdata/sample-binary-$UNAME) $(sed -n -e '/^[^#]/p' < .testdata/source-$UNAME)"
    addons:
    apt:
    packages:
    # install cross compilers for cgo support.
    - gcc-arm-linux-gnueabi
    - libc6-dev-arm64-cross
    - env:
    TARGET: "arm"
    GO_VERSIONS: "master"
    addons:
    apt:
    packages:
    # install cross compilers for cgo support.
    - gcc-arm-linux-gnueabi
    - libc6-dev-arm64-cross
    - env:
    TARGET: "arm64"
    GO_VERSIONS: "$(sed -n -e '/^[^#]/p' < .testdata/sample-binary-$UNAME) master"
    GIMME_DEBUG: "true"
    addons:
    apt:
    packages:
    # install cross compilers for cgo support.
    - gcc-arm-linux-gnueabi
    - libc6-dev-arm64-cross

    I think this could be a better approach also if we want to test on different architectures and different env variables.

  • ran make lint which performed minor syntax changes

  • ran make update-binary-versions to update links and versions in files of the test data.

@Hammond95
Copy link
Author

I am asking others maintainers support here, because I don't know why test fail... maybe they should be updated, but I need more context.

@Hammond95
Copy link
Author

I think that #204 is trying to achieve my same result, at the moment both build are in failed state.

Mine at the moment is 2 out of 3.

should we collaborate to get it 3 out of 3?

Mine fails for some reason I couldn't understand on installing go 1.19.1 with target arm64. It does install it on travis native arch, so the go binary is not executable.

But as far as I understood, gimme is expected to try to rebuild go using cross compilers and this way it should then work on this architecture too.

But these are just what I got, I may be wrong. I am here again asking for some clarification by the official maintainers of the project.

@r-arek

@Hammond95
Copy link
Author

Could this also be related to #154?

@Hammond95
Copy link
Author

@philpennock I tried to use GIMME_CC_FOR_TARGET: "arm-linux-gnueabi-gcc" for cross compilation, as you had suggested on #154, but the build failed anyways... any other idea?

@Hammond95
Copy link
Author

Hammond95 commented Sep 12, 2022

The only test that fails on this branch is the installation on ARM64 using cross compilation. I don't know if this has ever worked.

I will stop here with developments unless someone else (possibly a travis-ci maintainer), points out to some solution/suggestion/way to go.


If someone thinks this should be merged, I would go for a squash merge, since I did many commits to try different stuff.

@Hammond95
Copy link
Author

One thing that makes me think that this has never worked is that the error is the following:

./runtests: line 102: /home/travis/.gimme/versions/go1.19.1.linux.arm64/bin/go: cannot execute binary file: Exec format error
./runtests: line 98: /home/travis/.gimme/versions/go1.19.1.linux.arm64/bin/go: cannot execute binary file: Exec format error
The command "./runtests "${TARGET}" "${GO_BOOTSTRAP_VERSION}" ${GO_VERSIONS}" exited with 1.
0.01s$ ls -la "$HOME/.gimme/envs/"
total 28
drwx------ 2 travis travis 4096 Sep 12 09:54 .
drwxr-x--- 4 travis travis 4096 Dec  5  2017 ..
-rw-rw-r-- 1 travis travis  188 Sep 12 09:54 go1.18.6.env
-rw-rw-r-- 1 travis travis  188 Sep 12 09:54 go1.18.6.linux.amd64.env
-rw-rw-r-- 1 travis travis  206 Sep 12 09:54 go1.19.1.linux.arm64.env
-rw------- 1 travis travis  186 Dec  5  2017 go1.7.4.env
-rw------- 1 travis travis  186 Dec  5  2017 go1.7.4.linux.amd64.env
lrwxrwxrwx 1 travis travis   37 Sep 12 09:54 latest.env -> /home/travis/.gimme/envs/go1.18.6.env

env file is created and also the go binary is downloaded. The go binary is probably compiled for arm64 architecture and doesn't work on the native amd architecture.

@r-arek
Copy link
Contributor

r-arek commented Sep 12, 2022

@Hammond95 Hey, thanks for your contribution. @mustafa-travisci Could you take a look? It seems that you've been working on similar issue.

@Hammond95
Copy link
Author

I also wanted to point out the following issues:
#166
#154
#42

still open that may be related to our problem of cross compilation.

@Hammond95
Copy link
Author

@r-arek I haven't received any feedback from @mustafa-travisci.

It seems to me that the project has always had cross compilation issues (see #166 #154 #42).

We should probably solve these issue on a dedicated PR.

@Hammond95
Copy link
Author

@r-arek @mustafa-travisci

I don't want to bother anyone here, but I think this PR adds the functionality to download go1.19, so it could be ok to merge it.

The cross-compiling functionality as far as I can see, has never worked well, so that problem should be addressed in a different PR.

@Hammond95
Copy link
Author

@r-arek Is the project dead?

It's been more than a month and I didn't receive any feedback :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants