"pdflatex: gave an error" but where is the error's description? - latex

The pdflatex: gave an error:
$ latexmk -pdf std
Rc files read:
latexmkrc
Latexmk: This is Latexmk, John Collins, 18 Nov. 2022. Version 4.78, version: 4.78.
Latexmk: Nothing to do for 'std.tex'.
Latexmk: All targets () are up-to-date
Collected error summary (may duplicate other messages):
pdflatex: gave an error
Latexmk: If appropriate, the -f option can be used to get latexmk
to try to force complete processing.
Maybe I miss something, but where is the error's description? Where is to see it? How do I know what the error is? Confused.

Related

biber wants to load libcrypt.so.1 but it is missing

I am Arch GNU/Linux user who usually manages almost every package with pacman; I manage TeX and LaTeX-related things with tlmgr. I installed tlmgr from source.
I am writing paper. I would like to use bibliography.
When I tried latexmk -pdflua main.ltx:
Rc files read:
latexmkrc
Latexmk: This is Latexmk, John Collins, 20 November 2021, version: 4.76.
Latexmk: applying rule 'biber main'...
Rule 'biber main': The following rules & subrules became out-of-date:
'biber main'
------------
Run number 1 of rule 'biber main'
------------
------------
Running 'biber "main.bcf"'
------------
biber: error while loading shared libraries: libcrypt.so.1: cannot open shared object file: No such file or directory
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
biber main: Could not open biber log file for 'main'
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs, or warnings treated as errors.
libcrypt.so* on my environment
$ pacman -Qo /usr/lib/libcrypt*
/usr/lib/libcrypto.so is owned by openssl 1.1.1.m-1
/usr/lib/libcrypto.so.1.1 is owned by openssl 1.1.1.m-1
/usr/lib/libcryptsetup.so is owned by cryptsetup 2.4.3-2
/usr/lib/libcryptsetup.so.12 is owned by cryptsetup 2.4.3-2
/usr/lib/libcryptsetup.so.12.7.0 is owned by cryptsetup 2.4.3-2
/usr/lib/libcrypt.so is owned by libxcrypt 4.4.28-1
/usr/lib/libcrypt.so.2 is owned by libxcrypt 4.4.28-1
/usr/lib/libcrypt.so.2.0.0 is owned by libxcrypt 4.4.28-1
What I tried else
I uninstalled and re-installed biber on tlmgr but did not work.
# ln -s /usr/lib/libcrypt.so /usr/lib/libcrypt.so.1
$ latexmkrc -pdflua main.ltx
Rc files read:
latexmkrc
Latexmk: This is Latexmk, John Collins, 20 November 2021, version: 4.76.
Latexmk: applying rule 'biber main'...
Rule 'biber main': The following rules & subrules became out-of-date:
'biber main'
------------
Run number 1 of rule 'biber main'
------------
------------
Running 'biber "main.bcf"'
------------
/tmp/par-716861/cache-0e6aa298f0c2e7a775de99938825b2d56bd2027f/biber: /usr/lib/libcrypt.so.1: version `GLIBC_2.2.5' not found (required by /tmp/par-716861/cache-0e6aa298f0c2e7a775de99938825b2d56bd2027f/biber)
Latexmk: Errors, so I did not complete making targets
Collected error summary (may duplicate other messages):
biber main: Could not open biber log file for 'main'
Latexmk: Use the -f option to force complete processing,
unless error was exceeding maximum runs, or warnings treated as errors.
File source
latexmkrc:
$latex='lualatex %O -synctex=1 -interaction=nonstopmode %S';
#$bibtex='upbibtex %O %B';
$bibtex='biber %O %B';
$makeindex='upmendex %O -o %D %S';
$pdf_mode=3;
Install libxcrypt-compat from the Core (1) repository, as suggest in this answer.
This made my biber from TeX Live 2020 work again. The interesting question is if newer TeX distributions will require this package, too.
(1) Thanks to #samueldy for the hint that the package was moved from the AUR to Core.
Adding on to #Christoph90's answer, as of 25 May 2022 the libxcrypt-compat package is still required in TeX Live 2022 in order for biber to function on Manjaro 21.2.6. However, the package has moved to core/libxcrypt-compat, so install by doing
sudo pacman -S libxcrypt-compat

R Markdown: PDF Document compile error (pdf backend)

I decided to write my thesis in rmarkdown and have issues in knitting the document to pdf. It is a very large file. The document works with html_output but has issues in compiling using pdf_output. As I save the latex file using keep_tex I can then run it and it safely outputs a pdf_document (with some formatting issues).
date: "8/12/2019"
output:
pdf_document:
keep_tex : true
latex_engine : lualatex
includes :
before_body : Title.sty
fig_width : 6
fig_height : 4
fig_caption : TRUE
citation_package: biblatex
bibliography: Bibliographytxt.bibtex
output file: Test.knit.md
tlmgr search --file --global "/biblatex-dm.cfg"
tlmgr search --file --global "/Test.bbl"
! error: (file "Test_files/figure-latex/""Decision_Trees-1".png) (pdf backend):
Error: Failed to compile Test.tex. See https://yihui.name/tinytex/r/#debugging for debugging tips. See Test.log for more info.
In addition: Warning messages:
1: In readLines(log) : incomplete final line found on 'Test.log'
2: In parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)) :
Failed to find a package that contains biblatex-dm.cfg
3: In parse_packages(logfile, quiet = c(TRUE, FALSE, FALSE)) :
Failed to find a package that contains Test.bbl
Execution halted
Does anyone know why R is reading the file like:
! error: (file "Test_files/figure-latex/""Decision_Trees-1".png) (pdf backend):
where the file Decision_Trees-1 is being read somehow in double quotation marks!?
Should it not read "Test_files/figure-latex/Decision_Trees-1.png".
In addition, the knitr::include_graphics("Mypdf.pdf") does not seem to work either when I try to load a file, either in pdf or png format.
Please help.

How to store the result of compilation (using javac) to a text file?

I want to compile a Hello World program. I use javac Hello_World.java. However in cmd terminal window, it shows "semicolon is missing" compilation error.
How do I store this compilation error into a text file? Or even a string will do. How do I "catch" this error? I tried
javac filename.java 2 > textfile.txt
But javac still prints stderr and stdout to screen.
Get rid of the space between 2 and >
javac filename.java 2> textfile.txt
Another way is by redirecting stderr into stdout:
javac filename.java > textfile.txt 2>&1
More info: https://support.microsoft.com/en-us/help/110930/redirecting-error-messages-from-command-prompt-stderr-stdout
-verbose is what you´re looking for. It will show the logs of the compiler, then you put the output in a file.
javac XXX -verbose > textfile.txt

Ruby roo not finding complex file names

I am using roo to process some Excel files with complex file names (e.g. "Patient Status Up-Date-V2 051812.xlsx"). They are found with proper escaping with OS commands, but not from Ruby roo (which uses fileutils):
ls -lt Patient\ Status\ Up-Date-V2\ 051812.xlsx
shows:
-rw-r--r-- 1 hamid hamid 128770 May 22 09:22 Patient Status Up-Date-V2 051812.xlsx
but
ruby -rubygems ./findbi.rb Patient\ Status\ Up-Date-V2\ 051812.xlsx
gives:
/usr/local/lib/ruby/gems/1.8/gems/roo-1.10.1/lib/roo/excelx.rb:103:in
`initialize': file Patient\ Status\ Up-Date-V2\ 051812.xlsx does not
exist (IOError)
I have tried many variations of escaping (on "-" for example), permission changes, run as root, etc to no avail. Line #103 in excelx.rb is line:
raise IOError, "file #{#filename} does not exist"
Please help before I pull out the Perl!
Thanks,
Hamid.

Xcode Build error, arm-apple-darwin11-gcc-4.2.1 execvp: No such file or directory

After upgrading to Xcode 4.3.2. I'm getting a metric ton of build errors.
A whole line of them are error code 255
gcc-4.2: error trying to exec '/usr/bin/arm-apple-darwin11-gcc-4.2.1': execvp: No such file or directory
Command /usr/bin/gcc-4.2 failed with exit code 255
I noticed that there is no /usr/bin/arm-apple-darwin11-gcc-4.2.1 file on my machine. Could this be the source of the problem?
What's the output of this command?
$ printenv | grep "CC="
It might be honoring your C Compiler (CC) selection. I was getting similar errors (through cocoapods) and doing an
$ export CC=
fixed it for me.

Resources