Fileutils compilation problem
lost at l-w.net
lost at l-w.net
Wed Jul 11 21:52:06 PDT 2001
On Thu, 12 Jul 2001, Gerard Beekmans wrote:
> I've seen some problems compiling things like XFree86,
> netkit-<something>, oidentd and a few other packages. But not as much as
> the c++ problems.
I had only one problem with compiling X. That was in libGLA (IIRC) which
was because it was using "gcc" to link .o files created with g++.
Obviously "gcc" doesn't know to link in libstdc++ in that case. I changed
the link line for that one and, lo, X finished building.
Netkit-telnet failed for a couple of reasons. One is that printf() is
declared as a macro somewhere (as far as I can tell, in bits/stdio.h).
After adding a few "#undef printf" in the files that barfed (i.e. after
all the #include directives) that problem was licked. This would be a case
of the C preprocessor getting in the way before the c++ compiler can start
applying scoping rules to things. I also had to add a few "#include
<stdlib.h>" to get "exit()" prototyped. That seems to me to be a bug in
the software, not the compiler or library as exit() is supposed to be
declared in <stdlib.h>.
I also had problems with a couple other packages (forget which ones) which
didn't include <stdlib.h> to get "malloc()" and "free()". There were also
a few cases of <time.h> not being included for time() (I think this was in
Once I got all these compiled, things seem to have been working. I suspect
some of the "missing header" problems are due to previous versions of
various header files leaking declarations which allowed some sloppy coding
> It's a personal opinion mostly. I need a good working c++ compiler on my
> system, else there won't be future lfs-book releases (the xml parser is
> c++ only. No viable c alternatives) for one thing.
This I can't argue with. I'll play with fire on my system but there's no
reason you have to. :)
> Gerard Beekmans
finger lost at l-w.net for further information
Geek Code V3.12: GCS/M/S d- s+:+ !a C++ UL++++$ P++ L+++ !E W++ !N w--- !O
!M PS PE V-- Y+ PGP t+@ 5++ X !R tv+@ b+++@ !DI D? G e++ h+ y?
Unsubscribe: send email to lfs-discuss-request at linuxfromscratch.org
and put unsubscribe in the subject header of the message
More information about the lfs-dev