Project

General

Profile

Actions

Emulator Issues #13227

closed

compile fail: GBACore.cpp desiredVideoDimensions is now currentVideoSize external mgba core.h

Added by noabody over 1 year ago. Updated over 1 year ago.

Status:
Won't fix
Priority:
Normal
Assignee:
-
% Done:

0%

Operating system:
N/A
Issue type:
Bug
Milestone:
Regression:
No
Relates to usability:
No
Relates to performance:
No
Easy:
No
Relates to maintainability:
No
Regression start:
Fixed in:

Description

What's the problem? Describe what went wrong.

Arch Linux build - dolphin-emu-git: yay -S dolphin-emu-git compile fails.

error: ‘struct mCore’ has no member named ‘desiredVideoDimensions’
  308 |   m_core->desiredVideoDimensions(m_core, &info.width, &info.height);

This is due to external module mgba and commit where the function was split into baseVideoSize and currentVideoSize

While it is true that .gitmodules points to commit which retains this function call, Arch's PKGBUILD system uses libmgba which, if built from mgba-git, will contain the latest includes without the function.

With a modified PKGBUILD, that inits the submodule, it also pulls the latest includes. It is possible that a recursive init would bypass the issue. Eventually dolphin-emu will need to adopt the current functions from mgba so I'm reporting this to dolphin-emu upstream as a bug/feature request.

Actions #1

Updated by noabody over 1 year ago

Here is my custom PKGBUILD. It is for personal use only. Notice that mgba has been specified as a source pointing to the correct commit that matches current dolphin-emu. When it init the submodule this way, the build works properly.

So we can either retool the Arch package or dolphin-emu:

# Maintainer: Noa Body <noabody@archlinux.org>

pkgbase=dolphin-emu
pkgname=("$pkgbase")
pkgver=5.0.r17746.8efd7833e5
pkgrel=1
epoch=1
pkgdesc='A GameCube/Wii emulator'
arch=(x86_64)
url=http://www.dolphin-emu.org
license=(GPL2)
depends=(
  alsa-lib bluez-libs enet ffmpeg fmt hidapi libevdev
  libgl libpng libxi libxrandr lzo miniupnpc mbedtls
  pugixml qt6-base sfml xxhash zlib
)
makedepends=(cmake git libglvnd python)
optdepends=('pulseaudio: PulseAudio backend')
options=(!emptydirs)
source=("$pkgbase"::git+https://github.com/"$pkgbase"/dolphin.git
        git+https://github.com/mozilla/cubeb.git
        gtest::git+https://github.com/google/googletest.git
        git+https://github.com/epezent/implot.git
        git+https://github.com/randy408/libspng.git
        mgba::git+https://github.com/mgba-emu/mgba.git#commit=89f8873
        git+https://github.com/KhronosGroup/SPIRV-Cross.git
        git+https://github.com/GPUOpen-LibrariesAndSDKs/VulkanMemoryAllocator.git
        git+https://github.com/zlib-ng/zlib-ng.git)
sha256sums=('SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP'
            'SKIP')

pkgver() {
  cd "$pkgbase"
  git describe | sed 's/-/.r/; s/-g/./'
#  printf "%s.r%s.g%s" 5.1 "$(git rev-list "$(git rev-list --tags --no-walk --max-count=1)"..HEAD --count)" "$(git rev-parse --short HEAD)"
}

prepare() {
  test ! -d "build" || rm -rf build
  cd "$pkgbase"
  for _mod in Externals/cubeb/cubeb~cubeb Externals/gtest~gtest Externals/implot/implot~implot Externals/libspng/libspng~libspng Externals/mGBA/mgba~mgba Externals/spirv_cross/SPIRV-Cross~SPIRV-Cross Externals/VulkanMemoryAllocator~VulkanMemoryAllocator Externals/zlib-ng/zlib-ng~zlib-ng ; do
    git submodule init "${_mod%~*}"
    git config submodule."${_mod%~*}".url "$srcdir"/"${_mod#*~}"
    git -c protocol.file.allow=always submodule update "${_mod%~*}"
  done
  export GITHEAD="$startdir/$pkgbase"
  perl -pi -e 's|(WORKING_DIRECTORY.+?\$)\{PROJECT_SOURCE_DIR(.*GIT_EXECUTABLE.*rev-parse --abbrev-ref HEAD)|\1ENV{GITHEAD\2|gi ; s| --dirty||gi' CMakeLists.txt
}

build() {
  cmake -S "$pkgbase" -B build \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=/usr/lib \
    -DCMAKE_CXX_FLAGS="${CXXFLAGS} -fpermissive" \
    -DENABLE_QT=TRUE \
    -DUSE_SHARED_ENET=TRUE \
    -DXXHASH_FOUND=TRUE
  cmake --build build -j$(nproc)
}

package_dolphin-emu() {
  provides=("$pkgname")
  replaces=("$pkgname"-git)
  conflicts=("$pkgname"-git)

  DESTDIR="$pkgdir" cmake --build build --target install
  rm -f "$pkgdir"/usr/bin/"$pkgname"-nogui
  rm -rf "$pkgdir"/usr/{include,lib/libdiscord-rpc.a,share/man/man6/"$pkgname"-nogui.6}

  install -Dm 644 "$pkgname"/Data/51-usb-device.rules -t "$pkgdir"/usr/lib/udev/rules.d/
}

package_dolphin-emu-nogui() {
  pkgdesc="$pkgdesc - no GUI"
  depends=("$pkgbase" fmt xxhash)
  provides=("$pkgbase"-cli "$pkgname")
  conflicts=("$pkgbase"-cli "$pkgname")

  install -dm 755 "$pkgdir"/usr/{bin,share/man/man6}
  install -m 755 build/Binaries/"$pkgname" "$pkgdir"/usr/bin/
  ln -rsf "$pkgdir"/usr/bin/"$pkgname" "$pkgdir"/usr/bin/"$pkgbase"-cli
  install -Dm 644 "$pkgbase"/Data/"$pkgname".6 "$pkgdir"/usr/share/man/man6/"$pkgname".6
}
Actions #2

Updated by delroth over 1 year ago

  • Status changed from New to Won't fix

We only test builds against the versions of our dependencies we pin to in our Externals directory, sorry. We might update at some point, I don't think there's a reason not to. (in fact, if you do want to, please feel free to send a PR to bump that dependency version)

In the absence of a PR, please bug the distro maintainer who made your package, not us. We're not responsible for the changes they made to our project.

Actions #3

Updated by noabody over 1 year ago

Scratch that, it does pull the correct version into dolphin-emu but then we have to override the mgba include path in GBACore.h which reads #include <mgba/core/core.h>.

That will always pull the system version of core.h, rather than embedded.

Actions #4

Updated by noabody over 1 year ago

Okay, thanks.

Actions #5

Updated by AdmiralCurtiss over 1 year ago

Our mGBA externals has been updated, FYI.

Actions

Also available in: Atom PDF