BlitterStudio / amiberry

Optimized Amiga emulator for Linux/macOS
https://amiberry.com
GNU General Public License v3.0
661 stars 89 forks source link

Makefile Error with libfloppybridge.so #1339

Closed Chandler-Kluser closed 5 months ago

Chandler-Kluser commented 5 months ago

Bug Description

Cannot build Amiberry v5.7.1

Bug Reproductions Steps

Steps to reproduce the behavior:

  1. In a Arch Linux based distribution, run makepkg -si with this PKGBUILD file:
pkgname=amiberry
pkgver=5.7.1
pkgrel=1
epoch=20240603
pkgdesc="Amiga Emulator for ARM Boards (amd64 build)"
arch=('x86_64')
url="https://github.com/BlitterStudio/amiberry"
license=('GPL3')
depends=('flac' 'sdl2' 'sdl2_image' 'sdl2_ttf' 'mpg123' 'libmpeg2' 'libserialport' 'portmidi')
makedepends=('glibc' 'git' 'cmake')
provides=("amiberry=${pkgver}")
conflicts=('amiberry')
source=(https://github.com/BlitterStudio/amiberry/archive/refs/tags/v${pkgver}.tar.gz)
md5sums=('a5fbd5939cea104aebe5e8adf56d6666')
sha256sums=('af492717f536e59e5daa582ba4f5212b550500b8a2d4e0a7d0b93c5c418f0928')

build() {
  cd ${pkgname}-${pkgver}
  PLATFORM=x86-64 cmake .
  make
}
package() {
}
  1. See error:
Error copying file "/home/chandler/amiberry/src/amiberry-5.7.1/external/floppybridge/libfloppybridge.so" to "../../../plugins/".
make[2]: *** [external/floppybridge/CMakeFiles/floppybridge.dir/build.make:274: external/floppybridge/libfloppybridge.so] Error 1
make[2]: *** Deleting file 'external/floppybridge/libfloppybridge.so'
make[1]: *** [CMakeFiles/Makefile2:189: external/floppybridge/CMakeFiles/floppybridge.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Expected Behavior

The src/amiberry-5.7.1/CMakeFiles/Makefile2 (in line 189) should make a rule in file src/amiberry-5.7.1/external/floppybridge/CMakeFiles/floppybridge.dir/build.make (automatically generated, in line 274) based in an absolute path instead of a relative path:

(...)
cd /home/chandler/amiberry/src/amiberry-5.7.1/external/floppybridge && /usr/bin/cmake -E copy /home/chandler/amiberry/src/amiberry-5.7.1/external/floppybridge/libfloppybridge.so ../../../plugins/
(...)

OBS: It happens only in v5.7.1 release.

Suggestion

Make a script that generates a src/amiberry-5.7.1/CMakeFiles/Makefile2 rule that works with absolute path instead.

Desktop

Love Amiberry? Please consider supporting it: 👉 https://ko-fi.com/midwan

solskogen commented 5 months ago

5.7.1 is not recommended for amd64/x86-64, 6.3.1 (preview) is. But even in preview there's a bug for Cmake. You can switch to using just make instead, the bug is not present there.

midwan commented 5 months ago

This should be fixed now