Package Details: vlc-luajit 3.0.21-9

Git Clone URL: https://aur.archlinux.org/vlc-luajit.git (read-only, click to copy)
Package Base: vlc-luajit
Description: Multi-platform MPEG, VCD/DVD, and DivX player built with luajit for OBS Studio compatibility
Upstream URL: https://www.videolan.org/vlc/
Keywords: luajit media obs obs-studio vlc
Licenses: GPL-2.0-or-later, LGPL-2.1-or-later
Conflicts: vlc, vlc-dev, vlc-plugin, vlc-stable-git
Provides: vlc
Submitter: tytan652
Maintainer: tytan652
Last Packager: tytan652
Votes: 22
Popularity: 0.43
First Submitted: 2021-05-11 19:45 (UTC)
Last Updated: 2025-01-28 17:30 (UTC)

Required by (155)

Sources (5)

Pinned Comments

Latest Comments

1 2 3 4 5 6 7 Next › Last »

galuise commented on 2025-01-28 17:34 (UTC)

Thanks @tytan652!

It's reassuring to see that your new push looks to match the exact changes I made to get the package to build (I'm Arch Linux as well).

Thank you again!

tytan652 commented on 2025-01-28 17:31 (UTC)

I missed the change done upstream by Arch, pushed the changes. Note that I also ignore Manjaro-related comments since I only support Arch Linux.

galuise commented on 2025-01-28 17:28 (UTC) (edited on 2025-01-28 17:29 (UTC) by galuise)

Here's an even easier way to get my build...

Copy the code below and save to fixit.patch (this will create the nfs_fix.patch file as well as patch your PKGBUILD to include it all in one simple git apply fixit.patch step):

diff --git a/PKGBUILD b/PKGBUILD
index 6a525a3..dfd79cf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -143,10 +143,12 @@ _name=vlc
 options=('!emptydirs')
 source=(https://download.videolan.org/${_name}/${_vlcver}/${_name}-${_vlcver}${_vlcfixupver}.tar.xz
         'update-vlc-plugin-cache.hook'
+        'nfs_fix.patch'
         'taglib-2.patch'
         'add-ffmpeg7-support.patch') # https://code.videolan.org/videolan/vlc/-/merge_requests/5574
 sha512sums=('cb1af76c8056648c331d7e6e0680d161ed1849eb635987504f45eae02531e9b432651034317fa7e02b0722905dfb9f0f5dad67b5924cc62edcaf0d173ac36aee'
             'b247510ffeadfd439a5dadd170c91900b6cdb05b5ca00d38b1a17c720ffe5a9f75a32e0cb1af5ebefdf1c23c5acc53513ed983a736e8fa30dd8fad237ef49dd3'
+            'SKIP'
             'ea0d1e1dfed16dac8f9027eb55d987dee59630568b9744ceb42bfa134ea9295252d83574f3d793a76a5be3b02661c1731ed366003b6b55b2d7f02fde70586ff3'
             'dc155f70ae6a800cea2fd8a9167c0fec0b67b695cbe5bf7bb7f1ca76247100ddb8493e7ce6a9ff5e35686d20b79408960a367156955fab892357bc1fb91e2bfe')

diff --git a/nfs_fix.patch b/nfs_fix.patch
new file mode 100644
index 0000000..d1096f7
--- /dev/null
+++ b/nfs_fix.patch
@@ -0,0 +1,30 @@
+diff --git a/modules/access/nfs.c b/modules/access/nfs.c
+index 4910f72..2575585 100644
+--- a/modules/access/nfs.c
++++ b/modules/access/nfs.c
+@@ -189,7 +189,8 @@ nfs_read_cb(int i_status, struct nfs_context *p_nfs, void *p_data,
+     else
+     {
+         p_sys->res.read.i_len = i_status;
+-        memcpy(p_sys->res.read.p_buf, p_data, i_status);
++        if (p_sys->res.read.p_buf != NULL && p_data != NULL)
++            memcpy(p_sys->res.read.p_buf, p_data, i_status);
+     }
+ }
+ 
+@@ -209,9 +210,15 @@ FileRead(stream_t *p_access, void *p_buf, size_t i_len)
+         return 0;
+ 
+     p_sys->res.read.i_len = 0;
++#ifdef LIBNFS_API_V2
++    p_sys->res.read.p_buf = NULL;
++    if (nfs_read_async(p_sys->p_nfs, p_sys->p_nfsfh, p_buf, i_len, nfs_read_cb,
++                       p_access) < 0)
++#else
+     p_sys->res.read.p_buf = p_buf;
+     if (nfs_read_async(p_sys->p_nfs, p_sys->p_nfsfh, i_len, nfs_read_cb,
+                        p_access) < 0)
++#endif
+     {
+         msg_Err(p_access, "nfs_read_async failed");
+         return 0;

Then with fixit.patch in the same directory as PKGBUILD run:

git apply fixit.patch
makepkg -s

See my previous comment for more of an explanation of what gets changed...

galuise commented on 2025-01-28 17:18 (UTC) (edited on 2025-01-28 17:31 (UTC) by galuise)

Hi All, @tytan652,

So while I'm no C expert I did dig around in the VLC git repository and looked at modules/access/nfs.c and it does look like there was a commit in the master branch that was related to a change introduced in libnfs 6.0.0:

https://code.videolan.org/videolan/vlc/-/commit/a945944c2d50cacfacdd5b16d4ea5e7b4766a9fc

If you pay attention to line 212 through 220 (in the linked commit above) there is a new #ifdef LIBNFS_API_V2 that uses a modified call to nfs_read_async which is the error in everybody's failed compile.

Here are the changes:

#ifdef LIBNFS_API_V2
    p_sys->res.read.p_buf = NULL;
    if (nfs_read_async(p_sys->p_nfs, p_sys->p_nfsfh, p_buf, i_len, nfs_read_cb,
                       p_access) < 0)
#else
    p_sys->res.read.p_buf = p_buf;
    if (nfs_read_async(p_sys->p_nfs, p_sys->p_nfsfh, i_len, nfs_read_cb,
                       p_access) < 0)
#endif

There were other changes to nfs.c in the master branch that will break the build in other ways. I managed to get a working build of this vlc-luajit package by adding the following nfs_fix.patch to my build directory along side the PKGBUILD file (luckliy the PKGBUILD applies every .patch file in the same directory). However, you will have to add the nfs_fix.patch file as a source to your PKGBUILD.

Here are my changes that yield a successful build:

nfs_fix.patch:
diff --git a/modules/access/nfs.c b/modules/access/nfs.c
index 4910f72..2575585 100644
--- a/modules/access/nfs.c
+++ b/modules/access/nfs.c
@@ -189,7 +189,8 @@ nfs_read_cb(int i_status, struct nfs_context *p_nfs, void *p_data,
     else
     {
         p_sys->res.read.i_len = i_status;
-        memcpy(p_sys->res.read.p_buf, p_data, i_status);
+        if (p_sys->res.read.p_buf != NULL && p_data != NULL)
+            memcpy(p_sys->res.read.p_buf, p_data, i_status);
     }
 }

@@ -209,9 +210,15 @@ FileRead(stream_t *p_access, void *p_buf, size_t i_len)
         return 0;

     p_sys->res.read.i_len = 0;
+#ifdef LIBNFS_API_V2
+    p_sys->res.read.p_buf = NULL;
+    if (nfs_read_async(p_sys->p_nfs, p_sys->p_nfsfh, p_buf, i_len, nfs_read_cb,
+                       p_access) < 0)
+#else
     p_sys->res.read.p_buf = p_buf;
     if (nfs_read_async(p_sys->p_nfs, p_sys->p_nfsfh, i_len, nfs_read_cb,
                        p_access) < 0)
+#endif
     {
         msg_Err(p_access, "nfs_read_async failed");
         return 0;
My changes to PKGBUILD:
diff --git a/PKGBUILD b/PKGBUILD
index 6a525a3..dfd79cf 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -143,10 +143,12 @@ _name=vlc
 options=('!emptydirs')
 source=(https://download.videolan.org/${_name}/${_vlcver}/${_name}-${_vlcver}${_vlcfixupver}.tar.xz
         'update-vlc-plugin-cache.hook'
+        'nfs_fix.patch'
         'taglib-2.patch'
         'add-ffmpeg7-support.patch') # https://code.videolan.org/videolan/vlc/-/merge_requests/5574
 sha512sums=('cb1af76c8056648c331d7e6e0680d161ed1849eb635987504f45eae02531e9b432651034317fa7e02b0722905dfb9f0f5dad67b5924cc62edcaf0d173ac36aee'
             'b247510ffeadfd439a5dadd170c91900b6cdb05b5ca00d38b1a17c720ffe5a9f75a32e0cb1af5ebefdf1c23c5acc53513ed983a736e8fa30dd8fad237ef49dd3'
+            'SKIP'
             'ea0d1e1dfed16dac8f9027eb55d987dee59630568b9744ceb42bfa134ea9295252d83574f3d793a76a5be3b02661c1731ed366003b6b55b2d7f02fde70586ff3'
             'dc155f70ae6a800cea2fd8a9167c0fec0b67b695cbe5bf7bb7f1ca76247100ddb8493e7ce6a9ff5e35686d20b79408960a367156955fab892357bc1fb91e2bfe')

DISCLAIMER: I can only confirm that this fixes the build as it uses the new calling convention for nfs_read_async. I cannot confirm that the nfs plugin (modules/access/nfs.c) functions 100% correctly.

Until @tytan652 gets a chance to review the changes in the upstream source this might be a way to get a build on your machine. Thank you @tytan652 for all of your efforts with maintaining these packages. I know I have used them for quite some time to get a really nice custom build of obs-studio that has all of the bells and whistles that I like! To the community: I hope this helps somebody else!

MrNessuno commented on 2025-01-27 22:12 (UTC) (edited on 2025-01-27 22:14 (UTC) by MrNessuno)

not able to compile on Manjaro unstable:


<command-line>: note: this is the location of the previous definition
access/nfs.c: In function ‘FileRead’:
access/nfs.c:213:54: error: passing argument 3 of ‘nfs_read_async’ makes pointer from integer without a cast [-Wint-conversion]
  213 |     if (nfs_read_async(p_sys->p_nfs, p_sys->p_nfsfh, i_len, nfs_read_cb,
      |                                                      ^~~~~
      |                                                      |
      |                                                      size_t {aka long unsigned int}
In file included from access/nfs.c:44:
/usr/include/nfsc/libnfs.h:755:33: note: expected ‘void *’ but argument is of type ‘size_t’ {aka ‘long unsigned int’}
  755 |                           void *buf, size_t count,
      |                           ~~~~~~^~~
access/nfs.c:213:61: error: passing argument 4 of ‘nfs_read_async’ makes integer from pointer without a cast [-Wint-conversion]
  213 |     if (nfs_read_async(p_sys->p_nfs, p_sys->p_nfsfh, i_len, nfs_read_cb,
      |                                                             ^~~~~~~~~~~
      |                                                             |
      |                                                             void (*)(int,  struct nfs_context *, void *, void *)
/usr/include/nfsc/libnfs.h:755:45: note: expected ‘size_t’ {aka ‘long unsigned int’} but argument is of type ‘void (*)(int,  struct nfs_context *, void *, void *)’
  755 |                           void *buf, size_t count,
      |                                      ~~~~~~~^~~~~
access/nfs.c:214:24: warning: passing argument 5 of ‘nfs_read_async’ from incompatible pointer type [-Wincompatible-pointer-types]
  214 |                        p_access) < 0)
      |                        ^~~~~~~~
      |                        |
      |                        stream_t *
/usr/include/nfsc/libnfs.h:756:34: note: expected ‘nfs_cb’ {aka ‘void (*)(int,  struct nfs_context *, void *, void *)’} but argument is of type ‘stream_t *’
  756 |                           nfs_cb cb, void *private_data);
      |                           ~~~~~~~^~
access/nfs.c:213:9: error: too few arguments to function ‘nfs_read_async’
  213 |     if (nfs_read_async(p_sys->p_nfs, p_sys->p_nfsfh, i_len, nfs_read_cb,
      |         ^~~~~~~~~~~~~~
/usr/include/nfsc/libnfs.h:754:12: note: declared here
  754 | EXTERN int nfs_read_async(struct nfs_context *nfs, struct nfsfh *nfsfh,
      |            ^~~~~~~~~~~~~~
make[4]: *** [Makefile:23307: access/libnfs_plugin_la-nfs.lo] Error 1
make[4]: *** Attesa per i processi non terminati....
make[4]: uscita dalla directory «/home/andrea/.cache/yay/vlc-luajit/src/vlc-3.0.21/modules»
make[3]: *** [Makefile:28318: all-recursive] Error 1
make[3]: uscita dalla directory «/home/andrea/.cache/yay/vlc-luajit/src/vlc-3.0.21/modules»
make[2]: *** [Makefile:12950: all] Error 2
make[2]: uscita dalla directory «/home/andrea/.cache/yay/vlc-luajit/src/vlc-3.0.21/modules»
make[1]: *** [Makefile:1577: all-recursive] Error 1
make[1]: uscita dalla directory «/home/andrea/.cache/yay/vlc-luajit/src/vlc-3.0.21»
make: *** [Makefile:1464: all] Error 2
==> ERRORE: Si è verificato un errore in build().
    L'operazione sta per essere interrotta...
 -> errore durante la creazione: vlc-luajit-exit status 4
 -> Installazione dei seguenti pacchetti non riuscita. È richiesto l'intervento manuale:
libvlc-luajit - exit status 4
vlc-luajit - exit status 4

Alkaris commented on 2025-01-04 10:30 (UTC) (edited on 2025-01-04 11:05 (UTC) by Alkaris)

Package does not compile.

<command-line>: note: this is the location of the previous definition
  CCLD     libvlc_xcb_events.la
  CCLD     libpulselist_plugin.la
  CXXLD    libstream_out_chromecast_plugin.la
  CCLD     liblogo_plugin.la
/usr/bin/ld: /tmp/cczKG4dD.ltrans0.ltrans.o: in function `ChromecastCommunication::buildMessage(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, castchannel::CastMessage_PayloadType)':
<artificial>:(.text+0x398d): undefined reference to `google::protobuf::internal::fixed_address_empty_string'
/usr/bin/ld: /tmp/cczKG4dD.ltrans0.ltrans.o: in function `intf_sys_t::handleMessages()':
<artificial>:(.text+0xc864): undefined reference to `google::protobuf::internal::fixed_address_empty_string'
/usr/bin/ld: /tmp/cczKG4dD.ltrans1.ltrans.o: in function `castchannel::AuthResponse::PlacementNew_(void const*, void*, google::protobuf::Arena*)':
<artificial>:(.text+0xa8): undefined reference to `google::protobuf::internal::fixed_address_empty_string'
/usr/bin/ld: /tmp/cczKG4dD.ltrans1.ltrans.o: in function `google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliased(unsigned int, std::basic_string_view<char, std::char_traits<char> >, unsigned char*)':
<artificial>:(.text+0x1d6): undefined reference to `google::protobuf::io::EpsCopyOutputStream::WriteStringMaybeAliasedOutline(unsigned int, std::basic_string_view<char, std::char_traits<char> >, unsigned char*)'
/usr/bin/ld: /tmp/cczKG4dD.ltrans1.ltrans.o: in function `castchannel::CastMessage::PlacementNew_(void const*, void*, google::protobuf::Arena*)':
<artificial>:(.text+0x1e8): undefined reference to `google::protobuf::internal::fixed_address_empty_string'
/usr/bin/ld: /tmp/cczKG4dD.ltrans1.ltrans.o:(.data.rel+0x378): undefined reference to `google::protobuf::internal::fixed_address_empty_string'
/usr/bin/ld: /tmp/cczKG4dD.ltrans1.ltrans.o:(.data.rel+0x380): undefined reference to `google::protobuf::internal::fixed_address_empty_string'
/usr/bin/ld: /tmp/cczKG4dD.ltrans1.ltrans.o:(.data.rel+0x3b8): undefined reference to `google::protobuf::internal::fixed_address_empty_string'
/usr/bin/ld: /tmp/cczKG4dD.ltrans1.ltrans.o:(.data.rel+0x3c0): undefined reference to `google::protobuf::internal::fixed_address_empty_string'
/usr/bin/ld: /tmp/cczKG4dD.ltrans1.ltrans.o:(.data.rel+0x3c8): more undefined references to `google::protobuf::internal::fixed_address_empty_string' follow
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:18419: libstream_out_chromecast_plugin.la] Error 1
make[4]: *** Waiting for unfinished jobs....

always fails for

sources/vlc-luajit/src/vlc-3.0.21/modules

libvlc-luajit should just become Optional dependency, because it's nothing but a problematic package that always fails to compile. It NEVER compiles successfully.

ddulz commented on 2024-08-25 22:25 (UTC)

yeah this version disable vaapi, make hevc impossible to play with old intel laptops. is there a flag or a way to enable it?

chb commented on 2024-08-24 04:14 (UTC)

it seems like this version has to use my CPU for video decode, i think i saw a comment below about this version not containing vaapi (i have amd gpu)

CountJJ commented on 2024-07-15 07:51 (UTC)

latest version freezes after a few seconds of playing any video any codec any format