0

I have a problem with pdflatex compiler which goes with Miktex install.

I used to compile my tex file using pdflatex command which point to a compiler in MikTeX install directory (/home/***/usr/bin/Miktex/bin/pdflatex) but it seems, after an update of my system (archlinux), that it cannot work properly anymore.

I repeatedly get this error:

segmentation fault (core dumped) 

wether i run pdflatex, or pdflatex main or pdflatex main.tex

Sometimes after trying a dozen time it will finally start:

This is pdfTeX, Version 3.141592653-2.6-1.40.24 (MiKTeX 22.10) (preloaded format=pdflatex.fmt)
 restricted \write18 enabled.
**

and if i enter the name of my file it will finally compile:

entering extended mode
(main.tex
LaTeX2e <2022-11-01> patch level 1
L3 programming layer <2023-02-02>
(/home/***/.miktex/texmfs/install/tex/latex/koma-script/scrartcl.cls
Document Class: scrartcl 2022/10/12 v3.38 KOMA-Script document class (article)
(/home/***/.miktex/texmfs/install/tex/latex/koma-script/scrkbase.sty
(/home/***/.miktex/texmfs/install/tex/latex/koma-script/scrbase.sty
(/home/***/.miktex/texmfs/install/tex/latex/koma-script/scrlfile.sty
(/home/***/.miktex/texmfs/install/tex/latex/koma-script/scrlfile-hook.sty
(/home/***/.miktex/texmfs/install/tex/latex/koma-script/scrlogo.sty)))
(/home/***/.miktex/texmfs/install/tex/latex/graphics/keyval.sty)))
...

Any ideas on what is causing this segmentation fault error?

thanks for your help

EDIT: I thought maybe looking at dmesg can help to solve this issue:

traps: pdflatex[7362] general protection fault ip:7fb0976d81a8 sp:7ffcc465b120 error:0 in libboost_locale.so.1.81.0[7fb0976bc000+5f000]

a few days ago I had an update of libboost_locale.so.1.80.0 to libboost_locale.so.1.81.0.1. MikteX refused to compile because it couldn't find libboost_locale.so.1.80.0 (it was replaced by ... 1.81). So I did what I found to solve this issue which was linking the library like this :

/usr/lib/libboost_locale.so.1.80.0 -> libboost_locale.so.1.81.0

As you can see from dmesg above there is an error in that library. This may help to narrow the problem down, but I still don't know what is going on.

EDIT: To be more precise, once I linked this first library, it asked me for libboost_chrono.so.1.80 and libboost_thread.so.1.80 as well, so I felt I was on the right path doing that, in the end I created links for those three libraries (1.80 --> 1.81) which was in fact a mistake as Employed Russian pointed out below.

2
  • Why are you using miktex on linux? Even for window I would nowadays recommend texlive. Texlive is much more widely used and thus better tested, is much more actively maintained and suffers from far less packaging errors. Feb 11 at 11:36
  • Well, I guess it is because I started using LateX when I was on a Windows machine a few months ago and at that time it seemed that MikTek was working just fine on Windows. A quick browse shows that there is some kind of a debate around this (tex.stackexchange.com/questions/20036/… ; reddit.com/r/LaTeX/comments/lwnl53/… ). But thanks for pointing that out I simply didn't heard about TexLive at that time.
    – Ekla HSV
    Feb 11 at 18:05

1 Answer 1

0

So I did what I found to solve this issue which was linking the library like this

Doctor, it hurts when I do this.

Undo this; find a copy of libboost_locale.so.1.80.0 and copy that library into /usr/lib, and that should fix your crash.

There is a reason the libboost_locale 1.80 and 1.81 have different SONAME -- they are not ABI-compatible. So what you did is actually break every program which was built against version 1.80.

Update:

How do you preserve those kind of files when there is an update?

Normally the package manager takes care to not remove older packages when there are other packages which depend on the older version.

But the files in $HOME/usr/bin/Miktex/bin/... is not part of managed packages, and so the package manager doesn't know anything about them. Hence the breakage.

You should either use managed packages for miktex, or you should exercise extreme care when updating. Most package managers also allow you to pin a package to a specific version, precisely so the manager doesn't blow up your unmanaged packages.

Because those files just disappeared with the update and it is weird to have to manually reinstall them.

There is nothing weird about this, as should be clear from above.

Since my package manager doesn't show me the older version I guess I have to git clone it ..

That may plant another land mine for future you. In addition, you may not know how to build the 1.80 version in ABI-compatible way.

Instead you should search for "$your_distribution libboost_locale.1.80.0", download the package from distro repository, manually unpack that package into a temporary directory and copy the library over.

For ArchLinux, you can download the older version(s) from https://archive.archlinux.org/packages/b/boost-libs/

2
  • yeah, I knew this move was ugly. How do you preserve those kind of files when there is an update ? Because those files just disappeared with the update and it is weird to have to manually reinstall them. Since my package manager doesn't show me the older version I guess I have to git clone it ...
    – Ekla HSV
    Feb 12 at 10:16
  • Thanks for your update. I used the link you provided for Arch distro and downloaded the boost-lib package v. 1.80. Instead of copying the library directly in the folder I put it in another directory so I know it goes with miktex and created a link in the main /usr/lib directory. I also edited this post because there is not only one but three libraries that I had to link it was not only libboost_locale but also libboost_chrono and libboost_thread. Thank you very much for your help.
    – Ekla HSV
    Feb 13 at 18:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.