Skip to content

cross fails to recompile build script correctly when there are project changes #1014

@hcldan

Description

@hcldan

Checklist

Describe your issue

My first compile works great. I'm having it use a custom build ubi7 image with rustup installed.
I need an older version of glibc to link against.

When I edit a file and try to re-build, I get an error that the build script can't run because I don't have the correct glibc version:

error: failed to run custom build command for `project v0.1.0 (/home/user/git/project)`

Caused by:
  process didn't exit successfully: `/target/debug/build/project-de133d924a686ebc/build-script-build` (exit status: 1)
  --- stderr
  /target/debug/build/project-de133d924a686ebc/build-script-build: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /target/debug/build/project-de133d924a686ebc/build-script-build)
  /target/debug/build/project-de133d924a686ebc/build-script-build: /lib64/libc.so.6: version `GLIBC_2.33' not found (required by /target/debug/build/project-de133d924a686ebc/build-script-build)
  /target/debug/build/project-de133d924a686ebc/build-script-build: /lib64/libc.so.6: version `GLIBC_2.18' not found (required by /target/debug/build/project-de133d924a686ebc/build-script-build)
  /target/debug/build/project-de133d924a686ebc/build-script-build: /lib64/libc.so.6: version `GLIBC_2.32' not found (required by /target/debug/build/project-de133d924a686ebc/build-script-build)
  /target/debug/build/project-de133d924a686ebc/build-script-build: /lib64/libc.so.6: version `GLIBC_2.34' not found (required by /target/debug/build/project-de133d924a686ebc/build-script-build)

I am doing this in WSL2(Ubuntu) in Windows 11

So it looks to me like something saw I needed to recompile stuff, re-compiled my build.rs on the host machine, and then tries to run it in the docker container.

What target(s) are you cross-compiling for?

x86_64-unknown-linux-gnu

Which operating system is the host (e.g computer cross is on) running?

  • macOS
  • Windows
  • Linux / BSD
  • other OS (specify in description)

What architecture is the host?

  • x86_64 / AMD64
  • arm32
  • arm64 (including Mac M1)

What container engine is cross using?

  • docker
  • podman
  • other container engine (specify in description)

cross version

cross 0.2.4 (8d8d84b 2022-09-08)

Example

No response

Additional information / notes

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions