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

Allow toggling CRe's new dithering & scaling #888

Merged
merged 114 commits into from
Apr 18, 2019
Merged

Conversation

NiLuJe
Copy link
Member

@NiLuJe NiLuJe commented Apr 14, 2019

Plus, implement said dithering in our own BB code, for ImageWidget

Requires koreader/crengine#282

@NiLuJe
Copy link
Member Author

NiLuJe commented Apr 15, 2019

Oh, joy, even GCC 5.4 defaults to gnu++98 -_-"

# Anything below GCC 6 gets to be forcefully switched to decent standards...
# NOTE: We're also assuming Clang >= 3.2, but that should more or less hold true on our end.
# Anything below GCC 6 gets to be forcefully switched to decent standards, because some of our deps require C11 & C++11 support.
# NOTE: Technically, this also means we require Clang >= 3.2, but that should more or less hold true on our end, because that's truly ancient.
Copy link
Member

Choose a reason for hiding this comment

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

I don't think older than Clang 5 realistically occurs for us in any scenario.

Copy link
Member Author

@NiLuJe NiLuJe Apr 15, 2019

Choose a reason for hiding this comment

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

Yeah, that's what I thought. Even the Travis mention a few lines before mentions 3.4, and that's already an old comment, for an old Travis image ;).

Let's see PB's GCC choke on C11/C++11...
Here's hoping that'll do the trick even on PB...
(IIRC, GCC 6.0 never came out, so, eh).
It's calling CXX w/ CFLAGS, which is braindead on all kinds of levels.
@@ -62,7 +62,7 @@ set(PATCH_CMD1 sh -c "patch -N -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/openssl-1.1.0j-
set(PATCH_CMD2 sh -c "patch -N -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/openssl-1.1.1b-CVE-2019-1543.patch || true")
set(PATCH_CMD3 sh -c "patch -N -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/openssl-origin-rpath.patch || true")
# GCC 4.9's <stdatomic.h> is broken (c.f., https://github.com/pytorch/pytorch/issues/3050)
if($ENV{SONY_PRSTUX})
if($ENV{SONY_PRSTUX} OR $ENV{ANDROID})
Copy link
Member

Choose a reason for hiding this comment

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

PS With your switch to OpenSSL 1.1.1 you probably just took the main (minor) obstacle to Android Clang out of the way.

Copy link
Member Author

Choose a reason for hiding this comment

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

\o/

@NiLuJe
Copy link
Member Author

NiLuJe commented Apr 18, 2019

Crap, I added a dash to skip-ci. It's [skip ci]. -_-". IT WAS GREEN. I SWEAR! :D

set(PATCH_CMD2 sh -c "patch -N -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/openssl-1.1.1b-CVE-2019-1543.patch || true")
set(PATCH_CMD3 sh -c "patch -N -p1 < ${CMAKE_CURRENT_SOURCE_DIR}/openssl-origin-rpath.patch || true")
# GCC 4.9's <stdatomic.h> is broken (c.f., https://github.com/pytorch/pytorch/issues/3050)
if(DEFINED ENV{SONY_PRSTUX} OR DEFINED ENV{ANDROID})
Copy link
Member

Choose a reason for hiding this comment

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

So something like ANDROID and "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU"

Copy link
Member Author

@NiLuJe NiLuJe Apr 18, 2019

Choose a reason for hiding this comment

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

That's assuming the configure script manages to pick up Clang properly (c.f. the Android branch on top with a CC=gcc to avoid it spazzing out because of ccache and our hacked CC with appended -static-libstdc++) ;o).

Copy link
Member Author

@NiLuJe NiLuJe Apr 18, 2019

Choose a reason for hiding this comment

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

But, yeah, that patch would probably not behave on Clang as it's using GCC internal builtins ^^.

@NiLuJe NiLuJe merged commit b6b6d74 into koreader:master Apr 18, 2019
@Frenzie
Copy link
Member

Frenzie commented Apr 20, 2019

@NiLuJe There's a new error message since this commit. Not sure if it's harmless?

ccache: error: Could not find compiler "arm-linux-androideabi-gcc" in PATH

ccache: error: Could not find compiler "arm-linux-androideabi-gcc" in PATH

ccache: error: Could not find compiler "arm-linux-androideabi-gcc" in PATH

@NiLuJe
Copy link
Member Author

NiLuJe commented Apr 20, 2019 via email

@Frenzie
Copy link
Member

Frenzie commented Apr 20, 2019

At every point?

@Frenzie
Copy link
Member

Frenzie commented Apr 20, 2019

It's clang up until the point where /usr/bin/ccache clang doesn't equal clang (due to that change), so it's switched to gcc.

@Frenzie
Copy link
Member

Frenzie commented Apr 20, 2019

Oh, you meant the ccache "could not find in path" error message. Pardon. Um, that's somewhere near the beginning.

@Frenzie
Copy link
Member

Frenzie commented Apr 20, 2019

Anyway, the clang build is now broken because that /usr/bin/ccache clang mismatch made it fly under the radar.

cc1plus: warning: unrecognized command line option "-Wno-macro-redefined"
cc1plus: warning: unrecognized command line option "-Wno-parentheses-equality"
cc1plus: warning: unrecognized command line option "-Wno-unused-command-line-argument"
cc1plus: warning: unrecognized command line option "-Wno-unknown-warning-option"
cc1plus: warning: unrecognized command line option "-Wno-ignored-optimization-argument"

@Frenzie
Copy link
Member

Frenzie commented Apr 20, 2019

Never mind(ish), it seems to be using GCC there for some reason. >_< So the Clang build is still broken, just not due to Clang per se.

Frenzie added a commit to Frenzie/android-luajit-launcher that referenced this pull request Apr 22, 2019
A bit of an emergency fix to just get it working ASAP. A patch was added to base LuaJIT in koreader/koreader-base#892, which caused a mismatch and build failures over here. Unfortunately that was hidden by some excessive Android verbosity inadvertently introduced in koreader/koreader-base#888, and on my local instance where I did a sanity check LuaJIT was already compiled…
Frenzie added a commit to koreader/android-luajit-launcher that referenced this pull request Apr 22, 2019
A bit of an emergency fix to just get it working ASAP. A patch was added to base LuaJIT in koreader/koreader-base#892, which caused a mismatch and build failures over here. Unfortunately that was hidden by some excessive Android verbosity inadvertently introduced in koreader/koreader-base#888, and on my local instance where I did a sanity check LuaJIT was already compiled…
Frenzie added a commit to Frenzie/koreader that referenced this pull request Apr 22, 2019
* [fix] Add LuaJIT patch to sync with koreader-base koreader/android-luajit-launcher#141

A bit of an emergency fix to just get it working ASAP. A patch was added to base LuaJIT in koreader/koreader-base#892, which caused a mismatch and build failures over here. Unfortunately that was hidden by some excessive Android verbosity inadvertently introduced in koreader/koreader-base#888, and on my local instance where I did a sanity check LuaJIT was already compiled…
Frenzie added a commit to koreader/koreader that referenced this pull request Apr 22, 2019
* [fix] Add LuaJIT patch to sync with koreader-base koreader/android-luajit-launcher#141

A bit of an emergency fix to just get it working ASAP. A patch was added to base LuaJIT in koreader/koreader-base#892, which caused a mismatch and build failures over here. Unfortunately that was hidden by some excessive Android verbosity inadvertently introduced in koreader/koreader-base#888, and on my local instance where I did a sanity check LuaJIT was already compiled…
mwoz123 pushed a commit to mwoz123/koreader that referenced this pull request Mar 29, 2020
* [fix] Add LuaJIT patch to sync with koreader-base koreader/android-luajit-launcher#141

A bit of an emergency fix to just get it working ASAP. A patch was added to base LuaJIT in koreader/koreader-base#892, which caused a mismatch and build failures over here. Unfortunately that was hidden by some excessive Android verbosity inadvertently introduced in koreader/koreader-base#888, and on my local instance where I did a sanity check LuaJIT was already compiled…
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