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

[libvpx] Build error on arm64-linux. Dependency on the diff utility via absolute path. #44284

Open
Smooth-E opened this issue Mar 10, 2025 · 2 comments
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team.

Comments

@Smooth-E
Copy link

Hello! I am working on building the rustdesk remote desktop client for the Aurora OS. The build environment is the Scratchbox2 instance running an aarch64 target with a relatively small rpm-based distro. The problem is that the diff command in this target resolves into calling the BusyBox multicall binary, which has no --version flag. Here is the output of diff:

BusyBox v1.34.1 (2024-10-04 12:28:46 UTC) multi-call binary.

Usage: diff [-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2

Compare files line by line and output the differences between them.
This implementation supports unified diffs only.

	-a	Treat all files as text
	-b	Ignore changes in the amount of whitespace
	-B	Ignore changes whose lines are all blank
	-d	Try hard to find a smaller set of changes
	-i	Ignore case differences
	-L	Use LABEL instead of the filename in the unified header
	-N	Treat absent files as empty
	-q	Output only whether files differ
	-r	Recurse
	-S	Start with FILE when comparing directories
	-T	Make tabs line up by prefixing a tab when necessary
	-s	Report when two files are the same
	-t	Expand tabs to spaces in output
	-U	Output LINES lines of context
	-w	Ignore all whitespace

As you can see from the log files way below, the port build complains that there is no diff utility installed and the error log shows the message above. Strangely, even if I replace the diff binary at /usr/bin of the sb2 target, calling either /usr/bin/diff or just diff still calls the multicall bin, and not the replacement (GNU diffutils from OenSUSE Leap for ARM, for example). However, if I put the same Suse binary into project/diff/ for example, and then add it to the $PATH, calling diff will resolve into calling the normal diff utility. But, even with the path variable set, doing vcpkg install results into the error described below.

Exact command ran:

vcpkg install --triplet arm64-linux-release --x-install-root="$VCPKG_ROOT/installed"

You can read more about Aurora OS and their build system here:
https://developer.auroraos.ru/

Autogenerated report

Package: libvpx:[email protected]

Host Environment

  • Host: arm64-linux
  • Compiler: GNU 12.3.1
  • vcpkg-tool version: 2999-12-31-unknownhash
    vcpkg-scripts version: 3002390 2025-03-07 (2 days ago)

To Reproduce

vcpkg install

Failure logs

-- Using cached webmproject-libvpx-v1.15.0.tar.gz
-- Cleaning sources at /home/smooth-e/aurora-apps/aurora-rustdesk/vcpkg/buildtrees/libvpx/src/v1.15.0-48cccbf046.clean. Use --editable to skip cleaning for the packages you specify.
-- Extracting source /home/smooth-e/aurora-apps/aurora-rustdesk/vcpkg/downloads/webmproject-libvpx-v1.15.0.tar.gz
-- Applying patch 0002-Fix-nasm-debug-format-flag.patch
-- Applying patch 0003-add-uwp-v142-and-v143-support.patch
-- Applying patch 0004-remove-library-suffixes.patch
-- Using source at /home/smooth-e/aurora-apps/aurora-rustdesk/vcpkg/buildtrees/libvpx/src/v1.15.0-48cccbf046.clean
-- Getting CMake variables for arm64-linux
-- Build info. Target: arm64-linux-gcc; Options: --disable-examples --disable-tools --disable-docs --disable-unit-tests --enable-pic --enable-static --disable-shared
-- Configuring libvpx for Release
CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: /usr/bin/bash --noprofile --norc /home/smooth-e/aurora-apps/aurora-rustdesk/vcpkg/buildtrees/libvpx/src/v1.15.0-48cccbf046.clean/configure --target=arm64-linux-gcc "--disable-examples --disable-tools --disable-docs --disable-unit-tests --enable-pic --enable-static --disable-shared" --prefix=/home/smooth-e/aurora-apps/aurora-rustdesk/vcpkg/packages/libvpx_arm64-linux --as=nasm
    Working Directory: /home/smooth-e/aurora-apps/aurora-rustdesk/vcpkg/buildtrees/libvpx/arm64-linux-rel
    Error code: 1
    See logs for more information:
      /home/smooth-e/aurora-apps/aurora-rustdesk/vcpkg/buildtrees/libvpx/configure-arm64-linux-rel-out.log
      /home/smooth-e/aurora-apps/aurora-rustdesk/vcpkg/buildtrees/libvpx/configure-arm64-linux-rel-err.log

Call Stack (most recent call first):
  /home/smooth-e/aurora-apps/aurora-rustdesk/rustdesk/res/vcpkg/libvpx/portfile.cmake:234 (vcpkg_execute_required_process)
  scripts/ports.cmake:196 (include)



/home/smooth-e/aurora-apps/aurora-rustdesk/vcpkg/buildtrees/libvpx/configure-arm64-linux-rel-out.log
diff missing: Try installing diffutils via your package manager.

Configuration failed. This could reflect a misconfiguration of your
toolchains, improper options selected, or another problem. If you
don't see any useful error messages above, the next step is to look
at the configure error log file (config.log) to determine what
configure was trying to do when it died.
/home/smooth-e/aurora-apps/aurora-rustdesk/vcpkg/buildtrees/libvpx/configure-arm64-linux-rel-err.log
diff: unrecognized option '--version'
BusyBox v1.34.1 (2024-10-04 12:28:46 UTC) multi-call binary.

Usage: diff [-abBdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2

Compare files line by line and output the differences between them.
This implementation supports unified diffs only.

	-a	Treat all files as text
	-b	Ignore changes in the amount of whitespace
	-B	Ignore changes whose lines are all blank
	-d	Try hard to find a smaller set of changes
	-i	Ignore case differences
	-L	Use LABEL instead of the filename in the unified header
	-N	Treat absent files as empty
	-q	Output only whether files differ
	-r	Recurse
	-S	Start with FILE when comparing directories
	-T	Make tabs line up by prefixing a tab when necessary
	-s	Report when two files are the same
	-t	Expand tabs to spaces in output
	-U	Output LINES lines of context
	-w	Ignore all whitespace

Additional context

vcpkg.json
{
  "dependencies": [
    {
      "name": "aom",
      "host": true
    },
    {
      "name": "aom",
      "host": false
    },
    {
      "name": "cpu-features",
      "platform": "android"
    },
    {
      "name": "libjpeg-turbo",
      "host": true
    },
    {
      "name": "libjpeg-turbo",
      "host": false
    },
    {
      "name": "oboe",
      "platform": "android"
    },
    {
      "name": "opus",
      "host": true
    },
    {
      "name": "opus",
      "host": false
    },
    {
      "name": "libvpx",
      "host": true
    },
    {
      "name": "libvpx",
      "host": false
    },
    {
      "name": "libyuv",
      "host": true
    },
    {
      "name": "libyuv",
      "host": false
    },
    {
      "name": "ffmpeg",
      "host": true,
      "features": [
        {
          "name": "amf",
          "platform": "((windows | linux) & static)"
        },
        {
          "name": "nvcodec",
          "platform": "((windows | linux) & static)"
        },
        {
          "name": "qsv",
          "platform": "(windows & static)"
        }
      ],
      "platform": "((windows | (linux & !arm32) | osx) & static)"
    },
    {
      "name": "ffmpeg",
      "host": false,
      "platform": "((android | ios | (linux & arm32)) & static)"
    }
  ],
  "vcpkg-configuration": {
    "default-registry": {
      "kind": "builtin",
      "baseline": "f7423ee180c4b7f40d43402c2feb3859161ef625"
    },
    "overlay-ports": [
      "./res/vcpkg"
    ]
  },
  "overrides": [
    {
      "name": "ffnvcodec",
      "version": "12.1.14.0"
    },
    {
      "name": "amd-amf",
      "version": "1.4.35"
    },
    {
      "name": "mfx-dispatch",
      "version": "1.35.1"
    }
  ]
}

@Mengna-Li Mengna-Li added requires:repro The issue is not currently repro-able category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team. and removed requires:repro The issue is not currently repro-able labels Mar 10, 2025
@Mengna-Li Mengna-Li removed their assignment Mar 11, 2025
@Mengna-Li
Copy link
Contributor

I'm not able to repro on x64-linux.

@Smooth-E
Copy link
Author

@Mengna-Li here's how to reproduce on x64-linux. I was using Linux Mint Xia, but I think it does not really matter.

  1. Backup your original diff executable:
cp /usr/bin/diff ~/real-diff/diff
  1. Create a script that would raise an error and print some text. Here's an example:
#!/bin/bash

# This script prints some text into stderr and exits
echo "Error raiser V1.0" >&2
echo "Consult your brain, should you have any questions." >&2
exit 1
  1. Make this script an executable, then link it to /usr/bin/diff:
sudo ln ./my-script.sh /urs/bin/diff --force
  1. Check if it works as intended: now when you execute diff, it will call the script instead. This reproduces the BusyBox multicall bin problem I described in the issue.

  2. Add the original diff binary to the path.

# Trace back through the comment to see that 
# we put the original diff bin into ~/real-diff
export PATH=$HOME/real-diff:$PATH
  1. Check if it works as intended: now if you call diff it will execute the original "working" diff executable at ~/real-diff.

  2. Create an empty vcpkg project, add the libvpx port

mkdir ~/my-app && cd ~/my-app
vcpkg new --name my-app --version 1.0
vcpkg add port libvpx
  1. Try building the project dependencies
vcpkg install

The outcome

Here's the log I got:

CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:127 (message):
    Command failed: /usr/bin/bash --noprofile --norc /home/smooth-e/fun/vcpkg/buildtrees/libvpx/src/v1.13.1-e2ef06ab13.clean/configure --target=x86_64-linux-gcc "--disable-examples --disable-tools --disable-docs --disable-unit-tests --enable-pic --enable-static --disable-shared" --prefix=/home/smooth-e/fun/vcpkg/packages/libvpx_x64-linux --as=nasm
    Working Directory: /home/smooth-e/fun/vcpkg/buildtrees/libvpx/x64-linux-rel
    Error code: 1
    See logs for more information:
      /home/smooth-e/fun/vcpkg/buildtrees/libvpx/configure-x64-linux-rel-out.log
      /home/smooth-e/fun/vcpkg/buildtrees/libvpx/configure-x64-linux-rel-err.log

Call Stack (most recent call first):
  /home/smooth-e/.cache/vcpkg/registries/git-trees/51aa3269c3e4839a7c789ba5e7f25e653ef65b27/portfile.cmake:237 (vcpkg_execute_required_process)
  scripts/ports.cmake:203 (include)

/home/smooth-e/fun/vcpkg/buildtrees/libvpx/configure-x64-linux-rel-out.log:

diff missing: Try installing diffutils via your package manager.

Configuration failed. This could reflect a misconfiguration of your
toolchains, improper options selected, or another problem. If you
don't see any useful error messages above, the next step is to look
at the configure error log file (config.log) to determine what
configure was trying to do when it died.

/home/smooth-e/fun/vcpkg/buildtrees/libvpx/configure-x64-linux-rel-err.log:

Error raiser V1.0
Consult your brain, should you have any questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:community-triplet A PR or issue related to community triplets not officially validated by the vcpkg team.
Projects
None yet
Development

No branches or pull requests

2 participants