SCIENTIFIC-LINUX-USERS Archives

April 2009

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Peter Elmer <[log in to unmask]>
Reply To:
Peter Elmer <[log in to unmask]>
Date:
Tue, 7 Apr 2009 22:10:15 +0200
Content-Type:
text/plain
Parts/Attachments:
text/plain (59 lines)
  Hi Matthew,

On Tue, Apr 07, 2009 at 03:05:10PM -0500, Matthew Jones wrote:
> I recently installed SL5.2, which generally works well, but gcc is unable
>  to
> report the symbols that it is having difficulty compiling...
> 
> For example, if I compile the following program:
> 
> int main() {
>   double d = 1.5;
>   e = d + 2;
> }
> 
> I get the following:
> 
> $ g++ junk.cc
> junk.cc: In function â:
> junk.cc:3: error: â was not declared in this scope
> 

  I tried it with my (64bit) SL5 machine and do not see the problem:

prompt> cat /etc/redhat-release 
Scientific Linux SL release 5.1 (Boron)
prompt> gcc -v
Using built-in specs.
<...>
gcc version 4.1.2 20070626 (Red Hat 4.1.2-14)

prompt> cat test.cc
int main() {
  double d = 1.5;
  e = d + 2;
}
prompt> g++ test.cc
test.cc: In function ‘int main()’:
test.cc:3: error: ‘e’ was not declared in this scope

  Hmm, I suspect you'll see mangled non-printable characters from my
cut/paste (while it looked fine on my screen), which brings me to the other 
observation I have: the gcc 4.1.2 build we have made standalone (for use 
also on SLC4) machines _does_ have the kind of problem you mention. It is 
some bad interaction with the LANG (and terminal?) setting, I think, and 
I've not had time to track it down (would be great if someone here has some 
suggestion!), but I've found that if I use the workaround:

unsetenv LANG

our gcc 4.1.2 build will print the errors properly. (Normally this is 
en_US.UTF-8.)

                                   Pete

-------------------------------------------------------------------------
Peter Elmer     E-mail: [log in to unmask]      Phone: +41 (22) 767-4644
Address: CERN Division PPE, Bat. 32 2C-14, CH-1211 Geneva 23, Switzerland
-------------------------------------------------------------------------

ATOM RSS1 RSS2