[tex-live] TeX Live 2008, i386-freebsd, FreeBSD 6.4 and i386-linux

Conny Andersson unitex at telia.com
Wed Mar 18 22:36:33 CET 2009

Hi all of you: Yue Wang, Norbert Preining, Edward Barrett, Karl Berry

All of my problems with TeX Live 2008 on FreeBSD 6.4 are solved. Without 
the help from you Yue Wang and Norbert Preining this would not have been 
possible. Thank you very much.

First I turn to you Yue Wang:

I have successfully built the TeX Live 2008 for i386-freebsd from source 
(texlive-20080816-source.tar.lzma). As you suggested.

> But Conny, can you try to build the TeXLive source tree on your
> FreeBSD 6.4, and copy all the binaries to your bin/freebsd-i386
> directory. This should be work for you (and no libmap.conf is needed).
> Only by this way all the libraries will be correctly linked. And this
> should be the best way to solve your problem.

Yes it was!

You also made clear to me that:

> Before building the sources, read the README carefully
> (for example, you should always set the TL_MAKE to gmake, and set the
> fontconfig library path to /usr/local)

In the README I saw that 'Bison and Flex (or maybe equivalents) are needed 
for web2c'. Flex was on my system, but not bison, so I built bison from 
/usr/ports/devel/bison/. I edited the Build-script to ${TL_MAKE=gmake}. I 
also noticed that --without-xindy, was the default when reading/editing the 
Build script.

I called ./Build --with-fontconfig=/usr/local

And, after circa 90 minutes of a scrolling xterm-screen I got:

/home/unitex/texlive-20080816-source/inst/bin/i386-unknown-freebsd6.4 && strip 
* >/dev/null 2>&1 || true

make world done.
      7243.64 real      6184.86 user       487.10 sys

./Build:  292 binaries in /home/unitex/texlive-20080816-source/inst/bin.

The build run smoothly, but I saw i386-unknown-freebsd6.4 several times and 
was surprised. But, I let the build proceed. I checked out that it did come 
from the shell-script config.guess's 'echo i386-unknown-freebsd`echo 
${UNAME_RELEASE}' in texlive-20080816-source/config/, maybe beacuse I had 
recompiled the normal GENERIC kernel to my custom kernel ALICE.

But, i386-unknown-freebsd6.4 is nothing other than the name of a directory. 
And, I am not using that directory for anything else than copying my fresh, 
nicely built binaries from. I did not copy all 292 binaries, just those 
that already were present in /usr/local/texlive/2008/bin/i386-freebsd.

I did not delete the leftovers binaries, they can be useful later on. In 
fact I kept the texlive-20080816-source/ as is, after the build.


Before the build I had removed all of texlive from my disc, to get a 
cleaner starting point. No symlinks referring from /usr/local/bin to 
texlive/2008/bin/i386-linux/binaries. When removing I used Norbert's 

> Calling
>        tlmgr uninstall
> should have done all that for you

Then I installed as Norbert adviced me:

> It seems that the binaries we have for lzmadec.i386-freebsd are not
> working.
> Do you have on your system a working lzmadec? If yes you can do the
> following:
> - get the network installation package
>        mirror.ctan.org/systems/texlive/tlnet/2008/install-tl-unx.tar.gz
> - unpack it
> - replace
>        install-tl/tlpkg/installer/lzma/lzmadec.i386-freebsd
>  with a working copy
> - call install-tl as is (thus installing from the network), or with
>        perl ./install-tl -location /dvd/texlive/
>  which will use the packages from the DVD.
> - after the installation is done again replace the lzmadec.i386-freebsd
>  in DESTINATION_FOLDER/texlive/2008/tlpkg/installer/lzma/
> Hope that helps.

The fresh new binaries were copied (so the already installed ones were 
overwritten one by one as I saw them as needed. The overwritten ones did 
come from the foregoing install from the DVD, TeX Collection).

Last, I called texconfig, and rebuilt the filename databases, so I got 
mktexlsr: Done


And, all binaries are now working. Earlier ldd on i386-freebsd binaries 
gave (with pdflatex as an example):

unitex at alice [/dvd/texlive/bin/i386-freebsd] > ldd ./pdflatex
         libm.so.5 => not found (0x0)
         libc.so.7 => not found (0x0)

And, i386-linux gave (when installed):

unitex at alice [/usr/local/bin] > ldd pdflatex
 	libm.so.6 => /lib/obsolete/linuxthreads/libm.so.6 (0x28194000)
 	libc.so.6 => /lib/obsolete/linuxthreads/libc.so.6 (0x281bb000)
 	/lib/ld-linux.so.2 (0x2816d000)

NOW ldd gives (and also confirms working symlinks):

unitex at alice [/usr/local/bin] > ldd pdflatex
         libm.so.4 => /lib/libm.so.4 (0x2818c000)
         libc.so.6 => /lib/libc.so.6 (0x281a2000)

Much more BSD-like, and now xdvi and all other things work without 

My problems are now solved. And I am very happy, thanks to you.


Library summary to why TeX Live 2008 does not work on FreeBSD 6.4:

On the DVD in [tlpkg/installer/lzma] > ldd lzmadec.i386-freebsd
         libc.so.7 => not found (0x0

On the DVD in [tlpkg/installer/lzma] > ldd lzma.i386-freebsd
         libstdc++.so.6 => not found (0x0)
         libm.so.5 => not found (0x0)
         libgcc_s.so.1 => not found (0x0)
         libc.so.7 => not found (0x0)

The now working in my /usr/local/texlive/2008/tlpkg/installer/lzma/:

  [tlpkg/installer/lzma] > ldd lzmadec.i386-freebsd
         libc.so.6 => /lib/libc.so.6 (0x2807b000)

  [tlpkg/installer/lzma] > ldd lzma.i386-freebsd
         libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x2808d000)
         libm.so.4 => /lib/libm.so.4 (0x28158000)
         libc.so.6 => /lib/libc.so.6 (0x2816e000)

(To try to run i386-linux binaries, that I see as no good solution.)

So, the most clean, easy way to install a working TeX Live 2008 on a 
FreeBSD system that complains about missing libraries is to build binaries 
from source - the texlive-20080816-source.tar.lzma . Lesson learned by 
doing, so to speak.


On Sun, Mar 15, 2009 at 11:46:54PM +0100, Conny Andersson wrote:
>> So I did that, but then libc.so.7 did pop up as missing - again - when
>> trying to run any TeX-program. And, solving that via /etc/libmap gave
>> ld-linux.so.1 as missing. And, solving that gave me 'segmentation fault'.
>> Like Russian dolls ...

On Tue, 17 Mar 2009 18:14:33 +0000, Edd Barrett wrote:
> This is exactly why I made a port for OpenBSD. The shared libs on
> community driven operating systems bump quickly. By making a port, the
> build is automated every 2 weeks and put on the FTP servers, linking the
> libraries -current is using at the time.

> You can try symlinking the missing libs, but its a hack and probably
> will break at some stage.

As matter of fact Edward, I did read your very interesting article 'Porting 
TEX Live to OpenBSD' in the paper edition of TUGboat, Volume 29 (2008). It 
was for the third time I read it, now when trying to solve my problem. You 
had to work very hard to port TeX Live, but you made it. So, it is not so 
easy to make a FreeBSD port, but your work on the port to OpenBSD may have 
made it a lot easier.


Yue Wang wrote that:

> Maybe for TL09 we should consider building binaries on old releases (like 
> 5.x) so all the releases will be supported. (But newer versions like 6 and 7 
> should install extra compatibility packages from ports tree).

I think that is a very good idea. I saw in the article 'explaining-bsd':

'BSD handles library version upgrades by providing compatibility modules 
for earlier library versions, so it is possible to run binaries which are 
several years old with no problem.'

And, in a 'migration-guide.html:

'Any changes that could break backward compatibility (including kernel or 
library interefaces) are strongly discouraged, and will not be permitted 
except as a last-resort solution to a critical problem.'

On March 17, Karl Berry wrote:
> Well, that seems like a problem.  If people on newer systems have to
> install more packages, then the benefit of "supporting" older systems is
> rather murky.
> Anyway, of course it's up to you FreeBSD guys to figure out the
> maximally useful binaries.  I'll just take what I'm given :).

I think that backward compatibility, is no (big) problem. It might already 
have been done in/via the GENERIC kernel:

options 	COMPAT_43		# Compatible with BSD 4.3 [KEEP #THIS!]
options 	COMPAT_FREEBSD4		# Compatible with FreeBSD4
options 	COMPAT_FREEBSD5		# Compatible with FreeBSD5

I, myself, always look for the most stable FreeBSD with the longest time to 
live, i.e. supported by freebsd-security-notifications. Most of the time it 
means one step back in branch, from 7.x to 6.x etc.


I am happy, and I am very grateful to you Yue Wang and Norbert Preining. 
And, all the rest of you who wrote the sources that made my build run 
smoothly. Thank you all for the nice approach you have when helping guys 
like me. At last, thank you Edward Barrett for the exceptional article in 

Happy TeX-greetings - best wishes,


   Conny Andersson
<unitex at telia.com>

More information about the tex-live mailing list