LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   a question on texlive's kpathsea and LD_LIBRARY_PATH (https://www.linuxquestions.org/questions/slackware-14/a-question-on-texlives-kpathsea-and-ld_library_path-837973/)

tramni1980 10-14-2010 02:29 AM

a question on texlive's kpathsea and LD_LIBRARY_PATH
 
Dear Slackers,

I recently installed a Slackware-13.1 32 bit system and I encountered an odd problem.

I had a texlive-2010 package from slackbuilds.org, previously compiled on another 32 bit Slack-13.1 system. I just installed the precompiled package on the new system. However, whenever I tried to issue a latex command, kpathsea complained that it cannot find the shared library file libkpathsea.so.6. I googled a bit and I found that this could be circumvented by setting the environment variable LD_LIBRARY_PATH to "/usr/share/texmf/lib", where the library in question actually is. This solved the problem. The weird thing is that on other machines I have installed, kpathsea had no issues whatsoever and I did not have to set the LD_LIBRARY_PATH. The only difference is that on those systems I had compiled and installed texlive, not just installing a precompiled package. Could that be causing the issue?

Any suggestions will be appreciated.

Regards,
Martin

John VV 10-14-2010 10:04 PM

maybe "ldconfig" was ran
and that location in in the system
this is normally ran with a source install

tramni1980 10-15-2010 01:34 AM

Quote:

Originally Posted by John VV (Post 4127846)
maybe "ldconfig" was ran
and that location in in the system
this is normally ran with a source install

Dear John,

Thank you very much for your suggestion. I will try it and see what happens.

Regards,
Martin

tramni1980 10-15-2010 01:57 AM

John, you were right. I did a little investigation on my machine at home where I compiled the package and where kpathsea found what it needed. Here are the results:
Code:

bash-4.1# ldd /usr/share/texmf/bin/pdflatex | grep libkpathsea.so.6
        libkpathsea.so.6 => /home/marto/build/tmp/texlive-20100722-source/inst/lib/libkpathsea.so.6 (0xb7644000)
bash-4.1# ldconfig -p | grep libkpathsea.so.6
        libkpathsea.so.6 (libc6) => /usr/share/texmf/lib/libkpathsea.so.6

Obviously on this machine the problem did not occur just because I still have not deleted the directory /home/marto/build/tmp/texlive-20100722-source, where I compiled texlive-2010. How can I make the system search for libkpathsea in /usr/share/texmf/lib instead in /home/marto/build/tmp/texlive-20100722-source/inst/lib/? Maybe I have to manually edit the /etc/ld.so.conf file?

Regards,
Martin

rworkman 10-17-2010 10:37 PM

I just mailed you privately, but I'll respond here too:

Quote:

Originally Posted by tramni1980 (Post 4128039)
Code:

bash-4.1# ldd /usr/share/texmf/bin/pdflatex | grep libkpathsea.so.6
        libkpathsea.so.6 => /home/marto/build/tmp/texlive-20100722-source/inst/lib/libkpathsea.so.6 (0xb7644000)
bash-4.1# ldconfig -p | grep libkpathsea.so.6
        libkpathsea.so.6 (libc6) => /usr/share/texmf/lib/libkpathsea.so.6

Obviously on this machine the problem did not occur just because I still have not deleted the directory /home/marto/build/tmp/texlive-20100722-source, where I compiled texlive-2010. How can I make the system search for libkpathsea in /usr/share/texmf/lib instead in /home/marto/build/tmp/texlive-20100722-source/inst/lib/? Maybe I have to manually edit the /etc/ld.so.conf file?

Well, it's a bit disturbing that the compiled binaries still search the build directory paths - that shouldn't happen (darn it, another thing to investigate later), but the problem you're encountering is my fault. I haven't confirmed this for sure, but it seems that the TeXLive 2009 stuff statically linked libkpathsea while 2010 links it dynamically. Since I didn't notice that, I failed to copy the shared library into the package directory. I attached a (probably) correct build script to the mail I sent, and assuming it is indeed correct, I'll get that into the SBo git repo tomorrow.

grissiom 10-22-2010 12:20 AM

Strange... I don't have that problem here:

Code:

> ls /var/log/packages/texlive*
/var/log/packages/texlive-20100722-x86_64-1_SBo
> ldd /usr/share/texmf/bin/pdflatex
        linux-vdso.so.1 =>  (0x00007fffc7310000)
        libpng14.so.14 => /usr/lib64/libpng14.so.14 (0x00007ffd933f8000)
        libz.so.1 => /usr/lib64/libz.so.1 (0x00007ffd931e2000)
        libpoppler.so.5 => /usr/lib64/libpoppler.so.5 (0x00007ffd92ddf000)
        libstdc++.so.6 => /usr/lib64/libstdc++.so.6 (0x00007ffd92ad0000)
        libm.so.6 => /lib64/libm.so.6 (0x00007ffd9284d000)
        libgcc_s.so.1 => /usr/lib64/libgcc_s.so.1 (0x00007ffd92637000)
        libpthread.so.0 => /lib64/libpthread.so.0 (0x00007ffd9241a000)
        libc.so.6 => /lib64/libc.so.6 (0x00007ffd920a5000)
        liblcms.so.1 => /usr/lib64/liblcms.so.1 (0x00007ffd91e6d000)
        libjpeg.so.8 => /usr/lib64/libjpeg.so.8 (0x00007ffd91c34000)
        libxml2.so.2 => /usr/lib64/libxml2.so.2 (0x00007ffd918e8000)
        libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007ffd91662000)
        libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007ffd9142e000)
        /lib64/ld-linux-x86-64.so.2 (0x00007ffd9361d000)
        libdl.so.2 => /lib64/libdl.so.2 (0x00007ffd9122a000)
        libexpat.so.1 => /usr/lib64/libexpat.so.1 (0x00007ffd91007000)

No libkpathsea.so.6 dependency for pdflatex...

tramni1980 10-22-2010 02:43 AM

Yes, I have that dependency because I compiled texlive with a slightly modified script to enable xindy and disable multiplatform.

Currently I circumvent the problem by adding /usr/share/texmf/lib to /etc/ld.so.conf.


All times are GMT -5. The time now is 01:27 AM.