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

Copy command fails on mounted drives under Linux #7966

Open
1 task done
StefanCosminR opened this issue Sep 17, 2024 · 0 comments
Open
1 task done

Copy command fails on mounted drives under Linux #7966

StefanCosminR opened this issue Sep 17, 2024 · 0 comments
Labels

Comments

@StefanCosminR
Copy link

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI. The description text must include reproduction steps with either of command-line SwiftPM commands, swift build, swift test, swift package etc.

Description

I have a shared folder between MacOS and Ubuntu 22.04 under Parallels. The folder appears as a mounted drive in Ubuntu. If the package has a resource with copy command, the build fails. Copying the project to a folder local to Ubuntu, such as /home, the build succeeds.

Expected behavior

I expect the build to succeed.

Actual behavior

The build fails with a hard to debug error.

Building for debugging...
error: Error Domain=NSCocoaErrorDomain Code=512 "(null)"
[0/6] Write swift-version-3FF9193799887F46.txt

Steps to reproduce

  1. Under MacOS, create an empty folder.
  2. Run: swift package init --type executable
  3. Create a file under Sources
  4. Add the file as a resource to the target (example at the end)
  5. Create an Ubuntu VM under Parallels (Maybe it can be reproduced on a real machine with a mounted drive, but I don't have that kind of setup to test on)
  6. Go to VM settings > Sharing > Share custom Mac folders with Linux > Select the previously create folder
  7. Under Ubuntu, with Swift 6.0, run swift build on the shared folder
// swift-tools-version: 6.0
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "CopyFileBug",
    targets: [
        // Targets are the basic building blocks of a package, defining a module or a test suite.
        // Targets can depend on other targets in this package and products from dependencies.
        .executableTarget(
            name: "CopyFileBug",
            resources: [
                .copy("test.txt")
            ]
        ),
    ]
)

Swift Package Manager version/commit hash

Swift Package Manager - Swift 6.0.0-dev

Swift & OS version (output of swift --version ; uname -a)

Swift version 6.0 (swift-6.0-RELEASE)
Target: aarch64-unknown-linux-gnu
Linux ubuntu-linux-22-04-02-desktop 5.15.0-76-generic #83-Ubuntu SMP Thu Jun 15 19:21:56 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux

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

No branches or pull requests

1 participant