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

macOS build notes #6

Open
t56k opened this issue Jan 28, 2020 · 5 comments
Open

macOS build notes #6

t56k opened this issue Jan 28, 2020 · 5 comments

Comments

@t56k
Copy link

t56k commented Jan 28, 2020

Anyone got a build working on macOS?

@Aanok
Copy link
Owner

Aanok commented Feb 3, 2020

I've never done development for macOS, so quite frankly I don't even know what it is you're supposed to do to make jftui compile and work there. I also don't own a mac and don't plan to, so I don't have anything to use for the purpose.

I understand it should work as a very special flavor of BSD and I've been avoiding to rely on specific Linux behavior so far and stuck to POSIX. So it should be possible, in theory.

You'll definitely need to patch the sources. I think everything about default folders and env variables needs touching, to start with. But there may be subtle things I don't know about, like some macro constants being undefined. The Makefile may need work too.

Mind that I would not be open to integrating a PR for it either, unless I got some guarantees that the onus of supporting a macOS build in the future would be taken up by somebody reliable. That's not something I'm doing myself.

@LaurentFough
Copy link

LaurentFough commented Sep 3, 2020

I've been using this on Arch for a bit. (great work @Aanok)

Decided to see if I could get it compiled on macOS.


@cd-rum
I have a fork here: github::LaurentFough/jftui

  1. added: the libmpv files from https://github.com/mpv-player/mpv/tree/master/libmpv
  2. updated: Makefie
  3. updated: src/main.c - point to libmpv
  4. updated: src/shared.h - point to libmpv

The [only] build errors so far:

ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [build/jftui] Error 1
[1]    41395 exit 2     make

Need to spend some time tracking it down.
I've only just cloned and started today, so let's see what we can get done.

@LaurentFough
Copy link

This branch (https://github.com/LaurentFough/jftui/tree/macOS-M1) compiles on an M1 Mac.

  • tested and works as expected as my installed Arch version.

@Aanok
Copy link
Owner

Aanok commented Dec 20, 2021

@LaurentFough that's awesome! I'll have a close look during the holidays to see what it took. If it turns out to be simple enough, I might just integrate the changes here, though no promises about that. At the very least your repo's getting a link from the readme/front page :)

@LaurentFough
Copy link

@Aanok Thanks.

I'm also tracking down a small bug.
Seems small from what I can deduce, maybe a macOS encoding issue or some small vagary between mpv edl on linux vs macOS.

If compile a debug version(jftui_debug): I get a loadfile url similar to:

  • edl://%141%http://JELLYFIN_SERVER:PORT/videos/89aaf3eb040290345b505eb9e4f8ebcb/stream?static=true&mediasourceid=89aaf3eb040290345b505eb9e4f8ebcb;

  • Additional debug data.
DEBUG: loadfile edl://%141%http://JELLYFIN_SERVER:PORT/videos/89aaf3eb040290345b505eb9e4f8ebcb/stream?static=true&mediasourceid=89aaf3eb040290345b505eb9e4f8ebcb;
Name: MEDIA_FILE_NAME
Path: (null)
Type: Episode
Id: 89aaf3eb040290345b505eb9e4f8ebcb
PB ticks: 0, RT ticks: 14400849920
Children:
        Name: (null)
        Path: (null)
        Type: Video_Source
        Id: 89aaf3eb040290345b505eb9e4f8ebcb
        PB ticks: 0, RT ticks: 14400849920
DEBUG: event: idle
DEBUG: event: start-file
DEBUG: event: property-change
DEBUG: event: property-change
DEBUG: event: property-change
DEBUG: event: tracks-changed
DEBUG: event: tracks-changed
 (+) Video --vid=1 (*) (h264 1280x720 23.976fps)
 (+) Audio --aid=1 --alang=jpn (*) (aac 2ch 48000Hz)

Which does not play.
No errors, mpv reports the correct media data, etc.

If I then just execute, (in my default shell).

  • $ mpv "edl://%141%http://JELLYFIN_SERVER:PORT/videos/89aaf3eb040290345b505eb9e4f8ebcb/stream?static=true&mediasourceid=89aaf3eb040290345b505eb9e4f8ebcb;"

then playback starts as expected.

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

3 participants