tech-x11 archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: alacritty: possible inputmethod issue?
On Sun, 20 Jun 2021 11:00:28 +0200
Thomas Klausner <wiz%netbsd.org@localhost> wrote:
> On Sun, Jun 20, 2021 at 10:52:49AM +0200, Tobias Nygren wrote:
> > On Sun, 20 Jun 2021 15:50:04 +0900
> > iquiw <iku.iwasa%gmail.com@localhost> wrote:
> >
> > > I have a workaround fix of the problem and also prepared a sample C
> >
> > Thanks! I went ahead and added the workaround patch to pkgsrc for now.
> > So people who experienced the problem please try alacritty-0.8.0nb1?
> > The problem should still be addressed in the base system.
>
> Thank you!
>
> But I get a coredump on startup now:
>
> (gdb) bt
> #0 pthread_mutex_lock (ptm=0x10) at /disk/6/archive/foreign/src/lib/libpthread/pthread_mutex.c:204
> #1 0x0000701cd5e6a06d in mtx_lock (mtx=<optimized out>) at /disk/6/archive/foreign/xsrc/external/mit/MesaLib/dist/include/c11/threads_posix.h:223
> #2 _mesa_HashLockMutex (table=<optimized out>) at /disk/6/archive/foreign/xsrc/external/mit/MesaLib/dist/src/mesa/main/hash.h:131
> #3 create_shader (ctx=0x701ce4d16880, type=35633) at /disk/6/archive/foreign/xsrc/external/mit/MesaLib/dist/src/mesa/main/shaderapi.c:339
> #4 0x000000007ad6cf0e in alacritty::gl::CreateShader () at /scratch/x11/alacritty/work/alacritty-0.8.0/target/release/build/alacritty-ea65f179719708c6/out/gl_bindings.rs:1106
> #5 alacritty::renderer::create_shader () at alacritty/src/renderer/mod.rs:1096
> #6 0x000000007ac69825 in alacritty::main () at alacritty/src/renderer/mod.rs:981
Maybe RTLD global binding has unfortunate side effects for pthread.
I wonder if it would work instead to link the binary explicitly
with -lX11. Try this patch?
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/x11/alacritty/Makefile,v
retrieving revision 1.6
diff -u -r1.6 Makefile
--- Makefile 20 Jun 2021 08:51:19 -0000 1.6
+++ Makefile 20 Jun 2021 09:16:51 -0000
@@ -1,7 +1,7 @@
# $NetBSD: Makefile,v 1.6 2021/06/20 08:51:19 tnn Exp $
DISTNAME= alacritty-0.8.0
-PKGREVISION= 1
+PKGREVISION= 2
CATEGORIES= x11
MASTER_SITES= ${MASTER_SITE_GITHUB:=alacritty/}
GITHUB_TAG= v${PKGVERSION_NOREV}
@@ -25,6 +25,10 @@
RUSTFLAGS+= -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.fontconfig}/lib
RUSTFLAGS+= -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.freetype2}/lib
+RUSTFLAGS+= -C link-arg=${COMPILER_RPATH_FLAG}${BUILDLINK_PREFIX.libX11}/lib
+RUSTFLAGS+= -C link-arg=-L${BUILDLINK_PREFIX.libX11}/lib
+RUSTFLAGS+= -C link-arg=-lX11
+
# The xcb crate depends on any version of python 3.
PYTHON_VERSIONS_INCOMPATIBLE= 27
PYTHON_FOR_BUILD_ONLY= tool
@@ -40,5 +44,6 @@
.include "../../lang/python/tool.mk"
.include "../../lang/rust/cargo.mk"
.include "../../security/openssl/buildlink3.mk"
+.include "../../x11/libX11/buildlink3.mk"
.include "../../x11/libxcb/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/x11/alacritty/distinfo,v
retrieving revision 1.6
diff -u -r1.6 distinfo
--- distinfo 20 Jun 2021 08:51:19 -0000 1.6
+++ distinfo 20 Jun 2021 09:16:51 -0000
@@ -764,4 +764,3 @@
RMD160 (yaml-rust-0.4.5.crate) = 2148b0245a840e26646ae4b0c5f394fd8203ad5b
SHA512 (yaml-rust-0.4.5.crate) = 7621dc8dfd5e7d4a7a8805b2a7e8319b63b852367655f2359d4e3e8fec6c4fad52d75c46ce1161e4c674eac0780b757ce9d34e664e304d8d2beec7afa0363ea0
Size (yaml-rust-0.4.5.crate) = 47783 bytes
-SHA1 (patch-vendor_x11-dl_src_link.rs) = 773a9ad0ffdbc852a0fbc375475f1a6fa8101e73
Index: patches/patch-vendor_x11-dl_src_link.rs
===================================================================
RCS file: patches/patch-vendor_x11-dl_src_link.rs
diff -N patches/patch-vendor_x11-dl_src_link.rs
--- patches/patch-vendor_x11-dl_src_link.rs 20 Jun 2021 08:51:19 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$NetBSD: patch-vendor_x11-dl_src_link.rs,v 1.1 2021/06/20 08:51:19 tnn Exp $
-
-Work around XIM error on NetBSD with native X11.
-https://mail-index.netbsd.org/tech-x11/2021/06/20/msg002210.html
-
---- ../vendor/x11-dl-2.18.5/src/link.rs.orig 2020-01-26 08:06:45.000000000 +0000
-+++ ../vendor/x11-dl-2.18.5/src/link.rs
-@@ -87,7 +87,7 @@ impl DynamicLibrary {
- },
- };
-
-- let handle = libc::dlopen(cname.as_ptr(), libc::RTLD_LAZY);
-+ let handle = libc::dlopen(cname.as_ptr(), libc::RTLD_LAZY | libc::RTLD_GLOBAL);
-
- if handle.is_null() {
- let msg = libc::dlerror();
Home |
Main Index |
Thread Index |
Old Index