-   Linux From Scratch (
-   -   OpenSP and Bleeding Edge LFS (

Andrew Benton 04-16-2004 05:16 AM

OpenSP and Bleeding Edge LFS
Hello people. I had a go at Bleeding Edge LFS yesterday and it went pretty well, just the usual typo errors on my part. The basic system is good. I can reboot into it, the file system checks out, other partitions mount, all built on 2.6 kernel headers. I like it.
I had a problem compiling XFree86-4.4.0. It wasn't happy about the kernel headers in /usr/include. It said

In file included from /usr/include/linux/config.h:1,
from drm.h:41,
from xf86drm.c:72:
/usr/include/linux/err_kernel_only.h:1:2: #error Kernel only header included in userspace
make[6]: *** [xf86drm.o] Error 1
make[6]: Leaving directory `/sources/xc/lib/GL/dri/drm'
make[5]: *** [all] Error 2
make[5]: Leaving directory `/sources/xc/lib/GL/dri'
make[4]: *** [all] Error 2
make[4]: Leaving directory `/sources/xc/lib/GL'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/sources/xc/lib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/sources/xc'
make[1]: *** [World] Error 2
make[1]: Leaving directory `/sources/xc'
make: *** [World] Error 2

So I moved /usr/include/linux/autoconf.h and /usr/include/linux/config.h out of the way and replaced them with autoconf.h and config.h from /usr/src/linux/include/linux and hey presto! XFree compiles no problem. So did the Nvidia driver. So then I start preparing to install Gnome by installing all the docbook stuff and almost straight away I get this error from OpenSP-1.5.1

/bin/sh ../libtool --mode=compile g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../generic -g -O2 -c -o ArcEngine.lo `test -f 'ArcEngine.cxx' || echo './'`ArcEngine.cxx
g++ -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../generic -g -O2 -c ArcEngine.cxx -MT ArcEngine.lo -MD -MP -MF .deps/ArcEngine.TPlo -fPIC -DPIC -o ArcEngine.lo
In file included from ../include/RangeMap.h:67,
from ../include/UnivCharsetDesc.h:13,
from ../include/CharsetInfo.h:11,
from ../include/Sd.h:13,
from ../include/Event.h:20,
from ../include/ArcEngine.h:11,
from ArcEngine.cxx:10:
../include/RangeMap.cxx: In member function `unsigned int OpenSP::RangeMap<From, To>::inverseMap(To, From&, OpenSP::ISet<OpenSP::WideChar>&, OpenSP::WideChar&) const':
../include/RangeMap.cxx:50: error: `wideCharMax' undeclared (first use this function)
../include/RangeMap.cxx:50: error: (Each undeclared identifier is reported only once for each function it appears in.)
In file included from ../include/UnivCharsetDesc.h:16,
from ../include/CharsetInfo.h:11,
from ../include/Sd.h:13,
from ../include/Event.h:20,
from ../include/ArcEngine.h:11,
from ArcEngine.cxx:10:
../include/constant.h: At global scope:
../include/constant.h:16: error: `const OpenSP::WideChar OpenSP::wideCharMax' used prior to declaration
make[3]: *** [ArcEngine.lo] Error 1
make[3]: Leaving directory `/sources/OpenSP-1.5.1/lib'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/sources/OpenSP-1.5.1/lib'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/sources/OpenSP-1.5.1'
make: *** [all] Error 2

My first guess was that it wasn't happy with being compiled with gcc-3.4 so I compiled gcc-3.3.2 and installed it in /opt and tried with that and got the same result, so now I think maybe it has issues with glibc-2.3.4. Anybody got any suggestions? I like the look of Bleeding Edge. The core system is sound. If some software has problems it'd be nice to find workarounds.

Andrew Benton 04-16-2004 10:49 AM

Still hacking at the bleeding edge...
Well, to update the story, I looked at the file in the OpenSp source that gave me the error, OpenSp-1.5.1/include/RangeMap.cxx and I commented out line 50, the line which had the undeclared variable wideCharMax and it built fine. I ran make check and it gave 6 failures out of 22 tests, which looks bad, so I built it unaltered and ran the tests on my host system and got identical results so I decided to install it anyway.
The next failure was gmp-4.1.2 which I install for Python. I don't know if I really need it so I didn't bother fixing it and carried on without it. Same went for svgalib-1.4.3 and imlib2-1.1.0 (it seems I have a lot of cruft in these build scripts...) Then glib-1.2.10 wouldn't build with gcc-3.4.0, but it built fine with gcc-3.3.2. Same went for cdparanoia-III-alpha9.8.src.tgz and gnome-terminal-2.6.0. No doubt there are patches somewhere. Apart from that, Gnome 2.6 built without a hitch. However, when I try to start it I have trouble loading the Nvidia module. I have to run the Nvidia installer. I'll work on it later. I've been at this computer too long. I've got to take the dogs out.

Edit - it seems that the Nvidia installer hasn't been altered to make the /sys entries that udev needs to create the nodes for it in /dev so I have to run the commands
mknod /dev/nvidia0 c 195 0
mknod /dev/nvidiactl c 195 255
every time I reboot. A simple solution was to put those commands in the script that starts the Gnome Display Manager

ParticleHunter 05-05-2004 06:53 AM


Interesting post, in fact it got the freaks out of me... just by the fact a friend of mine is going to try it, so i can imagine he surely had the same problems as you, or probably worse :D


athomecomputing 05-15-2004 05:29 PM

did u appy the OpenSP-1.5.1-gcc34-2.patch from ?

Andrew Benton 05-15-2004 06:06 PM

No, I didn't even know that list existed. Thankyou very much. I see a patch for the gnome terminal. I'm going to reboot into bleeding edge right now to try that patch. Thanks again!

athomecomputing 05-16-2004 01:10 AM

your welcome. just check there for anyother package that doesnt configure right

Remmis 03-17-2005 11:30 PM

I was just having this problem...there is actually a file constant.h which defines wideCharMax. Inside Rangemap.cxx put #include "constant.h" I can't imagine commenting out the line would do good things since it is initializing a loop variable with wideCharMax.

Andrew Benton 03-18-2005 01:32 AM

At the time I had very little idea what OpenSP was. I was just using quick and dirty hacks to get to the next error. I use OpenSP nearly every day now to validate html. The gcc-3.4 patch works well.

Remmis 03-18-2005 04:27 AM

Your original post being almost a year old, (go google!) I was not surprised to find that the previous links for the patch were no good, so I attempted to fix it on my own (which is more fun anyway :). Thanks for posting an updated link to it. Seems like that patch pretty much does what I ended up doing, yay.

Szift 11-10-2005 03:37 AM

hmm.. so again it was my turn to run into to the error,
I found this site, but a moment before I took a different approach,
I looked for the files containing wideCharMax and it turned up constat.h
as the header for that one, just added #include <constant.h> in the RangeMap.cxx and it's a go
the funny thing is, why only LSF-based systems (I use HLFS) have a problem here? As I didn't see any error posts on this from other OS's users.. or maybe I didn't google hard enough? (winkle, winkle) :D

PS. now that I read trought the rest of the posts (not google-cached) I see the resolution already turned up :] Sorry for the spam then ;)

All times are GMT -5. The time now is 04:08 PM.