Skip to main content


So I switch from C++ to Rust because debugging C++ packaging and linking errors is the most painful thing in the world and then my Rust crates wind up building C++ packages and then the C++ packages fail to build because debugging C++ packaging and linking errors is the most painful thing in the world
in reply to mcc

Okay get this

- I want to build "servo".
- "servo" includes Rust crate "unwind-sys" 0.1.4.
- This requires libunwind, so it looks for libunwind-generic.pc.
- In my copy of Debian Trixie, I install libunwind-19-dev.
- That doesn't include libunwind-generic.pc. Debian tools packages.debian.org/search?mod… say only libunwind-dev has that file
- libunwind19-dev is provided by clang, libunwind is provided by gcc
- therefore, uninstalling libunwind will uninstall libc++-dev
- I need libc++-dev to build servo

in reply to mcc

And… I'm stuck. I have no idea how to proceed. The only thing I can think to do is *switch my entire system from the clang libc to the gcc libc*, which is bizarre because I don't even have a c++ compiler, just Rust, and Rust uses Clang! So why would I be using clang with gcc libc! I don't want to do that!
in reply to mcc

In order to get this fixed, I think I need to file bugs on one or all of

- Debian libunwindNN-dev, for not providing the "-generic" pkg-config file (I mean it's generic, right??)
- The unwind-sys crate for using the wrong pkg-config filename
- Debian, for only allowing one of libunwind-dev and libunwindNN-dev at a time although different programs are compatible with different ones
- Possibly servo? For requiring too many C++ libs?

I just wanted to build a single program with a single library.

in reply to Filipi Limi

@morenonatural This has nothing to do with unstable, the same problem is present in bookworm as well as all debian derivatives (for example i encountered it previously on ubuntu) mstdn.social/@estelle/11380508…


The following additional packages will be installed:
libc++-14-dev libc++1-14 libc++abi1-14 libunwind-14 libunwind-14-dev
The following packages will be REMOVED:
libunwind-dev
The following NEW packages will be installed:
libc++-14-dev libc++-dev libc++1-14 libc++abi1-14 libunwind-14 libunwind-14-dev

(yeah)


in reply to mcc

maybe conan can help here, you would not depend on the system librairies but pick version you like
in reply to mcc

Pretty sure Rust can compile with GCC libraries. I just followed the Linux compile instructions for servo with "./mach bootstrap" and "./mach build" on a Debian Trixie container and it seems to build fine.

It seems to install libunwind-dev and not libunwind19-dev. Both GCC and Clang are also installed.

in reply to Henri

@slyecho I know it can because I was doing it on Ubuntu. But I would *prefer* to choose my own libc rather than having one single Rust package select it for me. Therefore, I am complaining on the Internet.
in reply to mcc

Not really the libc, just an alternate C++ standard library. But yeah, I don't know why it would be incompatible with libunwind like this.
in reply to Henri

@slyecho okay, i'd prefer to pick my own libc++. Honestly, the c++ libs are more likely to be different than the c ones
in reply to mcc

could you download the library manually from github or something?
in reply to Fish Id Wardrobe

@fishidwardrobe Possibly, but that also sounds like a good way to spend four hours fucking with something that ultimately doesn't work. I will probably try it eventually
in reply to mcc

maybe I’m misunderstanding the relationship between LLVM and clang, why would Rust need the C/C++ front end to LLVM rather than just LLVM? I could see if you needed clang to build Rust, and then the deps for servo conflicted, but it doesn’t sound like that’s what you’re describing
in reply to ShadSterling

@ShadSterling Rust needs clang to build C++ libraries. It is not using the system clang (I don't currently have one). Cargo has produced its own clang from somewhere. I'm okay with it doing this because I like clang.

Clang can actually use the gcc stdc++. I was doing this in ubuntu. I would just *prefer* to use the clang one, because I like clang.

in reply to mcc

ah, that makes sense. I forgot that it would be impractical to build static libraries with the library’s preferred compiler 😅.

Looks like another reason to want a dependency manager for C++ that can resolve dependencies without touching system libraries

in reply to mcc

Geezus. 🎶 And the green grass grows all around all around, and the green grass grows all around 🎶
in reply to mcc

in practice the distinction between libstdc++ vs. libc++ is desktop Linux vs. Android/macOS, not gcc vs clang. i am a bit confused by the debian packages conflicting though (haven't looked closely, maybe there's a reason this makes sense)
in reply to leo vriska

@leo Yes but there's no reason you *can't* use libc++ on desktop linux. It *ought* to work.
in reply to mcc

i mean, yes, but every system library will be using libstdc++ and i would be shocked if having both in the same process did not explode in exciting ways. but also this is kind of getting sidetracked
in reply to leo vriska

for the actual issue it seems everyone agrees that the end result is broken but nobody is entirely clear on what part is wrong. i see an issue on a rust repo, llvm, and ubuntu (maybe there should be one for upstream debian too)
in reply to leo vriska

@leo for my purposes, the first thing i intend to ask llvm for is to FRICKING ADD LIBUNWIND TO llvm-config
in reply to mcc

Basicalky at this point I will not use a C library if I can not just build it myself in my own build system.

Also I will not use a C++.

in reply to Dag Ågren ↙︎↙︎↙︎

@WAHa_06x36 I'd say "come use Rust! Our build system's great!" but it turns out our build system stops being great the moment it interfaces with C++ build systems
Unknown parent

mastodon - Link to source
mcc
@stiiin I don't understand this post. What is a background hang monitor?
Unknown parent

mastodon - Link to source
mcc
@stiiin Okay. That's actually useful, I may be able to take that to the Servo zulip. But are you sure no C/C++ dependencies of servo make use of libunwind additionally?
Unknown parent

mastodon - Link to source
mcc
@stiiin Well, I have at least two paths to getting libunwind working on my system, so this isn't necessary for my sake. But if I've piqued your interest feel free (also the Servo project really is great and the dev community is friendly, so this might be a good way of getting used to their codebase in case you want to hack it more later).
Unknown parent

mastodon - Link to source
mcc

@stiiin This was my project:

mastodon.social/@mcc/113354313…

This gave me some experience with embedding Servo as a project, so I may be able to help with simple stuff. What I'm trying to do is fix Cuervo so it builds on machines other than my own. (Apparently I failed to do that correctly the first time.)


Okay. Okay!!! I did it!!!

I made a web browser!!!

It is the world's *worst* web browser!!!

But it is a web browser!!!

(The video glitches at the end. This is Ubuntu's fault. The video is supposed to show me loading mastodon.social and "(Page is empty.)" displaying because I choke on the JavaScript. I'm exhausted and not fixing this.)