Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017 Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
<== Date ==> <== Thread ==>

Subject: Re: problem compiling edm
From: "S. Banerian" <banerian@u.washington.edu>
To: "tech-talk@aps.anl.gov" <tech-talk@aps.anl.gov>
Date: Thu, 2 Feb 2017 08:57:37 -0800
FYI, I have previously reported this issue (directly) to Mr. Sinclair in
Sept. 2016, along with some other edm compilation issues.

There are a number of upcoming issues with newer libraries and
compilers. sigh.

stefani




On 02/02/2017 08:13 AM, Mark Rivers wrote:
> I was afraid of that.
> 
> Another solution should be to set a compiler flag that disables the "narrowing" check (Wnarrowing).
> 
> Mark
> 
> 
> -----Original Message-----
> From: Pierrick Hanlet [mailto:hanlet@fnal.gov] 
> Sent: Thursday, February 02, 2017 9:57 AM
> To: Mark Rivers; tech-talk@aps.anl.gov
> Subject: Re: problem compiling edm
> 
> Hi Mark,
> Thank you for the quick response.  Initially this appeared to work, but 
> I had many more arrays to which I needed to do this. After having 
> modified them all,
> it appears that I've replaced one problem for another. Now I get:
> 
> 
> ../expString.cc:722:32: warning: ISO C++ forbids converting a string 
> constant to 'char*' [-Wwrite-strings]
> /usr/bin/g++  -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_X86_64_  -DUNIX  
> -Dlinux     -O3 -g   -Wall -DSINGLE_THREADED=1 -D__epics__=1  
> -mtune=generic     -m64 -fPIC -I. -I../O.Common -I. -I. -I.. 
> -I../../../../include/edm/compiler/gcc 
> -I../../../../include/edm/os/Linux -I../../../../include/edm 
> -I/home/epics/epicsDEV/base/include/compiler/gcc 
> -I/home/epics/epicsDEV/base/include/os/Linux 
> -I/home/epics/epicsDEV/base/include 
> -I/home/epics/epicsDEV/extensions/include        -I../../util 
> -I../../lib -I/usr/include -I/usr/include    -c ../cursor.cc
> ../cursor.cc: In member function 'void cursorClass::create(Display*, 
> Window, Colormap)':
> ../cursor.cc:416:39: error: invalid conversion from 'unsigned char*' to 
> 'char*' [-fpermissive]
>      cross_width, cross_height, 1, 0, 1 );
>                                         ^
> In file included from ../cursor.h:22:0,
>                   from ../cursor.cc:19:
> /usr/include/X11/Xlib.h:1611:15: note:   initializing argument 3 of 
> 'Pixmap XCreatePixmapFromBitmapData(Display*, Drawable, char*, unsigned 
> int, unsigned int, long unsigned int, long unsigned int, unsigned int)'
>   extern Pixmap XCreatePixmapFromBitmapData(
>                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> ../cursor.cc:419:39: error: invalid conversion from 'unsigned char*' to 
> 'char*' [-fpermissive]
>      cross_width, cross_height, 1, 0, 1 );
> 
> etc.
> Thanks,
> Pierrick
> 
> 
> On 02/02/2017 02:23 PM, Mark Rivers wrote:
>> That line is this:
>>
>> static char pntrWithHelp_bits[] = {
>>     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x42,
>>     0x20, 0x00, 0x00, 0x40, 0x60, 0x00, 0x00, 0x40, 0xe0, 0x00, 0x00, 0x60,
>>     0xe0, 0x01, 0x00, 0x30, 0xe0, 0x03, 0x00, 0x08, 0xe0, 0x07, 0x00, 0x08,
>>     0xe0, 0x0f, 0x00, 0x08, 0xe0, 0x1f, 0x00, 0x00, 0xe0, 0x3f, 0x00, 0x08,
>>     0xe0, 0x03, 0x00, 0x00, 0xe0, 0x06, 0x00, 0x00, 0x60, 0x06, 0x00, 0x00,
>>     0x20, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00,
>>     0x00, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
>>     0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
>>
>> I suspect the problem is that char is a signed type and the compiler is complaining because an integer larger than 127 is being assigned (e.g. 0xe0).  What happens if you change that to "static unsigned char"?
>>
>> Mark
>>
>>
>> ________________________________________
>> From: tech-talk-bounces@aps.anl.gov [tech-talk-bounces@aps.anl.gov] on behalf of Pierrick Hanlet [hanlet@fnal.gov]
>> Sent: Thursday, February 02, 2017 8:15 AM
>> To: tech-talk@aps.anl.gov
>> Subject: problem compiling edm
>>
>> I've a new pc on which I'm running Fedora release 25.  I'm using base
>> 3.15.5.
>>
>> I'm attempting to build edm, but whilst attempting to compile, I get:
>>
>> make[2]: Entering directory
>> '/home/epics/epicsDEV/extensions/src/edm/lib/O.linux-x86_64'
>> /usr/bin/g++  -D_GNU_SOURCE -D_DEFAULT_SOURCE -D_X86_64_  -DUNIX
>> -Dlinux     -O3 -g   -Wall -DSINGLE_THREADED=1 -D__epics__=1
>> -mtune=generic     -m64 -fPIC -I. -I../O.Common -I. -I. -I..
>> -I../../../../include/edm/compiler/gcc
>> -I../../../../include/edm/os/Linux -I../../../../include/edm
>> -I/home/epics/epicsDEV/base/include/compiler/gcc
>> -I/home/epics/epicsDEV/base/include/os/Linux
>> -I/home/epics/epicsDEV/base/include
>> -I/home/epics/epicsDEV/extensions/include        -I../../util
>> -I../../lib -I/usr/include -I/usr/include    -c ../cursor.cc
>> ../cursor.cc: In member function 'void cursorClass::create(Display*,
>> Window, Colormap)':
>> ../cursor.cc:82:50: error: narrowing conversion of '224' from 'int' to
>> 'char' inside { } [-Wnarrowing]
>>       0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
>>                                                     ^
>> ../cursor.cc:82:50: error: narrowing conversion of '224' from 'int' to
>> 'char' inside { } [-Wnarrowing]
>> ../cursor.cc:82:50: error: narrowing conversion of '224' from 'int' to
>> 'char' inside { } [-Wnarrowing]
>> and many more lines of the same.
>>
>> I can't find this problem in tech-talk, nor with a web search. Has
>> anyone run into this problem and if so, how did you resolve it?
>> Many thanks,
>> Pierrick
>>
> 
> 
> 


-- 
Stefani Banerian
UW Clinical Cyclotron www.uwmcf.org
UW School of Medicine
UW Box 356043
206-598-0302
gpg key 6642E7EE
fingerprint = BD13 875D 2D03 5E1D 1E3B  8BF7 F4B8 63AD 6642 E7EE


References:
problem compiling edm Pierrick Hanlet
RE: problem compiling edm Mark Rivers
Re: problem compiling edm Pierrick Hanlet
RE: problem compiling edm Mark Rivers

Navigate by Date:
Prev: RE: problem compiling edm Mark Rivers
Next: FW: problem compiling edm Sinclair, John William
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
Navigate by Thread:
Prev: RE: problem compiling edm Mark Rivers
Next: FW: problem compiling edm Sinclair, John William
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  <2017
ANJ, 14 Feb 2017 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·