Bug 57959 - Sources won't compile when compiler doesn't set __OPTIMIZE__ flag
Sources won't compile when compiler doesn't set __OPTIMIZE__ flag
Product: Red Hat Linux
Classification: Retired
Component: xchat (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Mike A. Harris
Depends On:
  Show dependency treegraph
Reported: 2002-01-03 08:37 EST by Sysoltsev Slawa
Modified: 2008-05-01 11:38 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2002-01-03 08:37:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sysoltsev Slawa 2002-01-03 08:37:06 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)

Description of problem:
file src/common/cfgfiles.c:
"cfgfiles.c", line 503: error: identifier "LC_CTYPE" is undefined
        locale = setlocale (LC_CTYPE, "");
this constant defined into <locale.h> which included into <libintl.h> 
which included into "xchat.h" included into cfgfiles.c.
But <libintl.h> includes <locale.h> only in case when __OPTIMIZE__ flag 
present. Gcc set this flag when optimization is on (-O1, -O2 options). In 
other cases (-g, -O0) this flag undefined and gcc will emit error. Intel 
compiler emits error too because doesn't set __OPTIMIZE__ flag anyway.
To increase Red Hat Linux portability you should include <locale.h> 
evident in your sources (file src/common/cfgfiles.c). 
With this package will be able to be built by icc and by gcc without 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. unpack sources
2. do configure stage
3. edit makefile (/src/common/makefile) - remove all instances of -O2 from 
4. try to build package 

Actual Results:  Received error:
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/include    -march=i386 -
mcpu=i686 -I/usr/include/glib-1.2 -I/usr/lib/glib/include  -fno-strict-
aliasing -I/usr/local/include  -I/usr/lib/perl5/5.6.0/i386-linux/CORE  -
I/usr/include/python1.5 -c cfgfiles.c
cfgfiles.c: In function `load_config':
cfgfiles.c:503: `LC_CTYPE' undeclared (first use in this function)
cfgfiles.c:503: (Each undeclared identifier is reported only once
cfgfiles.c:503: for each function it appears in.)
cfgfiles.c:503: warning: assignment makes pointer from integer without a 
make[3]: *** [cfgfiles.o] Error 1

Expected Results:  succesfully built package

Additional info:
Comment 1 Mike A. Harris 2002-01-07 06:52:13 EST
This is a request that should be made to the upstream xchat maintainers.
You can contact them via http://www.xchat.org

Note You need to log in before you can comment on or make changes to this bug.