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

libxcb not found on OpenBSD 7.4 #895

Closed
afh opened this issue Nov 1, 2023 · 13 comments · Fixed by #896
Closed

libxcb not found on OpenBSD 7.4 #895

afh opened this issue Nov 1, 2023 · 13 comments · Fixed by #896

Comments

@afh
Copy link

afh commented Nov 1, 2023

1️⃣ The changes introduced with #788 to fix #785 do not work for OpenBSD 7.4 (and likely previous versions) as the path for X11 window system files on OpenBSD is /usr/X11R6 (see OpenBSD hier(7)) and differs from NetBSD's path, i.e. /usr/X11R7 (see NetBSD hier(7)).

2️⃣ Furthermore the filename for libxcb on OpenBSD 7.4 is libxcb.so.4.1 rather than libxcb.so.1 or libxcb.so.2. I don't know where the .4.1 suffix on OpenBSD comes from, but will keep investigating.

A read-only mirror of the sources for the OpenBSD X11 window system are available at openbsd/xenocara and may provide further insight.

@psychon
Copy link
Owner

psychon commented Nov 1, 2023

as the path for X11 window system files on OpenBSD is /usr/X11R6 and differs from NetBSD's path, i.e. /usr/X11R7

Heh. X11R6 was released in 1994 and X11R7 in something like 2013. I guess this just a change "let's not change the version number in this path since it would break too much stuff". And now we have this inconsistency. And apparently not even the dynamic loader's default search path can paper over this (I assume - I saw something like that in #785). Fun. Not.

Furthermore the filename for libxcb on OpenBSD 7.4 is libxcb.so.4.1 rather than libxcb.so.1 or libxcb.so.2. I don't know where the .4.1 suffix on OpenBSD comes from, but will keep investigating.

Yay. And in #785 I concluded exactly the opposite. 🙈

A read-only mirror of the sources for the OpenBSD X11 window system are available at openbsd/xenocara and may provide further insight.

https://github.com/openbsd/xenocara/blob/a812a0d861ff67f4c3dbd13f0753738a2bfe5990/lib/libxcb/libxcb/shlib_version seems relevant. No idea what this means, but it says major=4 and minor=1. So... is OpenBSD explicitly overriding the version info from libxcb!? All the libraries seem to have such a file, but can't find any reasoning for it.

They seem to have invented their own, arbitrary versioning? The update to libxcb 1.6 switches from 2.0 to 2.1, for whatever reason. The commit before that seems to introduce the file.

Since I don't really understand this: @afh Do you want to send a PR that works for you? I'd just trust you on this.

...but I don't actually know what the PR should look like. If we just hardcode libxcb.so.4.1, then this breaks the next time they update libxcb. Is there really no libxcb.so.4 in sight anywhere?!

@afh
Copy link
Author

afh commented Nov 2, 2023

Thank you for the quick response, @psychon, much appreciated!

Your findings regarding the OpenBSD specific libxcb shlib_version file are helpful; could be interesting to understand more about the motivation of the OpenBSD / xenocara project for doing so.

Reading the OpenBSD and NetBSD manpage for dlopen(3) and doing a quick investigation first using C and dlopen and then using Rust and libloading (see below) it appears that using "just the name of the shared library itself", i.e. libxcb.so seems to be the best option as the library is loaded without the need to update xc11rb when changes occur in the shared library filepath or -name as the loading relies on the mechanisms provided by the underlying operating system.

Excerpt from the OpenBSD and NetBSD manpage for dlopen(3)

Quoting from OpenBSD dlopen(3) (with added emphasis):

The path parameter can be specified as either an absolute pathname to a shared library or just the name of the shared library itself.[...] When just a shared library is specified, the same paths will be searched that are used for “intrinsic” shared library searches. Shared libraries take the following form:

lib.so[.xx[.yy]

Quoting from NetBSD dlopen(3) (with added emphasis):

The dlopen() function takes the name of a shared object as the first argument. The path argument can be specified as either an absolute pathname to a shared object or just the name of the shared object itself. [...] When just a shared object name is specified, the same search rules apply that are used for ``intrinsic'' shared object searches. (see ld.elf_so(1))

Shared libraries take the following form: ``lib.so[.xx[.yy]]''.

Investigation for shared library loading with C and dlopen(3) on OpenBSD
int main (int argc, char* argv[]) {
        for (int i = 1; i < argc; i++) {
                const char* libname = argv[i];
                void* handle = dlopen(libname, RTLD_LAZY);
                if (handle == NULL) {
                        printf("Unable to dynamically load %s\n", libname);
                } else {
                        printf("%s loaded at %p\n", libname, handle);
                        dlclose(handle);
                }
        }
        exit(EXIT_SUCCESS);
}
% ./dlopen-test /usr/X11R7/lib/libxcb.so.2 /usr/X11R6/lib/libxcb.so.4.1 /usr/X11R6/lib/libxcb.so.4 /usr/X11R6/lib/libxcb.so libxcb.so.4.1 libxcb.so.4 libxcb.so libxcb.so.1 libxcb.so.2
Unable to dynamically load /usr/X11R7/lib/libxcb.so.2
/usr/X11R6/lib/libxcb.so.4.1 loaded at 0x65e33fa0800
/usr/X11R6/lib/libxcb.so.4 loaded at 0x65e33fa0000
/usr/X11R6/lib/libxcb.so loaded at 0x65e3a5a5800
libxcb.so.4.1 loaded at 0x65ebba2d800
libxcb.so.4 loaded at 0x65e3a5a5800
libxcb.so loaded at 0x65e49bb8000
Unable to dynamically load libxcb.so.1
Unable to dynamically load libxcb.so.2
Investigation for shared library loading with Rust and libloading on OpenBSD
// I'm rather unfamiliar with Rust programming,
// so hopefully the snippet below does not cause too
// much pain while reading. Happy to hear helpful comments :)
use std::env;

fn main() {
    let args: Vec<_> = env::args().collect();

    for arg in &args[1..] {
        print!("Trying to load {}: ", arg);
        unsafe {
            let libname = arg;
            let lib = libloading::Library::new(libname)
                .map_err(|e| println!("failed due to: {}", e));
            match lib {
                Ok(_) => { println!("success!"); }
                Err(_) => {  }
            }
        }
    }
}
% clear;cargo run -- /usr/X11R7/lib/libxcb.so.2 /usr/X11R6/lib/libxcb.so.4.1 /usr/X11R6/lib/libxcb.so.4 /usr/X11R6/lib/libxcb.so libxcb.so.4.1 libxcb.so.4 libxcb.so libxcb.so.1 libxcb.so.2
Trying to load /usr/X11R7/lib/libxcb.so.2: failed due to: File not found
Trying to load /usr/X11R6/lib/libxcb.so.4.1: success!
Trying to load /usr/X11R6/lib/libxcb.so.4: success!
Trying to load /usr/X11R6/lib/libxcb.so: success!
Trying to load libxcb.so.4.1: success!
Trying to load libxcb.so.4: success!
Trying to load libxcb.so: success!
Trying to load libxcb.so.1: failed due to: File not found
Trying to load libxcb.so.2: failed due to: File not found

@psychon Are the code snippets from the investigation enough proof for you or would you prefer an actual test with and within x11rb?
I'd be happy to provide an appropriate PR with a bit of guidance from you (or another maintainer or willing person) in regards to writing a test or Minimum Viable Example (MVE).

@eduardosm
Copy link
Collaborator

Can you post the output of readelf -d executable for some executable that is directly linked to libxcb? That should tell us the name we should search for and whether there is a RPATH.

@psychon
Copy link
Owner

psychon commented Nov 4, 2023

I googled a bit around and ended up looking at https://cdn.openbsd.org/pub/OpenBSD/7.4/packages/amd64/. I now have to do some guessing. My first guess was lxterminal, but this is not directly linked to libxcb:

"readelf -d bin/lxterminal" (no RPATH, no RUNPATH, just NEEDED entries)
Dynamic section at offset 0x14218 contains 33 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libglib-2.0.so.4201.10]
 0x0000000000000001 (NEEDED)             Shared library: [libintl.so.8.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgtk-3.so.2201.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgdk-3.so.2201.1]
 0x0000000000000001 (NEEDED)             Shared library: [libpangocairo-1.0.so.3801.3]
 0x0000000000000001 (NEEDED)             Shared library: [libpango-1.0.so.3801.3]
 0x0000000000000001 (NEEDED)             Shared library: [libharfbuzz.so.18.6]
 0x0000000000000001 (NEEDED)             Shared library: [libatk-1.0.so.21810.0]
 0x0000000000000001 (NEEDED)             Shared library: [libcairo-gobject.so.2.1]
 0x0000000000000001 (NEEDED)             Shared library: [libcairo.so.13.3]
 0x0000000000000001 (NEEDED)             Shared library: [libgdk_pixbuf-2.0.so.3200.3]
 0x0000000000000001 (NEEDED)             Shared library: [libgio-2.0.so.4200.17]
 0x0000000000000001 (NEEDED)             Shared library: [libgobject-2.0.so.4200.17]
 0x0000000000000001 (NEEDED)             Shared library: [libvte-2.91.so.2.8]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.27.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.97.1]
 0x000000006ffffffb (FLAGS_1)            Flags: PIE
 0x0000000000000015 (DEBUG)              0x0
 0x0000000000000007 (RELA)               0x3ca0
 0x0000000000000008 (RELASZ)             6768 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffff9 (RELACOUNT)          281
 0x0000000000000017 (JMPREL)             0x5710
 0x0000000000000002 (PLTRELSZ)           6360 (bytes)
 0x0000000000000003 (PLTGOT)             0x16440
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000006 (SYMTAB)             0x3a0
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000005 (STRTAB)             0x2528
 0x000000000000000a (STRSZ)              6001 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x1ca8
 0x0000000000000004 (HASH)               0x1cc8
 0x0000000000000000 (NULL)               0x0
Since I had no good ideas, I went with the bad ones and looked at cairo next. Bingo. pixman and libX11 have an absolute path (I didn't even know this is possible), but xcb is just listed at `libxcb.so.4.1`.
readelf -d lib/libcairo.so.13.3
Dynamic section at offset 0x14a510 contains 34 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.27.1]
 0x0000000000000001 (NEEDED)             Shared library: [libm.so.10.1]
 0x0000000000000001 (NEEDED)             Shared library: [libz.so.7.0]
 0x0000000000000001 (NEEDED)             Shared library: [libpng.so.18.0]
 0x0000000000000001 (NEEDED)             Shared library: [libfontconfig.so.13.1]
 0x0000000000000001 (NEEDED)             Shared library: [libfreetype.so.30.3]
 0x0000000000000001 (NEEDED)             Shared library: [/usr/X11R6/lib/libX11.so.18.0]
 0x0000000000000001 (NEEDED)             Shared library: [/usr/X11R6/lib/libXext.so.13.0]
 0x0000000000000001 (NEEDED)             Shared library: [/usr/X11R6/lib/libXrender.so.6.0]
 0x0000000000000001 (NEEDED)             Shared library: [libxcb.so.4.1]
 0x0000000000000001 (NEEDED)             Shared library: [libxcb-render.so.1.1]
 0x0000000000000001 (NEEDED)             Shared library: [libxcb-shm.so.1.1]
 0x0000000000000001 (NEEDED)             Shared library: [/usr/X11R6/lib/libpixman-1.so.40.0]
 0x000000000000000e (SONAME)             Library soname: [libcairo.so.13.3]
 0x0000000000000007 (RELA)               0xbf00
 0x0000000000000008 (RELASZ)             20976 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffff9 (RELACOUNT)          862
 0x0000000000000017 (JMPREL)             0x110f0
 0x0000000000000002 (PLTRELSZ)           8496 (bytes)
 0x0000000000000003 (PLTGOT)             0x14c798
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000006 (SYMTAB)             0x350
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000005 (STRTAB)             0x7720
 0x000000000000000a (STRSZ)              18399 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x5290
 0x0000000000000004 (HASH)               0x5ec0
 0x000000000000000c (INIT)               0x140080
 0x000000000000000d (FINI)               0x1400a0
 0x000000006ffffff0 (VERSYM)             0x4c58
 0x000000006ffffffe (VERNEED)            0x5270
 0x000000006fffffff (VERNEEDNUM)         1
 0x0000000000000000 (NULL)               0x0
I haven't figured out how to find the binary package containing libxcb yet. "xcb" is some x11 cut buffer CLI utility".

@psychon
Copy link
Owner

psychon commented Nov 4, 2023

Ah, I found the binary package containing libxcb. It is https://cdn.openbsd.org/pub/OpenBSD/7.4/amd64/xbase74.tgz. And the SONAME is really just libxcb.so.4.1 without anything magic here either. So, apparently /usr/X11R6/lib/ must be in the linker's default search path.

readelf -d usr/X11R6/lib/libxcb.so.4.1
Dynamic section at offset 0x2dc90 contains 20 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libXau.so.10.0]
 0x0000000000000001 (NEEDED)             Shared library: [libXdmcp.so.11.0]
 0x000000000000000e (SONAME)             Library soname: [libxcb.so.4.1]
 0x0000000000000007 (RELA)               0xb5d8
 0x0000000000000008 (RELASZ)             432 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffff9 (RELACOUNT)          6
 0x0000000000000017 (JMPREL)             0xb788
 0x0000000000000002 (PLTRELSZ)           1944 (bytes)
 0x0000000000000003 (PLTGOT)             0x2fdf8
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000006 (SYMTAB)             0x350
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000005 (STRTAB)             0x7024
 0x000000000000000a (STRSZ)              17843 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x47f0
 0x0000000000000004 (HASH)               0x593c
 0x000000000000000c (INIT)               0x2c240
 0x000000000000000d (FINI)               0x2c260
 0x0000000000000000 (NULL)               0x0
The sources for this should be in https://cdn.openbsd.org/pub/OpenBSD/7.4/xenocara.tar.gz but I haven't downloaded that file or looked into it. Xenocara is apparently some fish species known for cleaning aquarium windows...

Anyway, I guess this means OpenBSD affords to rebuild everything on new xcb releases and does not offer any kind of API stability.

it appears that using "just the name of the shared library itself", i.e. libxcb.so seems to be the best option

I haven't figured out where that libxcb.so file comes from. It is not part of any of the binary packages that I have downloaded so far. Are we sure that this file is always available?

Urgh...

@psychon
Copy link
Owner

psychon commented Nov 4, 2023

I found the shlib_version magic! But it doesn't help...

The Makefile includes bsd.lib.mk. I haven't found an official source for bsd.lib.mk, but here is a random GitHub repo that claims to be OpenBSD: If the file shlib_version exists in the current directory, its contents are loaded and used to set SHLIB_MAJOR and SHLIB_MINOR. The rest of the file seems to only use this in the form lib${LIB}.so.${SHLIB_MAJOR}.${SHLIB_MINOR}, i.e. to set the name of the output file. I haven't found anything else with this. Nothing in here creates lib${LIB}.so without a further extension, so no libxcb.so should be created?!

However, `xcb.pc` just mentions `-lxcb` without an extension (but it does mention `-L/usr/X11R6/lib`).
prefix=/usr/X11R6
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include
xcbproto_version=1.15.2

Name: XCB
Description: X-protocol C Binding
Version: 1.15
Requires.private: xau >= 0.99.2 xdmcp
Libs: -L${libdir} -lxcb
Libs.private: 
Cflags: -I${includedir}

@psychon
Copy link
Owner

psychon commented Nov 4, 2023

Sorry for the monologe. Here is another entry: I asked #openbsd on Libera. The conclusion is that the options are:

  • Declare OpenBSD as unsupported
  • Play "catch up" every time they decide to change the SONAME again (which seems to be every xcb release)

According to this random person there is no libxcb.so and no symlinks for libraries, but he doesn't know how exactly the linker then turns -lxcb into (currently) a NEEDED entry for libxcb.so.4.1.

Dunno how this matches with @afh having such a file.

Hm.... actually... @afh Can you check whether you really have a file called libxcb.so? Perhaps there really is some magic going on that automatically loads libxcb.so.4.1 when the program asks for libxcb.so and I am just completely wrong in assuming that something weird is going on with your system (sorry for that implicit assumption!).

psychon added a commit that referenced this issue Nov 4, 2023
In commit 53de935 I fixed the dl-libxcb feature not finding libxcb.so
on NetBSD and just assumed that this also fixes things on OpenBSD since
I found some similarities. However, it turns out that OpenBSD ignores
libtool's SONAME handling and just rolls its own.

However, we do not really have to care much. Here, loading "libxcb.so"
does the right thing. Not because there is actually a file with this
name, but since the dynamic linker does some magic when it gets a
request to load a library without providing version information. Thus,
this commit changes the code to just load "libxcb.so" on OpenBSD.

With that, I got thinking. On untested systems, we do not really know
which SONAME to use. And we now have evidence that somehow just letting
the OS do some magic is the best option. Thus, this commit changes the
code to load "libxcb.so" on all systems except for Linux (where this
would e.g. require libxcb1-dev to be installed on Debian) and NetBSD
(where we have a working version that I do not want to break).

Fixes: #895
Signed-off-by: Uli Schlachter <[email protected]>
@psychon
Copy link
Owner

psychon commented Nov 4, 2023

I actually digged into the search code of OpenBSD's dynamic linker. src/libexec/ld.so/sod.c has _dl_build_sod() that turns e.g. "libxcb.so.4.1" into "libxcb.so" major=4, minor=1 and "libxcb.so" into major=-1, minor=-1; this function is used by dlopen() which ends up in src/libexec/ld.so/library_subr.c, dl_find_shlib() which matches things and treats "-1" as "matches" anything (otherwise major has to be == and minor >= the requested).

With that insight, I am totally fine with just using libxcb.so on OpenBSD. In fact, this might be the best option on systems where we know nothing better. Guessing a SONAME has turned out to be a bad idea.

@afh Could you somehow test #896 ?

@mergify mergify bot closed this as completed in #896 Nov 4, 2023
@afh
Copy link
Author

afh commented Nov 5, 2023

First of all thanks @psychon and @eduardosm for putting all the work into this issue, very much appreciated! 🙏

Here's the output of readelf as requested:

readelf -d /usr/X11R6/bin/xterm
Dynamic section at offset 0xc9cb0 contains 38 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libXaw.so.15.0]
 0x0000000000000001 (NEEDED)             Shared library: [libXpm.so.9.0]
 0x0000000000000001 (NEEDED)             Shared library: [libXt.so.11.1]
 0x0000000000000001 (NEEDED)             Shared library: [libSM.so.9.0]
 0x0000000000000001 (NEEDED)             Shared library: [libICE.so.11.0]
 0x0000000000000001 (NEEDED)             Shared library: [libXmu.so.11.0]
 0x0000000000000001 (NEEDED)             Shared library: [libXft.so.12.0]
 0x0000000000000001 (NEEDED)             Shared library: [libXrender.so.6.0]
 0x0000000000000001 (NEEDED)             Shared library: [libXinerama.so.6.0]
 0x0000000000000001 (NEEDED)             Shared library: [libX11.so.18.0]
 0x0000000000000001 (NEEDED)             Shared library: [libxcb.so.4.1]
 0x0000000000000001 (NEEDED)             Shared library: [libXext.so.13.0]
 0x0000000000000001 (NEEDED)             Shared library: [libXau.so.10.0]
 0x0000000000000001 (NEEDED)             Shared library: [libXdmcp.so.11.0]
 0x0000000000000001 (NEEDED)             Shared library: [libfontconfig.so.13.1]
 0x0000000000000001 (NEEDED)             Shared library: [libexpat.so.14.0]
 0x0000000000000001 (NEEDED)             Shared library: [libfreetype.so.30.3]
 0x0000000000000001 (NEEDED)             Shared library: [libutil.so.17.0]
 0x0000000000000001 (NEEDED)             Shared library: [libcurses.so.14.0]
 0x0000000000000001 (NEEDED)             Shared library: [libz.so.7.0]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.97.1]
 0x000000006ffffffb (FLAGS_1)            Flags: PIE
 0x0000000000000015 (DEBUG)              0x0
 0x0000000000000007 (RELA)               0x4c18
 0x0000000000000008 (RELASZ)             99408 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffff9 (RELACOUNT)          3039
 0x0000000000000017 (JMPREL)             0x1d068
 0x0000000000000002 (PLTRELSZ)           9048 (bytes)
 0x0000000000000003 (PLTGOT)             0xcc208
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000006 (SYMTAB)             0x3a0
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000005 (STRTAB)             0x3608
 0x000000000000000a (STRSZ)              5644 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0x2950
 0x0000000000000004 (HASH)               0x2970
 0x0000000000000000 (NULL)               0x0

For what it's worth I ran usr/X11R6/bin/ | xargs -n1 readelf -d | grep 'libxcb[^-]' and all programs referencing libxcb do so as xterm does in the example above, i.e. without an absolute path.

I haven't figured out where that libxcb.so file comes from. It is not part of any of the binary packages that I have downloaded so far. Are we sure that this file is always available?

libxcb.so.4.1 comes from the architecture specific xbaseXX.tgz (where XX is the version of OpenBSD being installed). So if X is installed on OpenBSD using the standard procedure, then I'm quite certain that libxcb will be available.

There is no libxcb.so file on OpenBSD, but rather as far as I understand the linker automatically loads whatever version is installed (on OpenBSD 7.4 libxcb.so.4.1) when libxcb.so is requested.

I'm using x11rb through alacritty's dependency winit, not sure if it's quick for me to test the changes. Would xtrace-example be a good (enough) test?

Regarding where bsd.lib.mk etc. come form: I'd consider share/mk from openbsd/src a very good source.

@psychon
Copy link
Owner

psychon commented Nov 6, 2023

I'm using x11rb through alacritty's dependency winit, not sure if it's quick for me to test the changes. Would xtrace-example be a good (enough) test?

Ah, okay. I took a look at the features winit uses and would suggest cargo run --example display_ppm --features allow-unsafe-code,dl-libxcb,randr,resource_manager,xinput,xkb,image. This additionally needs the image feature that winit does not use, but that should not hurt. (Yes, the "image" that this shows is ugly; it is a 2x2 pixel image)

For extra brownie points, you could run the above command with current x11rb master and also with an older version (to make sure it really breaks there).

@afh
Copy link
Author

afh commented Nov 7, 2023

Thanks for the suggestion. When running the cargo command you suggested on master it fails with signal: 11, SIGSEGV: invalid memory reference (see below). Not sure what to make of that or how to approach debugging it. Any ideas are very welcome.

warning: some crates are on edition 2021 which defaults to `resolver = "2"`, but virtual workspaces default to `resolver = "1"`
note: to keep the current resolver, specify `workspace.resolver = "1"` in the workspace root's manifest
note: to use the edition 2021 resolver, specify `workspace.resolver = "2"` in the workspace root's manifest
   Compiling x11rb-protocol v0.12.0 (/home/afh/Developer/x11rb/x11rb-protocol)
   Compiling x11rb v0.12.0 (/home/afh/Developer/x11rb/x11rb)
error: could not compile `x11rb-protocol` (lib)

Caused by:
  process didn't exit successfully: `rustc --crate-name x11rb_protocol --edition=2021 x11rb-protocol/src/lib.rs --error-format=json --json=diagnostic-rendered-ansi,artifacts,future-incompat --crate-type lib --emit=dep-info,metadata,link -C embed-bitcode=no -C debuginfo=2 --cfg 'feature="all-extensions"' --cfg 'feature="composite"' --cfg 'feature="damage"' --cfg 'feature="dbe"' --cfg 'feature="default"' --cfg 'feature="dpms"' --cfg 'feature="dri2"' --cfg 'feature="dri3"' --cfg 'feature="extra-traits"' --cfg 'feature="glx"' --cfg 'feature="present"' --cfg 'feature="randr"' --cfg 'feature="record"' --cfg 'feature="render"' --cfg 'feature="request-parsing"' --cfg 'feature="res"' --cfg 'feature="resource_manager"' --cfg 'feature="screensaver"' --cfg 'feature="shape"' --cfg 'feature="shm"' --cfg 'feature="std"' --cfg 'feature="sync"' --cfg 'feature="xevie"' --cfg 'feature="xf86dri"' --cfg 'feature="xf86vidmode"' --cfg 'feature="xfixes"' --cfg 'feature="xinerama"' --cfg 'feature="xinput"' --cfg 'feature="xkb"' --cfg 'feature="xprint"' --cfg 'feature="xselinux"' --cfg 'feature="xtest"' --cfg 'feature="xv"' --cfg 'feature="xvmc"' -C metadata=511b0427c01f03fc -C extra-filename=-511b0427c01f03fc --out-dir /home/afh/Developer/x11rb/target/debug/deps -C incremental=/home/afh/Developer/x11rb/target/debug/incremental -L dependency=/home/afh/Developer/x11rb/target/debug/deps` (signal: 11, SIGSEGV: invalid memory reference)

@psychon
Copy link
Owner

psychon commented Nov 7, 2023

Uhm. Sorry, I have no idea either. That seems to be the rust compiler crashing...?!?

@afh
Copy link
Author

afh commented Nov 7, 2023

Thanks for comment, @psychon. I'll see what can I find…

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 a pull request may close this issue.

3 participants