Follow

Currently on I have two programs that segfault when launched from a terminal, but not from dmenu. I am dumbfounded.

@Ninjatrappeur
ldd $(realpath $(which unison))
not a dynamic executable

@pureevil @otini

ldd $(dirname $(which unison))/.unison-wrapped


(Does not segfault on a pure nix-shell on my system, nixpkg on aef662d2eb532eeb9976068fd1705e3cf3663054 )

Could also be config file issue.


That said, getting Haskell segfault is always a painful experience to debug.

You could open an GH issue and ping the maintainer alternatively.

@Ninjatrappeur @pureevil unison is not a Haskell program though, it is written in OCaml if I understand correctly.

@otini Oh, I see, there's a naming conflict here. I though we were building https://github.com/unisonweb/unison :P

If LDD do not report any "not found" library, the problem probably lies elsewhere.

I have very little experience with OCAML, I'm afraid I can't really help you. Try to ping the maintainer on IRC or open a GH issue.


Disclaimer: I never used either of unison, I just blindly spawned-up a nix-shell real quick to help you :)

@otini sounds like dmenu has a different PATH and/or LD_LIBRARY_PATH

@andi "Different environments" is my guess as well.

@otini, try running something like "xmessage $(env)" from both terminal and dmenu, and compare the output.

@minoru @andi The two environments indeed differ in many variables, but not in LD_LIBRARY_PATH. They differ in PATH but on the other hand `which unison` returns the same path in both environments.

@otini my money is on environment variables different (if sufficiently so they might be different binaries or using different libraries, etc.). NixOS manages to keep the window manager bits surprisingly clean and free of much user profile bits, so this isn't entirely surprising to me (if nevertheless an unfortunate situation!)

Get anything interesting from running under gdb or so? And if you're on the matrix channel I'm sure folks can help, I'll check there in a few JIC ;).

@wdtz I had a segfault in Zathura originating from somewhere in a PNG library. I'll try to investigate this further soon. Thanks for your advice :)

Sign in to participate in the conversation
Functional Café

functional.cafe is an instance for people interested in functional programming and languages.