Csound Csound-dev Csound-tekno Search About

[Csnd-dev] more failures to compile

Date2018-05-29 21:09
FromJohn
Subject[Csnd-dev] more failures to compile
[ 63%] Building CXX object Opcodes/CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o
cd /home/jpff/csound6/Opcodes && /usr/bin/c++   -DCS_DEFAULT_PLUGINDIR=\"/usr/local/lib64/csound/plugins64-6.0\" -DHAVE_SOCKETS -DHAVE_STRTOD_L -DHAVE_STRTOK_R -DLIB64 -DLINUX -DNO_FLTK_THREADS -DPIPES -D_CSOUND_RELEASE_ -D_GNU_SOURCE -DfluidOpcodes_EXPORTS -I/usr/local/include -I/home/jpff/csound6/./H -I/home/jpff/csound6/./include -I/home/jpff/csound6/./Engine -I/home/jpff/csound6/./util -I/home/jpff/csound6/. -I/home/jpff/csound6 -I/home/jpff/csound6/include  -std=c++11 -ffast-math -mfpmath=sse -msse2 -fomit-frame-pointer -DJPFF -std=c++11 -DBETA  -Wall -Werror -Wno-missing-field-initializers -fvisibility=hidden -fvisibility=hidden -DHAVE_ATOMIC_BUILTIN -g -fPIC   -o CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o -c /home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp
/home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp: In member function ‘int32_t FluidInfo::init(CSOUND*)’:
/home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp:286:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
     for (int i = 0; i < programs.size(); i++) {
                     ~~^~~~~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [Opcodes/CMakeFiles/fluidOpcodes.dir/build.make:66: Opcodes/CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o] Error 1
make[2]: Leaving directory '/home/jpff/csound6'
make[1]: *** [CMakeFiles/Makefile2:687: Opcodes/CMakeFiles/fluidOpcodes.dir/all] Error 2
make[1]: Leaving directory '/home/jpff/csound6'

Date2018-05-29 21:32
FromMichael Gogins
SubjectRe: [Csnd-dev] more failures to compile
i should be not int but size_t to be the same type as programs.size().

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Tue, May 29, 2018 at 4:09 PM, John  wrote:
> [ 63%] Building CXX object Opcodes/CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o
> cd /home/jpff/csound6/Opcodes && /usr/bin/c++   -DCS_DEFAULT_PLUGINDIR=\"/usr/local/lib64/csound/plugins64-6.0\" -DHAVE_SOCKETS -DHAVE_STRTOD_L -DHAVE_STRTOK_R -DLIB64 -DLINUX -DNO_FLTK_THREADS -DPIPES -D_CSOUND_RELEASE_ -D_GNU_SOURCE -DfluidOpcodes_EXPORTS -I/usr/local/include -I/home/jpff/csound6/./H -I/home/jpff/csound6/./include -I/home/jpff/csound6/./Engine -I/home/jpff/csound6/./util -I/home/jpff/csound6/. -I/home/jpff/csound6 -I/home/jpff/csound6/include  -std=c++11 -ffast-math -mfpmath=sse -msse2 -fomit-frame-pointer -DJPFF -std=c++11 -DBETA  -Wall -Werror -Wno-missing-field-initializers -fvisibility=hidden -fvisibility=hidden -DHAVE_ATOMIC_BUILTIN -g -fPIC   -o CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o -c /home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp
> /home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp: In member function ‘int32_t FluidInfo::init(CSOUND*)’:
> /home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp:286:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
>      for (int i = 0; i < programs.size(); i++) {
>                      ~~^~~~~~~~~~~~~~~~~
> cc1plus: all warnings being treated as errors
> make[2]: *** [Opcodes/CMakeFiles/fluidOpcodes.dir/build.make:66: Opcodes/CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o] Error 1
> make[2]: Leaving directory '/home/jpff/csound6'
> make[1]: *** [CMakeFiles/Makefile2:687: Opcodes/CMakeFiles/fluidOpcodes.dir/all] Error 2
> make[1]: Leaving directory '/home/jpff/csound6'
>

Date2018-05-29 21:35
FromVictor Lazzarini
SubjectRe: [Csnd-dev] more failures to compile
Should be unsigned int i instead.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 29 May 2018, at 21:09, John  wrote:
> 
> [ 63%] Building CXX object Opcodes/CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o
> cd /home/jpff/csound6/Opcodes && /usr/bin/c++   -DCS_DEFAULT_PLUGINDIR=\"/usr/local/lib64/csound/plugins64-6.0\" -DHAVE_SOCKETS -DHAVE_STRTOD_L -DHAVE_STRTOK_R -DLIB64 -DLINUX -DNO_FLTK_THREADS -DPIPES -D_CSOUND_RELEASE_ -D_GNU_SOURCE -DfluidOpcodes_EXPORTS -I/usr/local/include -I/home/jpff/csound6/./H -I/home/jpff/csound6/./include -I/home/jpff/csound6/./Engine -I/home/jpff/csound6/./util -I/home/jpff/csound6/. -I/home/jpff/csound6 -I/home/jpff/csound6/include  -std=c++11 -ffast-math -mfpmath=sse -msse2 -fomit-frame-pointer -DJPFF -std=c++11 -DBETA  -Wall -Werror -Wno-missing-field-initializers -fvisibility=hidden -fvisibility=hidden -DHAVE_ATOMIC_BUILTIN -g -fPIC   -o CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o -c /home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp
> /home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp: In member function ‘int32_t FluidInfo::init(CSOUND*)’:
> /home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp:286:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
>     for (int i = 0; i < programs.size(); i++) {
>                     ~~^~~~~~~~~~~~~~~~~
> cc1plus: all warnings being treated as errors
> make[2]: *** [Opcodes/CMakeFiles/fluidOpcodes.dir/build.make:66: Opcodes/CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o] Error 1
> make[2]: Leaving directory '/home/jpff/csound6'
> make[1]: *** [CMakeFiles/Makefile2:687: Opcodes/CMakeFiles/fluidOpcodes.dir/all] Error 2
> make[1]: Leavi

Date2018-05-29 22:01
FromMichael Gogins
SubjectRe: [Csnd-dev] more failures to compile
Not quite.

std::size_t is commonly used for array indexing and loop counting.
Programs that use other types, such as unsigned int, for array
indexing may fail on, e.g. 64-bit systems when the index exceeds
UINT_MAX or if it relies on 32-bit modular arithmetic.

When indexing C++ containers, such as std::string, std::vector, etc,
the appropriate type is the member typedef size_type provided by such
containers. It is usually defined as a synonym for std::size_t.

-----------------------------------------------------
Michael Gogins
Irreducible Productions
http://michaelgogins.tumblr.com
Michael dot Gogins at gmail dot com


On Tue, May 29, 2018 at 4:35 PM, Victor Lazzarini
 wrote:
> Should be unsigned int i instead.
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
>> On 29 May 2018, at 21:09, John  wrote:
>>
>> [ 63%] Building CXX object Opcodes/CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o
>> cd /home/jpff/csound6/Opcodes && /usr/bin/c++   -DCS_DEFAULT_PLUGINDIR=\"/usr/local/lib64/csound/plugins64-6.0\" -DHAVE_SOCKETS -DHAVE_STRTOD_L -DHAVE_STRTOK_R -DLIB64 -DLINUX -DNO_FLTK_THREADS -DPIPES -D_CSOUND_RELEASE_ -D_GNU_SOURCE -DfluidOpcodes_EXPORTS -I/usr/local/include -I/home/jpff/csound6/./H -I/home/jpff/csound6/./include -I/home/jpff/csound6/./Engine -I/home/jpff/csound6/./util -I/home/jpff/csound6/. -I/home/jpff/csound6 -I/home/jpff/csound6/include  -std=c++11 -ffast-math -mfpmath=sse -msse2 -fomit-frame-pointer -DJPFF -std=c++11 -DBETA  -Wall -Werror -Wno-missing-field-initializers -fvisibility=hidden -fvisibility=hidden -DHAVE_ATOMIC_BUILTIN -g -fPIC   -o CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o -c /home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp
>> /home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp: In member function ‘int32_t FluidInfo::init(CSOUND*)’:
>> /home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp:286:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
>>     for (int i = 0; i < programs.size(); i++) {
>>                     ~~^~~~~~~~~~~~~~~~~
>> cc1plus: all warnings being treated as errors
>> make[2]: *** [Opcodes/CMakeFiles/fluidOpcodes.dir/build.make:66: Opcodes/CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o] Error 1
>> make[2]: Leaving directory '/home/jpff/csound6'
>> make[1]: *** [CMakeFiles/Makefile2:687: Opcodes/CMakeFiles/fluidOpcodes.dir/all] Error 2
>> make[1]: Leaving directory '/home/jpff/csound6'
>>

Date2018-05-29 22:05
FromVictor Lazzarini
SubjectRe: [Csnd-dev] more failures to compile
don’t worry, I know about size_t alright.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 29 May 2018, at 22:01, Michael Gogins  wrote:
> 
> Not quite.
> 
> std::size_t is commonly used for array indexing and loop counting.
> Programs that use other types, such as unsigned int, for array
> indexing may fail on, e.g. 64-bit systems when the index exceeds
> UINT_MAX or if it relies on 32-bit modular arithmetic.
> 
> When indexing C++ containers, such as std::string, std::vector, etc,
> the appropriate type is the member typedef size_type provided by such
> containers. It is usually defined as a synonym for std::size_t.
> 
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
> 
> 
> On Tue, May 29, 2018 at 4:35 PM, Victor Lazzarini
>  wrote:
>> Should be unsigned int i instead.
>> 
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>> 
>>> On 29 May 2018, at 21:09, John  wrote:
>>> 
>>> [ 63%] Building CXX object Opcodes/CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o
>>> cd /home/jpff/csound6/Opcodes && /usr/bin/c++   -DCS_DEFAULT_PLUGINDIR=\"/usr/local/lib64/csound/plugins64-6.0\" -DHAVE_SOCKETS -DHAVE_STRTOD_L -DHAVE_STRTOK_R -DLIB64 -DLINUX -DNO_FLTK_THREADS -DPIPES -D_CSOUND_RELEASE_ -D_GNU_SOURCE -DfluidOpcodes_EXPORTS -I/usr/local/include -I/home/jpff/csound6/./H -I/home/jpff/csound6/./include -I/home/jpff/csound6/./Engine -I/home/jpff/csound6/./util -I/home/jpff/csound6/. -I/home/jpff/csound6 -I/home/jpff/csound6/include  -std=c++11 -ffast-math -mfpmath=sse -msse2 -fomit-frame-pointer -DJPFF -std=c++11 -DBETA  -Wall -Werror -Wno-missing-field-initializers -fvisibility=hidden -fvisibility=hidden -DHAVE_ATOMIC_BUILTIN -g -fPIC   -o CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o -c /home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp
>>> /home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp: In member function ‘int32_t FluidInfo::init(CSOUND*)’:
>>> /home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp:286:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
>>>    for (int i = 0; i < programs.size(); i++) {
>>>                    ~~^~~~~~~~~~~~~~~~~
>>> cc1plus: all warnings being treated as errors
>>> make[2]: *** [Opcodes/CMakeFiles/fluidOpcodes.dir/build.make:66: Opcodes/CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o] Error 1
>>> make[2]: Leaving directory '/home/jpff/csound6'
>>> make[1]: *** [CMakeFiles/Makefile2:687: Opcodes/CMakeFiles/fluidOpcodes.dir/all] Error 2
>>> make[1]: Leaving directory '/home/jpff/csound6'
>>> 

Date2018-05-30 21:00
FromStephen Kyne
SubjectRe: [Csnd-dev] more failures to compile
They actually say to avoid using size_t in user code these days! You should just cast it to int and stick with ordinary ints. It results in faster code (something to do with code generation and indexing... not sure exactly) and there is no chance of signed/unsigned mismatch. 

From: Csound-developers <CSOUND-DEV@LISTSERV.HEANET.IE> on behalf of Victor Lazzarini <Victor.Lazzarini@MU.IE>
Sent: 29 May 2018 22:05
To: CSOUND-DEV@LISTSERV.HEANET.IE
Subject: Re: [Csnd-dev] more failures to compile
 
don’t worry, I know about size_t alright.

Victor Lazzarini
Dean of Arts, Celtic Studies, and Philosophy
Maynooth University
Ireland

> On 29 May 2018, at 22:01, Michael Gogins <michael.gogins@GMAIL.COM> wrote:
>
> Not quite.
>
> std::size_t is commonly used for array indexing and loop counting.
> Programs that use other types, such as unsigned int, for array
> indexing may fail on, e.g. 64-bit systems when the index exceeds
> UINT_MAX or if it relies on 32-bit modular arithmetic.
>
> When indexing C++ containers, such as std::string, std::vector, etc,
> the appropriate type is the member typedef size_type provided by such
> containers. It is usually defined as a synonym for std::size_t.
>
> -----------------------------------------------------
> Michael Gogins
> Irreducible Productions
> http://michaelgogins.tumblr.com
> Michael dot Gogins at gmail dot com
>
>
> On Tue, May 29, 2018 at 4:35 PM, Victor Lazzarini
> <Victor.Lazzarini@mu.ie> wrote:
>> Should be unsigned int i instead.
>>
>> Victor Lazzarini
>> Dean of Arts, Celtic Studies, and Philosophy
>> Maynooth University
>> Ireland
>>
>>> On 29 May 2018, at 21:09, John <jpff@CODEMIST.CO.UK> wrote:
>>>
>>> [ 63%] Building CXX object Opcodes/CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o
>>> cd /home/jpff/csound6/Opcodes && /usr/bin/c++   -DCS_DEFAULT_PLUGINDIR=\"/usr/local/lib64/csound/plugins64-6.0\" -DHAVE_SOCKETS -DHAVE_STRTOD_L -DHAVE_STRTOK_R -DLIB64 -DLINUX -DNO_FLTK_THREADS -DPIPES -D_CSOUND_RELEASE_ -D_GNU_SOURCE -DfluidOpcodes_EXPORTS -I/usr/local/include -I/home/jpff/csound6/./H -I/home/jpff/csound6/./include -I/home/jpff/csound6/./Engine -I/home/jpff/csound6/./util -I/home/jpff/csound6/. -I/home/jpff/csound6 -I/home/jpff/csound6/include  -std=c++11 -ffast-math -mfpmath=sse -msse2 -fomit-frame-pointer -DJPFF -std=c++11 -DBETA  -Wall -Werror -Wno-missing-field-initializers -fvisibility=hidden -fvisibility=hidden -DHAVE_ATOMIC_BUILTIN -g -fPIC   -o CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o -c /home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp
>>> /home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp: In member function ‘int32_t FluidInfo::init(CSOUND*)’:
>>> /home/jpff/csound6/Opcodes/fluidOpcodes/fluidOpcodes.cpp:286:23: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
>>>    for (int i = 0; i < programs.size(); i++) {
>>>                    ~~^~~~~~~~~~~~~~~~~
>>> cc1plus: all warnings being treated as errors
>>> make[2]: *** [Opcodes/CMakeFiles/fluidOpcodes.dir/build.make:66: Opcodes/CMakeFiles/fluidOpcodes.dir/fluidOpcodes/fluidOpcodes.cpp.o] Error 1
>>> make[2]: Leaving directory '/home/jpff/csound6'
>>> make[1]: *** [CMakeFiles/Makefile2:687: Opcodes/CMakeFiles/fluidOpcodes.dir/all] Error 2
>>> make[1]: Leaving directory '/home/jpff/csound6'
>>>
>>> ==John ffitch