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

Since 0.8.x (?) fetching from Github is semi-broken and in many cases fails #909

Closed
barracuda156 opened this issue May 12, 2023 · 9 comments
Labels
bug Something isn't working

Comments

@barracuda156
Copy link
Contributor

Description

Problem looks like this:

Executing:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_fpm/fpm/work/fpm-0.8.1" && FPM_CFLAGS="-Os -arch x86_64" FPM_LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64" /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_fpm/fpm/work/fpm-0.8.1/install.sh 
DEBUG: system:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_fpm/fpm/work/fpm-0.8.1" && FPM_CFLAGS="-Os -arch x86_64" FPM_LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64" /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_fpm/fpm/work/fpm-0.8.1/install.sh 
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   280  100   280    0     0   1404      0 --:--:-- --:--:-- --:--:--  1465
Could not fetch the latest release from GitHub. Install curl or wget, and ensure network connectivity.
Command failed:  cd "/opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_fpm/fpm/work/fpm-0.8.1" && FPM_CFLAGS="-Os -arch x86_64" FPM_LDFLAGS="-L/opt/local/lib -Wl,-headerpad_max_install_names -arch x86_64" /opt/local/var/macports/build/_opt_bblocal_var_buildworker_ports_build_ports_devel_fpm/fpm/work/fpm-0.8.1/install.sh 
Exit code: 3
Error: Failed to build fpm: command execution failed

Example one: https://build.macports.org/builders/ports-10.15_x86_64-builder/builds/136455/steps/install-port/logs/stdio
Example two, right now: https://github.com/macports/macports-ports/actions/runs/4957808218/jobs/8869925225?pr=18637

At the same time another build bot worked fine with identical portfile: https://github.com/macports/macports-ports/actions/runs/4957808218/jobs/8869925080?pr=18637

Of course, curl is available, so configure script is lying.

Expected Behaviour

It should reliably work. Ideally the build should not depend on fetching anything.

Version of fpm

0.8.2

Platform and Architecture

macOS

Additional Information

Macports portfile: https://github.com/macports/macports-ports/blob/48985779d5951c826997e62b5e37a9c866c9db46/devel/fpm/Portfile

@barracuda156 barracuda156 added the bug Something isn't working label May 12, 2023
@perazz
Copy link
Contributor

perazz commented May 13, 2023

Had the same issue with the fpm CI on the macOS-11 images.
the script uses wget/curl to fetch the latest release tag from github. It only happens sometimes and on macOS11, which tells me there should be something specific to the github runner, probably with network connectivity.

actions/runner-images#4896

@barracuda156
Copy link
Contributor Author

I think there should be an option not to fetch anything and install exactly that version which is supposed to be installed, without smuggling in an update :)

@perazz
Copy link
Contributor

perazz commented May 13, 2023

Fpm is built with fpm, that’s why the installer downloads the latest available single-file source as a “bootstrapper” fpm. Maybe it would make sense to include such file into the next release repository directly, that would save the installer from having to download it. I don’t know what’s the thought from other @fortran-lang/admins

@barracuda156
Copy link
Contributor Author

Fpm is built with fpm

Hmm, how does it build for platforms for which binaries are not available? I have it built and working on Darwin PPC, and I am sure there are no pre-built binaries for it with upstream.

@barracuda156
Copy link
Contributor Author

It only happens sometimes and on macOS11

actions/runner-images#4896

By the way, no, it is not specific to macOS 11 (and yes, does not necessarily happen on macOS 11), see Macports logs here: https://ports.macports.org/port/fpm/details (notice which OS fail there).

barracuda156 added a commit to barracuda156/powerpc-ports that referenced this issue May 13, 2023
@perazz
Copy link
Contributor

perazz commented May 13, 2023

Fpm is built with fpm

Hmm, how does it build for platforms for which binaries are not available? I have it built and working on Darwin PPC, and I am sure there are no pre-built binaries for it with upstream.

First, the latest release (single-file version) is downloaded and built; then, it’s used to build the current version

@barracuda156
Copy link
Contributor Author

barracuda156 commented May 13, 2023

Fpm is built with fpm

Hmm, how does it build for platforms for which binaries are not available? I have it built and working on Darwin PPC, and I am sure there are no pre-built binaries for it with upstream.

First, the latest release (single-file version) is downloaded and built; then, it’s used to build the current version

Ah, yes, I remembered now.

@barracuda156
Copy link
Contributor Author

@perazz Possibly, it is recent updates to install.sh broken it – get_latest_release does not work reliably.
Like this is builds fine: https://github.com/macports/macports-ports/pull/18637/files

herbygillot pushed a commit to macports/macports-ports that referenced this issue May 14, 2023
@perazz
Copy link
Contributor

perazz commented May 15, 2023

Hopefully closed by #913.

@perazz perazz closed this as completed May 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants