Suwayomi / Tachidesk-Sorayomi

A free and open source manga reader app to read manga from a Tachidesk-Server instance.
https://suwayomi.github.io/Tachidesk-Sorayomi/
Mozilla Public License 2.0
821 stars 62 forks source link

0.2.0 flutter dependency resolution fails #61

Closed Bitals closed 2 years ago

Bitals commented 2 years ago

Describe the bug I am trying to build 0.2.0 on Arch. I tried to use both flutter and flutter-beta, neither succeeds.

To Reproduce PKGBUILD:

pkgname=tachidesk-sorayomi
__pkgname="$pkgname"
__PkgName="$(echo "$__pkgname" | sed -e "s/\b./\u\0/g")"
__binname="$(echo "$__pkgname" | tr - _)"
pkgver=0.2.0
pkgrel=1
pkgdesc='A free and open source manga reader to read manga from a Tachidesk-Server instance'
arch=('x86_64')
url="https://github.com/Suwayomi/$__PkgName"
license=('MPL2')
depends=('zenity')
optdepends=('tachidesk-server')
makedepends=_('flutter')/('flutter-beta')_
source=("$url/archive/refs/tags/$pkgver.tar.gz")
sha256sums=('87fbe79777accb71c7d67792f1efb0f5d8cbf31fdd530b5679646861b35ff1e0')

build() {
    cd "$__PkgName-$pkgver/"
    flutter config --enable-linux-desktop
    flutter pub get
    flutter build linux --release
}

Expected behavior Build succeeds.

Logs flutter (2.10.4-1):

ERR : Because every version of flutter_test from sdk depends on path 1.8.0 and tachidesk_sorayomi depends on path ^1.8.1, flutter_test from sdk is forbidden.
So, because tachidesk_sorayomi depends on flutter_test from sdk, version solving failed.

flutter-beta (2.13.0_0.1.pre-2):

ERR : Because scrollable_positioned_list 0.2.3 requires Flutter SDK version >=1.13.8 and no versions of scrollable_positioned_list match >0.2.3 <0.3.0, scrollable_positioned_list ^0.2.3 is forbidden.
So, because tachidesk_sorayomi depends on scrollable_positioned_list ^0.2.3, version solving failed.

Build environment

DattatreyaReddy commented 2 years ago

Sorry, @Bitals I wasn't able to reproduce your error. but if you want to try then can you change depends in PKGBUILD to:

depends=('zenity' 'cmake' 'ninja')

CMake and ninja are required to build flutter apps in Linux.

If you face an error even after that maybe we need to wait for an update to the scrollable_positioned_list package.

Until then you can install Tachidesk-Sorayomi-bin.

DattatreyaReddy commented 2 years ago

Can you share me your output for

flutter doctor
Bitals commented 2 years ago

Can you share me your output for

flutter doctor

flutter-beta:

15:02:09 [✓] Flutter (Channel unknown, 0.0.0-unknown, on Arch Linux 5.10.0-13-amd64, locale en_US.UTF-8)
15:02:09 [✗] Android toolchain - develop for Android devices
15:02:09     ✗ Unable to locate Android SDK.
15:02:09       Install Android Studio from: https://developer.android.com/studio/index.html
15:02:09       On first launch it will assist you in installing the Android SDK components.
15:02:09       (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
15:02:09       If the Android SDK has been installed to a custom location, please use
15:02:09       `flutter config --android-sdk` to update to that location.
15:02:09 
15:02:09 [✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
15:02:09     ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
15:02:09 [!] Android Studio (not installed)
15:02:09 [!] Connected device
15:02:09     ! No devices available
15:02:11 [✓] HTTP Host Availability
15:02:11 
15:02:11 ! Doctor found issues in 4 categories.
DattatreyaReddy commented 2 years ago
 channel unknown and version 0.0.0-unknown

May be the reason for error. Cause scrollable_positioned_list have an explicit condition to check for flutter SDK >1.13

Bitals commented 2 years ago

May be the reason for error.

Yes, I mentioned that on the AUR page, but I have no experience with Flutter and I am not sure if that's the normal way flutter-beta reports its version number, or if it's a problem with the AUR package.

DattatreyaReddy commented 2 years ago

Then do you need to build it?. You can directly install it using Tachidesk-Sorayomi-bin

DattatreyaReddy commented 2 years ago

its the binary version and don't need flutter or cmake

Bitals commented 2 years ago

Then do you need to build it?.

I don't need to, but I want to. I am using the -bin package now.

DattatreyaReddy commented 2 years ago

Can you share me your output for

flutter doctor

flutter-beta:

15:02:09 [✓] Flutter (Channel unknown, 0.0.0-unknown, on Arch Linux 5.10.0-13-amd64, locale en_US.UTF-8)
15:02:09 [✗] Android toolchain - develop for Android devices
15:02:09     ✗ Unable to locate Android SDK.
15:02:09       Install Android Studio from: https://developer.android.com/studio/index.html
15:02:09       On first launch it will assist you in installing the Android SDK components.
15:02:09       (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
15:02:09       If the Android SDK has been installed to a custom location, please use
15:02:09       `flutter config --android-sdk` to update to that location.
15:02:09 
15:02:09 [✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
15:02:09     ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.
15:02:09 [!] Android Studio (not installed)
15:02:09 [!] Connected device
15:02:09     ! No devices available
15:02:11 [✓] HTTP Host Availability
15:02:11 
15:02:11 ! Doctor found issues in 4 categories.

This is something that need research. Don't have any idea about it. Also, I'm new to Flutter 😅

Bitals commented 2 years ago

Seems like flutter uses git under the hood to find out its own version, and git didn't like that /opt/flutter was owned by root. So in addition to adding yourself to flutterusers group one also needs to run

git config --global --add safe.directory /opt/flutter

after installing flutter-beta, or just build as root (not the best idea).

And clang needs to me mentioned as a make-dependency too, my docker environment didn't have it and failed. Though clang is just the default for cmake with standard config, I guess llvm or other C/C++ compiler should be fine. Not sure if PKGBUILD supports multiple options for dependencies and if it's not a cmake problem.

All good after that anyway.