Problems building wmx

eklirmr at wanadoo.fr eklirmr at wanadoo.fr
Thu Feb 12 00:44:23 PST 2004


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.

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:

root:/usr/src/wmx-6# make
c++ -c -g -O2 -I/usr/X11R6/include Border.C
c++ -c -g -O2 -I/usr/X11R6/include Buttons.C
c++ -c -g -O2 -I/usr/X11R6/include Channel.C
c++ -c -g -O2 -I/usr/X11R6/include Client.C
c++ -c -g -O2 -I/usr/X11R6/include Config.C
c++ -c -g -O2 -I/usr/X11R6/include Events.C
c++ -c -g -O2 -I/usr/X11R6/include Main.C
c++ -c -g -O2 -I/usr/X11R6/include Manager.C
c++ -c -g -O2 -I/usr/X11R6/include Menu.C
c++ -c -g -O2 -I/usr/X11R6/include Rotated.C
c++ -c -g -O2 -I/usr/X11R6/include Session.C
test -f wmx && mv -f wmx wmx.old || true
c++ -o wmx Border.o Buttons.o Channel.o Client.o Config.o Events.o
Main.o Manager.o Menu.o Rotated.o Session.o -L/usr/X11R6/lib -lXpm
-lXext -lX11
root:/usr/src/wmx-6# echo $PATH
/opt/gcc-2.95.3/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin
root:/usr/src/wmx-6# source /etc/profile
Running /etc/profile
root:/usr/src/wmx-6# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin

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# make CCC=/opt/gcc-2.95.3/bin/gcc
/opt/gcc-2.95.3/bin/gcc -c -g -O2 -I/usr/X11R6/include Border.C
/opt/gcc-2.95.3/bin/gcc -c -g -O2 -I/usr/X11R6/include Buttons.C
/opt/gcc-2.95.3/bin/gcc -c -g -O2 -I/usr/X11R6/include Channel.C
/opt/gcc-2.95.3/bin/gcc -c -g -O2 -I/usr/X11R6/include Client.C
/opt/gcc-2.95.3/bin/gcc -c -g -O2 -I/usr/X11R6/include Config.C
/opt/gcc-2.95.3/bin/gcc -c -g -O2 -I/usr/X11R6/include Events.C
/opt/gcc-2.95.3/bin/gcc -c -g -O2 -I/usr/X11R6/include Main.C
/opt/gcc-2.95.3/bin/gcc -c -g -O2 -I/usr/X11R6/include Manager.C
/opt/gcc-2.95.3/bin/gcc -c -g -O2 -I/usr/X11R6/include Menu.C
/opt/gcc-2.95.3/bin/gcc -c -g -O2 -I/usr/X11R6/include Rotated.C
/opt/gcc-2.95.3/bin/gcc -c -g -O2 -I/usr/X11R6/include Session.C
test -f wmx && mv -f wmx wmx.old || true
/opt/gcc-2.95.3/bin/gcc -o wmx Border.o Buttons.o Channel.o Client.o
Config.o Events.o Main.o Manager.o Menu.o Rotated.o Session.o
-L/usr/X11R6/lib -lXpm -lXext -lX11

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?

But then I realized I probably should have said g++ and not gcc:

root:/usr/src/wmx-6# make CCC=/opt/gcc-2.95.3/bin/g++
/opt/gcc-2.95.3/bin/g++ -c -g -O2 -I/usr/X11R6/include Border.C
/opt/gcc-2.95.3/bin/g++ -c -g -O2 -I/usr/X11R6/include Buttons.C
/opt/gcc-2.95.3/bin/g++ -c -g -O2 -I/usr/X11R6/include Channel.C
/opt/gcc-2.95.3/bin/g++ -c -g -O2 -I/usr/X11R6/include Client.C
/opt/gcc-2.95.3/bin/g++ -c -g -O2 -I/usr/X11R6/include Config.C
/opt/gcc-2.95.3/bin/g++ -c -g -O2 -I/usr/X11R6/include Events.C
/opt/gcc-2.95.3/bin/g++ -c -g -O2 -I/usr/X11R6/include Main.C
/opt/gcc-2.95.3/bin/g++ -c -g -O2 -I/usr/X11R6/include Manager.C
/opt/gcc-2.95.3/bin/g++ -c -g -O2 -I/usr/X11R6/include Menu.C
/opt/gcc-2.95.3/bin/g++ -c -g -O2 -I/usr/X11R6/include Rotated.C
/opt/gcc-2.95.3/bin/g++ -c -g -O2 -I/usr/X11R6/include Session.C
test -f wmx && mv -f wmx wmx.old || true
/opt/gcc-2.95.3/bin/g++ -o wmx Border.o Buttons.o Channel.o Client.o
Config.o Events.o Main.o Manager.o Menu.o Rotated.o Session.o
-L/usr/X11R6/lib -lXpm -lXext -lX11

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.

Anyway, the first of the 3 executables is installed and working.  I'll
carry on building with the two sets of libraries installed and just
see what happens.

Regards

Paul

-- 
http://perso.wanadoo.fr/paul.bailey/
--



More information about the blfs-support mailing list