[TAG] Error Compiling Atmel Wireless Driver

Lih-Chern Chiu lihchern at gmail.com
Sat Sep 24 11:08:30 MSD 2005


Hi Ben,

Sorry for the delay in reply - it took a while for me to figure out how 
to build the driver with a different version of GCC. Fedora provides GCC 
3.2 as its penultimate source RPM, so I chose to use that version for 
this experiment. After downloading and installing the package, I applied 
it like so:

make usb buildonly=debug CC=gcc32

Without making any changes to the source code, the driver compiled 
without any errors. Although I am not sure why it's an "improvement", I 
found this line under the GCC 4.0 Release Series:

"The cast-as-lvalue, conditional-expression-as-lvalue and 
compound-expression-as-lvalue extensions, which were deprecated in 3.3.4 
and 3.4, have been removed."
http://gcc.gnu.org/gcc-4.0/changes.html

And from GCC 3.4 Release Series:

"The cast-as-lvalue extension has been removed for C++ and deprecated 
for C and Objective-C. In particular, code like this:
        int i;
        (char) i = 5;

or this:
        char *p;
        ((int *) p)++;

is no longer accepted for C++ and will not be accepted for C and 
Objective-C in a future version."
http://gcc.gnu.org/gcc-3.4/changes.html

Does that explain the error that I encountered with GCC 4.0?

> It's one of the standard bits of troubleshoting by email. The worst
> thing you can do is _retype,_ from memory, the error that you're 
> getting
> - it can lead people down all kinds of wrong paths. The best thing is 
> to
> actually copy-and-paste the error and the code (including taking a
> screen shot of the error and providing a URL when it's a GUI-based 
> app.)
[snip]
> Seems like it was enough, since it appears that Peter managed to 
> isolate
> the problem. :) The trouble with copying just a single line is that 1)
> the line may well be only a part of the expression that's causing the
> problem, and may not in itself contain the problem, and 2) in 
> languages
> that use expression terminators (like C, Perl, and many others), the
> syntax errors do not "happen" until the following line. I.e.,

Point taken. I will make sure to take those things into consideration 
next time.

> My compilation problem was not so much the GCC itself, but the 
> suporting
> files/libraries that got installed along with it (I *think* the 
> 'ld.so'
> was involved somewhere in that.) Just specifying 3.3 as the compiler
> definitely didn't help me; as I'd said, I had to uninstall the last
> version completely. I run Debian, so 'dlocate -l gcc' was very helpful
> at that point; I'm afraid I don't know what the equivalent "show me
> all the installed packages that match 'foo'" command is for Fedora.

I believe the Fedora equivalent to dlocate is yum, although I haven't 
had the chance to apply it.

Lih-Chern 






More information about the TAG mailing list