[Scons-users] how to get bbl output of pdflatex?

David Roundy roundyd at physics.oregonstate.edu
Wed Sep 11 19:38:43 EDT 2013


As far as removing the .bbl file by hand, there isn't really a good reason
to do that, but I manage a research group of a half dozen or so students,
with a few new student joining each year, and it's pretty safe to say that
anything that can be done will be done sooner or later. And then I have to
figure out what went wrong and how to get the build working again. Often
when the build breaks, I am unable to discern what a student did in order
to break it, so I like to reduce the number of possible ways that students
can break the build.

The CacheDir issue is the primary one for me. It speeds up our build very
dramatically, by caching the output of every command, so you do not need to
rebuild them. But when the output is cached, only its targets are cached,
not the side effects. And unfortunately, if a file is designated as a side
effect, there is no way (that I have discerned) to create a target for that
file.

The latex commands aren't that time-consuming, so for now I've simply
disabled caching, which means that we are safe so long as no one removes
the .bbl file manually. But I'd rather have the latex result cached, which
avoids huge amounts of latex verbosity being printed to the terminal when
running scons, which can obscure the real error when running scons -j4 on a
clean directory (which we commonly do as a pre-commit test using git).

David


On Wed, Sep 11, 2013 at 2:55 PM, Managan, Rob <managan1 at llnl.gov> wrote:


> Hi David,

>

> You seem to have found that while scons how to clean what it produces

> (scons –c) but at this time we consider the .bbl file a side effect of

> building the target .dvi or .pdf file. That means the .bbl file is not a

> target and if the .pdf is already built then there is no reason to

> regenerate it.

>

> So yes, the tool was set up without thought to side effect files being

> removed by hand. If you did a scons –c then all is well. Can you elaborate

> on why you would have a "rm foo.bbl" in the sequence of things that happens

> to the files?

>

> I have never used the CacheDir command so I am not familiar with that

> part of the question.

>

> *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-

> Rob Managan email managan at llnl.gov

> LLNL phone: 925-423-0903

> P.O. Box 808, L-095 FAX: 925-422-3389

> Livermore, CA 94551-0808

>

>

> On 9/11/13 2:43 PM, "David Roundy" <roundyd at physics.oregonstate.edu>

> wrote:

>

> Hi Dirk,

>

> I can reproduce the error using your code with the following sequence:

>

> scons # works fine

> rm foo.bbl

> scons # fails

>

> Error message:

>

> scons: Reading SConscript files ...

> scons: done reading SConscript files.

> scons: Building targets ...

> tar -c -f arxiv.tar.gz foo.bbl foo.ltx

> tar: foo.bbl: Cannot stat: No such file or directory

> tar: Exiting with failure status due to previous errors

> scons: *** [arxiv.tar.gz] Error 2

> scons: building terminated because of errors.

>

> I could also reproduce a slightly different error by adding

>

> import os

> CacheDir(os.environ['HOME'] + '/.cache/scons')

>

> to the beginning of the SConstruct file, and then running

>

> scons -c # clear out everything

> scons # works fine, runs latex

> scons -c # clear it out again

> scons # fails, with puzzling error message, after pulling foo.pdf out of

> the cache

>

> Error message:

>

> scons: Reading SConscript files ...

> scons: done reading SConscript files.

> scons: Building targets ...

> Retrieved `foo.pdf' from cache

> scons: done building targets.

>

> scons: *** Found dependency cycle(s):

> Internal Error: no cycle found for node arxiv.tar.gz

> (<SCons.Node.FS.File object at 0x2045bd0>) in state pending

>

>

> So your script doesn't seem to me to work very well, precisely because

> there is no rule for generating the bbl file.

>

> David

>

>

> On Wed, Sep 11, 2013 at 12:42 PM, Dirk Bächle <tshortik at gmx.de> wrote:

>

>> Hi David,

>>

>> please find a simple example attached, which seems to work fine on my

>> side. I couldn't reproduce the error you reported with it, so maybe it

>> helps if you compare the files to your original sources.

>>

>> Best regards,

>>

>> Dirk

>>

>>

>> On 07.09.2013 15:37, David Roundy wrote:

>>

>>> Hi all,

>>>

>>> I'm running into a bit of a challenge using the pdflatex builder. This

>>> builds a pdf file just fine:

>>>

>>> env.PDF(target = 'paper.pdf', source = 'paper.tex')

>>>

>>> The tricky bit is that in order to submit to a journal (or

>>> http://arxiv.org), I need the bbl file that is produced. Of course, I

>>> could do this manually by typing bibtex, but the point of scons (and before

>>> that make) is to automate and document the process.

>>>

>>> [...]

>>> ______________________________**_________________

>>> Scons-users mailing list

>>> Scons-users at scons.org

>>> http://four.pairlist.net/**mailman/listinfo/scons-users<http://four.pairlist.net/mailman/listinfo/scons-users>

>>>

>>

>>

>> _______________________________________________

>> Scons-users mailing list

>> Scons-users at scons.org

>> http://four.pairlist.net/mailman/listinfo/scons-users

>>

>>

>

>

> --

> David Roundy

>

> _______________________________________________

> Scons-users mailing list

> Scons-users at scons.org

> http://four.pairlist.net/mailman/listinfo/scons-users

>

>



--
David Roundy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://four.pairlist.net/pipermail/scons-users/attachments/20130911/1b845fd1/attachment-0001.html


More information about the Scons-users mailing list