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

Stockfish build error #123

Closed
ZTL-UwU opened this issue Apr 27, 2023 · 10 comments
Closed

Stockfish build error #123

ZTL-UwU opened this issue Apr 27, 2023 · 10 comments

Comments

@ZTL-UwU
Copy link
Contributor

ZTL-UwU commented Apr 27, 2023

It happened both shortly before and after 4755882.
Ubuntu 22.10, mobile is android 13.

I've tried deleting ~/.pub-cache and .dart_tool multiple times but it never worked.

err_log.txt
flutter doctor -v.txt

@veloce
Copy link
Contributor

veloce commented Apr 27, 2023

First you should fix your android toolchain. I see errors in flutter doctor.

@JayPi4c
Copy link

JayPi4c commented Apr 27, 2023

I experience the same issue on dd5b6dd.
flutter doctor -v returns
fluttor_doctor.txt
and the flutter run gives the following message:
err_log.txt

It's also on Ubuntu 22.10.
My guess is, that there is nothing wrong with flutter and the lichess app but rather missing/wrong development tools to build stockfish.

Especially stuff like

In file included from /home/jonas/snap/flutter/common/flutter/.pub-cache/git/dart-stockfish-274cf52e637e9a663d226ec31cc0b24e639cb615/ios/Stockfish/src/bitbase.cpp:23:
  In file included from /home/jonas/snap/flutter/common/flutter/.pub-cache/git/dart-stockfish-274cf52e637e9a663d226ec31cc0b24e639cb615/ios/Stockfish/src/bitboard.h:24:
  In file included from /home/jonas/snap/flutter/common/flutter/.pub-cache/git/dart-stockfish-274cf52e637e9a663d226ec31cc0b24e639cb615/ios/Stockfish/src/types.h:486:
  In file included from /home/jonas/snap/flutter/common/flutter/.pub-cache/git/dart-stockfish-274cf52e637e9a663d226ec31cc0b24e639cb615/ios/Stockfish/src/tune.h:22:
  /snap/flutter/current/usr/include/c++/9/memory:121:25: error: cast from pointer to smaller type 'uintptr_t' (aka 'unsigned int') loses information
    const auto __intptr = reinterpret_cast<uintptr_t>(__ptr);
                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1 error generated.
  

makes me wonder: Why is it building the ios files although I dont have any ios related devices. But maybe that's just a flutter thing.
I think the error lies in the casting which, as it states could result in information loss. This might have been just a warning with earlier cpp compilers. But maybe Ubuntu 22.10 ships with a cpp compiler that generates an error instead of a warning leading to a failing build.

I must admit that I am just guessing in the dark. I'm not familiar with flutter, cpp and the stockfish project.

@veloce
Copy link
Contributor

veloce commented Apr 28, 2023

I don't use ubuntu myself so don't really know what's going on. The CI who can build the app fine, also run on ubuntu, so that could be indeed missing development tools.

Perhaps the original authors of the stockfish plugin can help you? You can try to post the issue in this repo:
https://github.com/ArjanAswal/Stockfish

@veloce
Copy link
Contributor

veloce commented Apr 28, 2023

About why it builds iOS files: it's just because stockfish src is inside the ios folder.

@veloce
Copy link
Contributor

veloce commented Apr 28, 2023

Maybe one thing to try: install flutter manually (not using snapd).

@brandonpl8
Copy link
Contributor

Removed snapd installation of flutter and installed flutter manually. Stockfish builds fine now. ( Ubuntu 20.04 )

@veloce
Copy link
Contributor

veloce commented May 3, 2023

Good! Would be nice to write sth about it in the wiki.

Even better would be to understand why it doesn't work with snapd but at least there's workaround.

@JayPi4c
Copy link

JayPi4c commented May 3, 2023

I can confirm. Removing the snap installation and following the manual installation does solve the problem.
Also I tried building the stockfish plugin and I experienced the same issue. So I guess it would be right to post this issue on that repository and try to find out what's causing the bug with the snap installation in the first place.

@JayPi4c
Copy link

JayPi4c commented May 3, 2023

I took the liberty to update the wiki:
https://github.com/lichess-org/mobile/wiki/Setting-up-the-development-environment

I will also create an issue on the stockfish repository referencing this problem.

@veloce
Copy link
Contributor

veloce commented May 4, 2023

Thanks for updating the wiki! I'm closing the issue since there is a workaround and the issue is not really related to this repo.

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

No branches or pull requests

4 participants