I know hat BibDesk does not really biber, still, I was able to use it for years. Preview would work for most cases, if I just entered /Library/TeX/texbin/biber as bibtex Path in the prefs.
This still works, but what does not seem to work, is if I use a programm outside of the regular texbin path. When I build biber from GitHub, it is installed in /opt/local/bin/biber. I can call this build from bash or from TeXShop, but BibDesk seems to ignore it. Preview fails, and biber does not appear in the log.
I don't see why it would not work, we just use the command as su[plied. What does the log output in the separate preview window say?
The log says nothing about
biber, it is not mentioned except thatbiblatexsays it can't find the required.bcfand therefore advises to runbiber. When the path is/Library/TeX/texbin/biberI also get log forbiber.We really do not care about the paths, we just use what we are told. So it must be some problem with your installation. Perhaps you have something set up in your shell initialization file(s) that make things work? In that case, you also need to do that setup in other places that we can learn about, such as in envirnment.plist.
I know nothing about any of these things (like non-custom installations, biber, and biblatex), so I don't know what is needed to make it work. But it must be something about your setup, because we don't care.
The .log file gives me the following:
/opt/local/binis defined as path in.bash_profile, but if I understand the log correctly,BibDeskdoes not seem to pick this up (even though the full path is given in the prefs). Where can I define the paths forBibDesk-There's your problem, I guess. BibDesk, or any app for that matter, does not load your initialization files. Those are only loaded when you run the command line yourself. So we don't know the PATH and other environment variables that may be needed for your setup.
If any app (like BibDesk) needs special environment variables, you can set them in the file ~/.MacOSX/environment.plist, which you may need to create if it doesn't yet exists.
I'll look into that. What I don't get is why the PATH is relevant when I give the whole path to
biberin the prefs.Probably because the command uses other commands and files that it needs to find.
But judging from the log,
biberisn't even called, Anyway, your solution does not seem to work, ~/.MacOSX/environment.plist has been deprecated.If biber isn't run, than it must go wrong already in the first or second tex run. If the command fails, the rest isn't called. I don't know why it fails, it may be again because your PATH isn't pointing to your custom location.
It looks like the environment variables we report in the log aren't exactly the ones that are used (even though they should be the same, somehow the various methods give us inonsistent results). That will be fixed in the next nightly build. But the actual variables we use won't be affected by your initialization file, and apparently also not environment.plst anymore, unfortunately. However, for me the PATH does include /Library/TeX/texbin, so there is some initialization file that sets this, and the tex installer has set that properly. I guess your custom installation did not do that, which means your instalation isn't complete (that's the risk of using custom installations). I'm not sure where the path needs to be set nowaday though.
It's not really a "custom installation". It's a regular MacTeX installation with the paths of mapcorts added to bash.
Anyway, I finally was able to do it. The trick is to add a
.plistfile to ~/Library/LaunchAgents which contains something like this:<plist version="1.0">
<dict>
<key>Label</key>
<string>osx-env-sync</string>
<key>ProgramArguments</key>
<array>
<string>bash</string>
<string>-l</string>
<string>-c</string>
<string>
export PATH="/opt/local/bin:/opt/local/sbin:$PATH" </string>
</array>
<key>RunAtLoad</key>
<true>
</true></dict>
</plist>
It seems like mactex adds a file in /etc/paths.d that contains the tex library, so you could also add a file with the required path there.
Ignore thast, this does not seem to affect app environments.
Environment.plist has been dead since 10.7, thankfully! NSTask environments are bare-bones, and only inherit from the calling process (BibDesk, in this case, which usually inherits from Launch Services). In TeX Live Utility, I have to do a bunch of work to ensure a sane PATH since users kept breaking things by mixing MacTeX/fink/macports.
https://github.com/amaxwell/tlutility/blob/master/TLMEnvironment.m#L398
The best way to log the actual environment is to run env with NSTask and dump it to stdout; then you can see what Apple's doing, and anything Launch Services is doing.
https://github.com/amaxwell/tlutility/blob/master/TLMEnvironment.m#L648
In general, it's best not to do mix distributions or encourage it; anything using kpsewhich, for instance, will have problems, and you'll have bugs that are damn near impossible to track down. Simon's best workaround is probably to create a symlink to his biber in the TL directory or just install it into his TeX Live.
I am not mixing distributions. I think my reference to macports was confusing. I do not use the macports TeX distribution. I merely build
biberfrom GitHub and since it needs a newer version of Perl than macOS offers, I need to install Perl first. This is where macports comes in and that's why mybiberbuild resides in/opt/local/bin/biber(I also like the side effect that thebiberversion installed by MacTeX remains untouched. So I can always switch back). But macport's "TeX activitities" are confined tobiber, everything else is MacTeX.I have to correct something I said. In fact, /Library/TeX/texbin is not in the PATH for the app. We add it ourselves, more precisely the directory of the tex command. We don't do that for the bibtex command, but normally it's tye same. So the problem you find is that you use commands located in different locations.
I have now added both binary directories to the PATH for tomorrow's nightlies. Please try it to see if that works for you.
I have downloaded the latest nightly, but I am not sure what should have changed. It seems that now the correct PATH is displayed in the log, but besides that, everything is the same. I still need to use the solution with a LaunchAgent described above.
Are you sure? As the problem was the PATH, and the PATH now includes the correct path, why shouldn't this work? The one we npw show in the log is the one we use for the command.
Not sure we're talking about the same thing here. BibDesk now displays the PATH in its log which has been set outside of BibDesk, with the LaunchAgent approach I described above. But fact is that I stll need to set this PATH. Simply telling BibDesk in the prefs to use
/opt/local/bin/biberis not enough, BibDesk wont find the program. Maybe this cannot be helped, I don't know.I now have this working, so the problem is solved for me. Still, as a user I find it strange that BibDesk wont find a program even if the exact path is given. This is for me the real issue here
The PATH should now contain both the containing path for the tex program and the bibtex program, without the need for a LaunchAgent. Isn't that the case? It does work for me. And do you have build version 4012?
I have build version 4012. Without the LaunchAgent, the log gives me the following:
None of this helps BibDesk to find
/opt/local/bin/biber.Last edit: Simon Spiegel 2016-10-05
Sorry, you;re right, there was a typo in the code. That will be fixed in the next nightly.
With build 4013 this seems now completely broken. Although
BibDeskpicks up the correct PATH (see log),biberis still not running. What's worse, LaunchAgents now seem to have no effect anymore. So my solution stopped working.