Problems building wmx

Ken Moffat ken at kenmoffat.uklinux.net
Thu Feb 12 03:55:18 PST 2004


On Thu, 12 Feb 2004 eklirmr at wanadoo.fr wrote:

> Dear Ken,
>
> Thanks again for your help.  You were right, it's a problem with the
> wmx code which won't compile under GCC 3.3.1.
>
> I suppose that passing the CC variable at make doesn't work because
> it's a c++ program: it should be CCC.
>

Hi, Paul.

 I thought about that, but I wasn't sure what it ought to be, so I
didn't put it in my earlier reply.  Where did you find CCC ?

> So my first idea was to use the kludge in the BLFS book: just for the
> period of the build, put /opt/gcc-2.95.3/bin at the start of PATH.
> That worked:
>

 Hard words - it isn't a kludge !  It's a very normal way of using a
different version of a program - make sure it is found first.

>
> root:/usr/src/wmx-6# ldd wmx
>         libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x40019000)
>         libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40029000)
>         libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40037000)
>         libstdc++-libc6.3-2.so.3 => /usr/lib/libstdc++-libc6.3-2.so.3
> 	(0x400fe000)
>         libm.so.6 => /lib/libm.so.6 (0x40149000)
>         libc.so.6 => /lib/libc.so.6 (0x4016b000)
>         libdl.so.2 => /lib/libdl.so.2 (0x4029b000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
>
> root:/usr/src/wmx-6# ls -la wmx
> -rwxr-xr-x    1 root     root       649552 2004-02-12 07:44 wmx
>

> But then I tried CCC:
>
>
> root:/usr/src/wmx-6# ls -la wmx
> -rwxr-xr-x    1 root     root       746565 2004-02-12 08:31 wmx
>
> root:/usr/src/wmx-6# ldd wmx
>         libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x40019000)
>         libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40029000)
>         libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40037000)
>         libc.so.6 => /lib/libc.so.6 (0x400fe000)
>         libdl.so.2 => /lib/libdl.so.2 (0x4022e000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
>
> The libstdc++ library is no longer linked.  Presumably the wmx
> executable is now so much bigger because the library code is included
> in the executable now?

 Sounds like it.  Maybe there is conceptual baggage associated with CCC.
>
> But then I realized I probably should have said g++ and not gcc:
>
>
> root:/usr/src/wmx-6# ls -la wmx
> -rwxr-xr-x    1 root     root       643048 2004-02-12 09:09 wmx
>
> root:/usr/src/wmx-6# ldd wmx
>         libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x40019000)
>         libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40029000)
>         libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40037000)
>         libstdc++-libc6.3-2.so.3 => /usr/lib/libstdc++-libc6.3-2.so.3
> 	(0x400fe000)
>         libm.so.6 => /lib/libm.so.6 (0x40149000)
>         libc.so.6 => /lib/libc.so.6 (0x4016b000)
>         libdl.so.2 => /lib/libdl.so.2 (0x4029b000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
>
>
> This looks ok but I would expect it to give the same results as the
> $PATH kludge; however the executable is not the same size.

 I guess the way the compiler is called alters some of what it does.  If
you look at g++ it's just a wrapper script.  Anyway, you've got it
running and you've taken time out to compare different methods.  Good
stuff.

Ken
-- 
Brighton tops UK Jedi league
http://www.theregister.co.uk/content/28/35186.html




More information about the blfs-support mailing list