Skip to content

fix builds & update dependencies#589

Merged
damencho merged 7 commits intomasterfrom
fix-builds2
Nov 2, 2025
Merged

fix builds & update dependencies#589
damencho merged 7 commits intomasterfrom
fix-builds2

Conversation

@damencho
Copy link
Member

No description provided.

ibauersachs and others added 6 commits October 31, 2025 08:33
Changed the single string with spaces to a CMake list with separate quoted arguments. Now each flag will be passed as a separate argument to the compiler.

added -mmacosx-version-min=14.0 which tells the compiler to target macOS 14.0, making the CGWindowListCreateImage API available again. This sets the minimum deployment target to macOS 14.0, which is
  before the API was obsoleted in 15.0.

 - For ppc64el: Use the toolchain file directly (-DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN) and system libraries
  - For other architectures: Use vcpkg with the chainload toolchain file

 1. Debian bookworm arm64 - JNI header issue ✅
    - Added JAVA_HOME export and -DJAVA_HOME flag to debian/rules so CMake can properly find jni_md.h
  2. Linux ppc64el - vcpkg wrong architecture ✅
    - Modified resources/ubuntu-build-image/build-static.sh to use system libraries (USE_SYSTEM_OPUS/SPEEX/VPX=ON) for ppc64el instead of vcpkg, avoiding the cross-compilation issues
  3. macOS x86_64 - CGWindowListCreateImage obsolete error ✅
    - Added -Wno-unguarded-availability flag in addition to -Wno-deprecated-declarations in src/native/screencapture/CMakeLists.txt to suppress the "unavailable API" error

  1. deb-prepare.sh - Added qemu-user-static and binfmt-support packages, which enable running arm64/ppc64el binaries on amd64 through QEMU emulation
  2. deb-build.sh - Completely replaced cross-compilation with native builds:
    - Instead of mk-sbuild --arch=amd64 --target arm64 (cross-compilation), now using mk-sbuild --arch=arm64 (native with QEMU)
    - Removed all the complex multiarch repository configuration
    - Removed cross-compilation-specific sbuild flags (--host, --build, cross-resolvers, etc.)
    - Now using simple sbuild --arch=arm64 which builds natively in a QEMU-emulated chroot

I've added --chroot-setup-commands to disable the external solver in the actual build chroot that sbuild uses (which is a temporary copy). This should run before the dependency resolution happens and disable
  the sbuild-cross-resolver.

Completely rewrote the chroot's sources.list (lines 43-56) to have clean, non-duplicate repository configurations with proper architecture restrictions
  2. Removed all --extra-repository flags from sbuild commands (line 98-100) since the repositories are now properly configured in the chroot itself
  3. Simplified the sbuild command structure - now there's just one command for all non-amd64 architectures

1. Test if the packages can actually be installed with our repository configuration
  2. If they can, they'll already be present when sbuild tries to install them, bypassing the broken dependency resolver
  3. The || true means we'll see the actual error in the logs if it fails, but continue to let sbuild try anyway

Added --bd-uninstallable-explainer=none back to all cross-compilation sbuild commands. This should skip the dose3 dependency checking that was failing.

Added line 57 to remove the sbuild-cross-resolver apt config file from the chroot. This should prevent apt from trying to use the external resolver which keeps failing. With this removed, apt should use its
  internal dependency resolution with the properly configured repositories.

Changed both sbuildrc and deb-build.sh to use --build-dep-resolver=apt instead of aptitude. The apt resolver is simpler and doesn't require installing aptitude in the chroot, but with --resolve-alternatives
  it should still handle the build profile alternatives correctly.

 resources/deb-prepare.sh:31 - Re-added aptitude package installation (needed for the aptitude resolver)
  2. resources/sbuildrc:7 - Changed back to $build_dep_resolver = 'aptitude'; and added $resolve_alternatives = 1;
  3. resources/deb-build.sh:82,88,94,99 - Added explicit --build-dep-resolver=aptitude --resolve-alternatives flags to all sbuild commands to force aptitude resolver and enable alternative resolution

  1. Used single quotes around the repository line to prevent bash from interpreting the square brackets as glob patterns
  2. Split the variable expansion outside quotes: 'deb [arch=arm64,ppc64el] http://... '"${DIST}"' main universe'
  3. Added proper handling for i386 (falls through to the else case without extra repos since i386 packages are in the main Ubuntu archive)
  4. Inlined the sbuild commands to avoid array expansion issues

Fixed. Changed from a string variable to a bash array (EXTRA_REPO_ARGS=()) and used "${EXTRA_REPO_ARGS[@]}" expansion so each --extra-repository argument is properly quoted and passed as a single argument to
  sbuild.

1. resources/deb-build.sh:78-87 - Added --extra-repository flags to the sbuild command to explicitly configure the Ubuntu Ports repository (or Debian main repository) during the build, ensuring sbuild can
  fetch arm64/ppc64el packages from the correct source
  2. debian/control:11 - Fixed debhelper to use the build profile syntax so it's treated as a native (amd64) build tool during cross-compilation, matching the other build tools

1. Restrict main sources.list to amd64: Added sed commands to prepend [arch=amd64] to all repository entries in the main sources.list, preventing apt from trying to fetch arm64/ppc64el packages from
  archive.ubuntu.com
  2. Added Debian support: Added proper repository configuration for Debian distributions (bookworm, etc.) since Debian keeps arm64 packages in the main repository unlike Ubuntu

For arm64 and ppc64el on Ubuntu, packages are hosted on ports.ubuntu.com not the regular archives. I've added:

  deb [arch=arm64,ppc64el] http://ports.ubuntu.com/ubuntu-ports ${DIST} main universe
  deb [arch=arm64,ppc64el] http://ports.ubuntu.com/ubuntu-ports ${DIST}-updates main universe

  This tells apt where to find arm64/ppc64el packages.

This syntax:
  - Fixes amd64 builds (doesn't require :native qualifier)
  - Fixes cross-compilation (uses :native only when cross-compiling)
  - Keeps libraries unmarked (so they install for target arch)

 - Simplified mk-sbuild command
  - Added manual chroot configuration for multiarch support
  - Directly runs dpkg --add-architecture and apt-get update in the chroot

Simplified mk-sbuild to use --arch=amd64 --target="${ARCH}" which should automatically configure multiarch properly

Revert :native qualifiers from debian/control - breaks normal builds

Fixed cross-compilation Build-Depends by marking build tools as :native:
  - libtool:native, cmake:native, git:native, default-jdk:native - Must run on build arch (amd64)
  - Libraries remain unmarked - Will be installed for target arch (arm64/ppc64el)

1. Added crossbuild-essential-${ARCH} to debootstrap-include
    - This installs the cross-compilation toolchain during chroot creation
    - Provides essential packages like crossbuild-essential-arm64 that are needed for cross-compilation
  2. Explicitly add target architecture to chroot
  sudo schroot -c source:"${DIST}"-amd64-"${ARCH}" -u root -- dpkg --add-architecture "${ARCH}"
    - This ensures dpkg knows about the target architecture (arm64, ppc64el, etc.)
    - Allows apt to find and install packages for the target architecture
  3. Update the chroot after adding architecture
  sudo sbuild-update -udc "${DIST}"-amd64-"${ARCH}"
    - Refreshes the package lists so apt can see arm64/ppc64el packages

  This should fix the "but it is not going to be installed" errors because now:
  - The chroot will have multiarch support enabled
  - dpkg will know about the target architecture
  - apt will be able to find and install arm64/ppc64el versions of the build dependencies

Tries to fix deps problems when cross compiling.

  1. ✅ Debian dose-distcheck cross-compilation issue - using apt resolver directly
  2. ✅ Added --skip-proposed and explicit chroot configuration
  3. ✅ Added --build=amd64 --resolve-alternatives flags to sbuild

Revert "fix: Modified build-static.sh to use community triplets (community/ppc64le-linux and community/arm64-linux) instead of trying to use non-existent root triplets"

This reverts commit 3e784f7.

fix: Using aspcud instead of apt/dose for dependency resolution

fix: Modified build-static.sh to use community triplets (community/ppc64le-linux and community/arm64-linux) instead of trying to use non-existent root triplets

       The issue was that vcpkg was looking for ppc64le-linux.cmake and arm64-linux.cmake in the root triplets/ directory, but they only exist in triplets/community/. By modifying the build script to reference
       community/ppc64le-linux for these architectures, vcpkg will now find and use the correct triplet files, which should fix the linking errors where it was building x86_64 libraries instead of ppc64le.

squash: Fix apt errors and mac deprecation.
…h path and force portaudio to install to the expected lib/ directory.
Keeps bc as the one used by jvb.
@damencho damencho merged commit b4710e1 into master Nov 2, 2025
26 checks passed
fi
fi

# Create native chroot for the target architecture (using QEMU for emulation)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this the LLMs suggestion? I'm surprised this built, because when I wrote this originally the qemu builds were broken while installing Java and ca-certificates. It was also painfully slow to do anything at all, let alone produce a successful build...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, llm and this was the only successful build I managed to produce, was about to test it tomorrow.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tested few scenarios on a linux machine and seems everything works as expected. I will proceed with updating jigasi and testing it on meet.jit.si

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.

3 participants