[gopher] Dynamically linked Mosaic on Linux??

Florian E. Teply usenet at teply.info
Mon Nov 8 16:37:55 UTC 2010


On Mon, 08 Nov 2010 13:23:39 +0200
Kim Holviala <kim at holviala.com> wrote:

> On 2010-11-07 23:14, Florian E. Teply wrote:
> 
> > First, i wouldn't want to make a static build for my laptop as RAM
> > is already scarce in modern terms (only 512 Meg).
> 
> [kimmy at x301 ~]$ ldd bin/Mosaic
>          linux-vdso.so.1 =>  (0x00007fffde7ff000)
>          libXext.so.6 => /usr/lib/libXext.so.6 (0x00007fc72bfbd000)
>          libXpm.so.4 => /usr/lib/libXpm.so.4 (0x00007fc72bdac000)
>          libXm.so.3 => not found
>          libXmu.so.6 => /usr/lib/libXmu.so.6 (0x00007fc72bb91000)
>          libXt.so.6 => /usr/lib/libXt.so.6 (0x00007fc72b92d000)
>          libX11.so.6 => /usr/lib/libX11.so.6 (0x00007fc72b5f0000)
>          libICE.so.6 => /usr/lib/libICE.so.6 (0x00007fc72b3d5000)
>          libSM.so.6 => /usr/lib/libSM.so.6 (0x00007fc72b1cd000)
>          libc.so.6 => /lib/libc.so.6 (0x00007fc72ae6b000)
>          libxcb.so.1 => /usr/lib/libxcb.so.1 (0x00007fc72ac4f000)
>          libdl.so.2 => /lib/libdl.so.2 (0x00007fc72aa4b000)
>          libuuid.so.1 => /lib/libuuid.so.1 (0x00007fc72a846000)
>          /lib64/ld-linux-x86-64.so.2 (0x00007fc72c1e3000)
>          libXau.so.6 => /usr/lib/libXau.so.6 (0x00007fc72a643000)
>          libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x00007fc72a43e000)
> 
> Not completely static build for me anyway... and it seems that I'm 
> missing libXm :-). What else did you want as libraries?
> 
well, ldd here spits out some more, libjpeg and libpng amongst it as
well as libz and libm. Just exchanged all calls for libxy.a to -lxy in
the Makefile.

> Looking at the sources, at least these are built statically:
> 
> [kimmy at x301 mosaic27ck8]$ ls -d lib*
> libdtm  libhtmlw  libnet  libnut  libwww2  libXmx
> 
Well, they hopefully are taken care of in the Makefile of Mosaic, so i
actually don't care too much about them.

> Also libpng, libjpeg and libgif are strangely integrated into the 
> codebase... I probably wouldn't even try to separate those...
> 
Well, i haven't dug that deep into Mosaic either, but judging from the
error message i got at least for libpng it's the fact that they're
using some function that's declared internal since version 0.95 (about
1998 i think). After changing the function call to the "new" one it
compiled fine. By tweaking the Makefile i coaxed it into including
libjpeg dynamically as well, libgif i haven't seen though.
So i might just caused the breaking by that. Dunno.

> > Second, it doesn't work
> > out-of-the-box either (static linking that is) due to some library
> > issues.
> 
> Hmm. Worked for me for my frankendebian system (part testing, part 
> unstable, some experimental and a doze of ubuntu) a few months ago. 
> Looks like it doesn't work now since I'm missing Xm.
>
Well, here it is a fairly up-to-date Gentoo on PPC. And i believe all
dependencies are fulfilled (unless there are version issues i didn't
notice), but i don't know for sure.

> [fiddling with stuff]
> 
> Just downloaded the latest version from Cameron (mosaic27ck9) and it 
> worked on my system without any patching. Version k8 required some 
> fiddling with readline() to work in Linux but this one worked out of
> the box.
> 
Read about that one somewhere, but didn't need to apparently.

> I have these development packages installed:
> 
> [kimmy at x301 mosaic27ck9]$ dpkg --get-selections | grep -- -dev | awk
> '{ print $1 }' | xargs echo
> 
> autotools-dev dpkg-dev libc-dev-bin libc6-dev libice-dev
> libjpeg62-dev libmotif-dev libncurses5-dev libncursesw5-dev
> libossp-sa-dev libpng12-dev libpthread-stubs0-dev libsm-dev
> libstdc++6-4.4-dev libx11-dev libxau-dev libxcb1-dev libxdmcp-dev
> libxext-dev libxmu-dev libxpm-dev libxt-dev linux-libc-dev
> manpages-dev x11proto-core-dev x11proto-input-dev x11proto-kb-dev
> x11proto-print-dev x11proto-xext-dev xtrans-dev xutils-dev zlib1g-dev
> 
> That's probably way more than enough though, I've got devs for other 
> software too.
> 
Probably enough. Given the nature of gentoo, there is no such thing
there as development packages here.

Just compiling gdb as we speak to check Camerons suggestion.

Regards,
Florian



More information about the Gopher-Project mailing list