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

Upgrade base to ubuntu 20.04 #34

Merged
merged 7 commits into from Mar 22, 2021
Merged

Conversation

asaaki
Copy link
Contributor

@asaaki asaaki commented Mar 19, 2021

The noninteractive env var had to be added since tzdata would try to ask for a region.
ADDs changed to COPYs as it is good practice in the docker community.

Also:

  • Remove fixed GCC_VER constraint (7.2.0 is not supported anymore)
  • Use rust musl make 0.9.9 (patch level update)
  • Use openssl 1.0.2u (last patch level update in the 1.0 line)

General compile erros for 32 bit ARMs

See the issues and discussion here:

HF targets

We need to add an CFLAGS env var for armv7-unknown-linux-musleabihf on
docker run to make the compiler happy.

Error was:

warning: cc1: error: '-mfloat-abi=hard': selected processor lacks an FPU

Can be fixed by using either of them:

export CFLAGS_armv7_unknown_linux_musleabihf='-mfpu=vfpv3-d16'
export CFLAGS_armv7_unknown_linux_musleabihf='-mfpu=neon'

References:

Per documentation I use vfpv3-d16 for the CI step here (labeled as the most common denominator).
In the end the user of this cross compiler tool needs to make the appropriate decision in their projects.

The noninteractive env var had to be added since tzdata would try to ask
for a region.
ADDs changed to COPYs as it is good practice in the docker community.

Also:
- Remove fixed GCC_VER constraint (7.2.0 is not supported anymore)
- Use rust musl make 0.9.9 (patch level update)
- Use openssl 1.0.2u (patch level update)
Since there is clean up at each step, there is not much overhead, but it
with debugging.

Also:
- Add LD=$TARGET-ld
  The HF targets seem to be happier with it.
- Organize env vars and dedupe hardcoded paths
We need to add an CFLAGS env var for armv7-unknown-linux-musleabihf on
docker run to make the compiler happy.

Error was:

```
warning: cc1: error: '-mfloat-abi=hard': selected processor lacks an FPU
```

Can be fixed by using either of them:
export CFLAGS_armv7_unknown_linux_musleabihf='-mfpu=vfpv3-d16'
export CFLAGS_armv7_unknown_linux_musleabihf='-mfpu=neon'

References:
- influxdata/flux#3379 (comment)
- https://wiki.debian.org/ArmHardFloatPort/VfpComparison#FPU

Per documentation I use "vfpv3-d16" for the CI step. In the end the user
this cross compiler tool needs to make the appropriate decision in their
projects.
On GitHub workflows this seems to be unreliable sometimes,
it randomly fails for some targets.
@messense
Copy link
Member

Thank you!

@messense messense merged commit d4bcc80 into rust-cross:master Mar 22, 2021
dani-garcia added a commit to dani-garcia/vaultwarden that referenced this pull request Mar 23, 2021
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.

None yet

2 participants