I used the Cookbook/emcinst22/install.html to
install the june 7 version on
mandrake 7.1 with compiler 2.95.3.
This one is even worse as the 2.95.2 version of
Mandrake 7.0.
Except from the problems in the installation notes,
there is an additional problem.
Everywhere where <asm/io.h> or
<sys/io.h> is included there are compiler problems.
To make the problem as small as possible I created
a small c file with only the include
and the tried to compile with several options, see
below.
The first problem I had was with drotest.c (emcmot
dir), while being a c-file it is compiled with g++ by
the EMC makefile instead of gcc.
I could solve the problem by changing the makefile
to use gcc instead of g++ and added the
-O2 optimize option.
The next file where I encountered this problem was
in debug.cc (emctask dir),
here I cannot solve it because watever options I
try with g++ I cannot compile.
Added the problems in emcsh.cc, which is all
perfect C/C++ code, I get bad feelings
with the famous GNU compiler. My question here is
whats wrong, did mandrake put an
unstable version in the 7.0 and even worse in the
7.1 release or what?
Can anybody tell me how to get and install a better
compiler, I am new to Linux.
Should I report these bugs to GNU ?
the c-code
=============
#include <sys/io.h>
void main(void)
{
;
}
=============
g++ file.c
result:
In file included from file.c:
/usr/include/sys/io.h: In function "void outl(unsigned int, short unsigned
int)":
/usr/include/sys/io.h:125:parse error before "::"
the piece of code in io.h:
====================
122:extern inline void
123:outl(unsigned short value, unsigned short port)
124:{
125: __asm__ __volatile__ ("outl %0, %w1::"a" (value),
"Nd" (port));
126:}
=====================
|