plk / biber

Backend processor for BibLaTeX
Artistic License 2.0
336 stars 37 forks source link

Problems with PATH when running from BibDesk #145

Closed simifilm closed 7 years ago

simifilm commented 8 years ago

This is a rather lengthy story …

Although it is not officially supported, if been using biber for previewing in BibDesk (on macOS). This does work quite fine in principle (some biber specialities are not supported, but that's not so important). I run into problems with self-built versions of biber though.

When I build biber myself, the builds end up in /opt/local/bin. This is because I need a newer version of Perl than the one provided by Apple which I install with macports.

When I try to run biber from /opt/local/bin in BibDesk, it fails. We had quite long discussions on this on the BibDesk side (see this bug), but what it seems to boil down to is that biber is rather fragile about PATH. It's not enough that BibDesk knows the location of the biber binary, other things seem also come into play. Is there a chance to make biber more robust for this kind of setup? Or is there a smarter strategy for me with my builds?

plk commented 8 years ago

Are you sure you ate using a built binary? I also use macports and I just do "sudo Build install" to install biber - I never build a binary for myself. Is /opt/local/bin/biber a binary or a perl script?

simifilm commented 8 years ago

I guess I used the wrong nomenclature and actually meant a perl script. I also use "sudo Build install" to have it installed in /opt/local/bin/.

plk commented 8 years ago

Ah, well, then it's entirely possible to have problems due to the PATH which BibDesk sees. On OSX, this can be annoying as GUI apps see a different path to those started from the commend prompt. I often have to mess about to get Emacs to recognise the right biber. It depends a lot on which version of OSX too. First thing is to find out what PATH BibDesk is seeing. This is likely nothing to do with biber and more to do with PATH environments in OSX.

simifilm commented 8 years ago

Is there anything that could be done on the BibDesk side to improve the situation?

plk commented 8 years ago

I am not sure without knowing what the error is. I doubt it though it though - it is more likely that the environment in OSX needs to be modified to get the right PATH. With 10.10+, /etc/launchd.conf is no longer supported to set paths for GUI programs. It is more complicated now, as I remember, you have created a script to set the PATH and created a launch daemon to start from ~/Library/LaunchAgents/com.user.login.plist.

simifilm commented 8 years ago

Maybe you could join the discussion on the BibDesk side.