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

Fix for #4375 #4385

Merged
merged 4 commits into from Dec 18, 2018

Conversation

Projects
None yet
3 participants
@pazos
Copy link
Contributor

pazos commented Dec 7, 2018

README.md Outdated
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> "$HOME"/.bash_profile
```

If you run into a gettext error while building glib, try `brew link --force gettext` to override the built-in Mac OS BSD gettext with GNU GetText.

*Note:* in Mojave you need to set a minimum deployment version higher than 10.04. Otherwise you'll get the error `ld: library not found for -lgcc_s.10.4`

This comment has been minimized.

@Frenzie

Frenzie Dec 7, 2018

Member
Suggested change Beta
*Note:* in Mojave you need to set a minimum deployment version higher than 10.04. Otherwise you'll get the error `ld: library not found for -lgcc_s.10.4`
*Note:* in Mojave (10.14) you need to set a minimum deployment version higher than 10.04. Otherwise you'll get the error `ld: library not found for -lgcc_s.10.4`.

Although I've recently made up a couple of cutesy release names for KOReader, too often I forget what those things actually refer to.

As an aside, I'm slightly confused by some of the numbering here. It went straight from 10.04 to 10.10 or something?

This comment has been minimized.

@pazos

pazos Dec 8, 2018

Contributor

As an aside, I'm slightly confused by some of the numbering here. It went straight from 10.04 to 10.10 or something?

10.06 should work too (and any other number in between). I just set 10.10 because it is the minimum osx release supported by brew. If we redistribute an app it does make sense targetting the oldest mac release (for reference official python binaries are using 10.06).

I can test 10.06 if you wish 👍

This comment has been minimized.

@Frenzie

Frenzie Dec 8, 2018

Member

If it's easily done, yes please.

This comment has been minimized.

@pazos

pazos Dec 9, 2018

Contributor

@Frenzie

I get a bunch of warnings:

clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]

and the build fails.

MACOSX_DEPLOYMENT_TARGET=10.09 works fine.

This comment has been minimized.

@Frenzie

Frenzie Dec 9, 2018

Member

Did you try adding -stdlib=libc++ to the compiler flags?

But yeah, otherwise 10.09 it is.

This comment has been minimized.

@NiLuJe

NiLuJe Dec 10, 2018

Member

Just to add my two cents about not trusting the DEPLOYMENT_TARGET too much: there's a very high probability something will pickup a symbol that wasn't actually supported on earlier macOS versions, despite the DEPLOYMENT_TARGET.

That's from personal experience with KindleTool, and some autotools projects picking up fstatat/openat, which were introduced in 10.10, and that despite a MACOSX_DEPLOYMENT_TARGET=10.6 & -mmacosx-version-min=10.6...

This comment has been minimized.

@NiLuJe

NiLuJe Dec 10, 2018

Member

To avoid this predicament, you'd actually need a copy of the old 10.6 SDK, which is doable (or it used to be, anyway), but is highly annoying to get, and even more to actually use properly after that, and takes a crapload of space.

This comment has been minimized.

@pazos

pazos Dec 10, 2018

Contributor

@NiLuJe: good to know, thanks.

I would love to build an application for mac as part of nightlies (like the appimage) but there is no way we can end up with a docker image tailored for macos. Even when cross toolchains exist and work they rely on apple sdk, which AFAIK can't be redistributed freely.

This comment has been minimized.

@Frenzie

Frenzie Dec 11, 2018

Member

I was going to ask if perhaps it's legal to do this, but…

screenshot_2018-12-11_07-51-57

This comment has been minimized.

@pazos

pazos Dec 15, 2018

Contributor

@Frenzie: yep, the only legal alternative that I've found is https://www.macstadium.com/opensource

README.md Outdated
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> "$HOME"/.bash_profile
```

If you run into a gettext error while building glib, try `brew link --force gettext` to override the built-in Mac OS BSD gettext with GNU GetText.

*Note:* in Mojave you need to set a minimum deployment version higher than 10.04. Otherwise you'll get the error `ld: library not found for -lgcc_s.10.4`
`export MACOSX_DEPLOYMENT_TARGET=10.10`

This comment has been minimized.

@Frenzie

Frenzie Dec 7, 2018

Member
Suggested change Beta
`export MACOSX_DEPLOYMENT_TARGET=10.10`
```
export MACOSX_DEPLOYMENT_TARGET=10.10
```
echo 'export PATH="/usr/local/opt/gettext/bin:$PATH"' >> "$HOME"/.bash_profile
```

If you run into a gettext error while building glib, try `brew link --force gettext` to override the built-in Mac OS BSD gettext with GNU GetText.

*Note:* in Mojave you need to set a minimum deployment version higher than 10.04. Otherwise you'll get the error `ld: library not found for -lgcc_s.10.4`
`export MACOSX_DEPLOYMENT_TARGET=10.10`

The KOReader Android build requires `ant`, `openjdk-8-jdk` and `p7zip-full`. A compatible version of the Android NDK and SDK will be downloaded automatically by `./kodev build android` if no NDK or SDK is provided in environment variables. For that purpose you can use `NDK=/ndk/location SDK=/sdk/location ./kodev build android`.

Users of Debian Jessie first need to configure the `backports` repository:

This comment has been minimized.

@Frenzie

Frenzie Dec 7, 2018

Member

Oh, I guess that a little further down I should add a note about how in Debubuntu you can use update-alternatives. See #4254 (comment) where I just shared that as some kind of common knowledge, but I'm not sure how long it took before I learned about it. :-)

This comment has been minimized.

@pazos

pazos Dec 16, 2018

Contributor

👍 Will do it in other PR with some building documentation refactor.

@pazos pazos force-pushed the pazos:mac branch 2 times, most recently from 57a1e5c to 1e75f3b Dec 16, 2018

@pazos pazos force-pushed the pazos:mac branch from 1e75f3b to 27259f3 Dec 18, 2018

@pazos pazos requested a review from Frenzie Dec 18, 2018

@Frenzie
Copy link
Member

Frenzie left a comment

lgtm, rebase when ready?

@Frenzie Frenzie merged commit 3e36392 into koreader:master Dec 18, 2018

1 check passed

ci/circleci Your tests passed on CircleCI!
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment