/usr/share/doc/ncc/TROUBLES is in ncc 2.8-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | GENERAL BUG-HUNTING PROCEDURE
-----------------------------
``every new program, reveals more bugs''
For big and complex projects, it's generally a good idea to run
the compilation in "script". see "man script".
This way you can detect ncc-errors and segfaults.
Supposing you see that there was a problem in file drivers/ide/ide-cd.c
1. Run ncc with the -ncspp option
2. Go to the directory with the problematic file and
"cp ide-cd.i TR.c"
3. Now you can work with "ncc TR.c" w/o worring
about -I/-D options
- In the case ncc Segfaulted you may jump "YOU DIDN'T FIND IT" below,
instead of working with gdb.
- Do "gcc TR.c" to see if the file is indeed wrong C
due to nognu macro expansions. If this works then
it's an ncc problem.
- If you can go to the line where the error occured
and see if this is "normal C" or some really unusual
syntactic trick.
- Running "ncc -nccc TR.c" is a good way to see the
last expression compiled before the bug.
SO YOU'VE FOUND IT:
You can either edit ncc or edit the problematic
source file to something that gives the same output
with more correct code.
That depends on whether you think the compiler should
adapt to the program or the program should comply
with the rest of the world.
YOU DIDN'T FIND IT/YOU ARE BORED TO DO THIS:
Please send me the TR.c of the offending file
at <sxanth@ceid.upatras.gr>
Any program that uses glibc sockets, will probably have the following
problem with glibc header files in the GNU system:
socket.h troubles in GNU libc
-----------------------------
The libc header files, are "compiler dependant".
There is no way around. Either you don't define __GCC__ and
half of the things are missing (go figure which), or you
define __GCC__ and be prepared to come against a
"transparent union" argument to getsockname().
Do we have to rewrite a clean libc?
For the good-hearted hacker, some additional work will have to
be done. Please edit /usr/include/socket.h
See the mess. This has nothing to do with programming, and it is
the dreadful perfectionism some people who get excited about their system,
get into and screw everything up. Find 'transparent union'
and where it sais "#if (!defined __GNUC__ || ..."
make it "#if __NCC__ || (!defined __GNUC__ || .."
``people who code too much, tend to get authoritative''
===========================================================================
|