Problems building wmx

Ken Moffat ken at
Wed Feb 11 09:43:07 PST 2004

On Wed, 11 Feb 2004 eklirmr at wrote:

> A couple of years ago I built version 3 of Linux From Scratch (GCC
> 2.95.3 and kernel 2.4.8) and added XFree86 with wmx as a window
> manager and w3m as a Web browser.  It's simple and I like it.
> Recently I thought I'd try and learn a bit more about Linux so I
> decided to try LFS version 5.  Building LFS went without any problems
> at all.  The problems started very soon afterwards!

> In LFS5 I built XFree86 exactly according to the BLFS book.  Then I
> tried to build wmx6, exactly the same version as I use under LFS3.  I
> got the following output:
> Buttons.C:199:8: warning: extra tokens at end of #endif directive

> c++ -c -g -O2 -I/usr/X11R6/include Menu.C
> Menu.C:625: error: default argument given for parameter 3 of `
>    CommandMenu::CommandMenu(WindowManager*, XEvent*, char*)'
> Menu.h:92: error: after previous specification in `
>    CommandMenu::CommandMenu(WindowManager*, XEvent*, char*)'
> make: *** [Menu.o] Error 1

These sorts of errors in _old_ c++ programs are common under modern
versions of gcc.  I'm not familiar with wmx, but in general it's a good
idea to use the _latest_ stable release, and if you still have problems
try a prerelease or CVS version.  gcc-3.3 and later is much more picky
about compliance with standards in c++.

> Then, under LFS3, I looked at the output of ldd /usr/X11R6/bin/wmx,
> which shows a dependency on /usr/lib/, which
> is present in LFS3 but not LFS5.  I wondered if there might be some
> problem in wmx which prevents it from compiling under GCC 3.3.1.

 Almost the right question.  Your LFS-3 version is linked against
this because that was your c++ library back then.  You've already found
the compile problem.

> So, again following the BLFS book, I installed GCC 2.95.3, including
> moving the libraries to the standard lib directory.  I have to admit
> that the instructions in the BLFS book confused me: how can a program
> distinguish between the GCC 3.1.1 and 2.95.3 libraries in /usr/lib?

 I'm not familiar with this, I think 2.95.3 needs a patch to play nicely
when its in the same directory as a later version of gcc.  You might
need to pay a lot of attention to actually build with 2.95.3 in that

> Anyway, even after doing that, the error message in the wmx build was
> unchanged.  I even tried (as with the kernel) "make
> CC=/opt/gcc-2.95.3/bin/gcc", but that didn't work either.

 It probably needs something different to override which version of g++
(the c++ front end to gcc) is used.  Maybe check this part of the BLFS
book again.

> Well, the wmx source builds just one binary, so I copied it from the
> LFS3 to the LFS5 installation - and that works!  The only problem is,
> I don't understand why.  And I think that, if I _did_ understand why,
> I'd understand a lot more about Linux.

 The reason why it works is easy - the version of the library is stored
in the binary, you've supplied that library by moving it after you
compiled 2.95.3's g++, so it just works.

Grab some updated source and build, build, build :)

Brighton tops UK Jedi league

More information about the blfs-support mailing list