[Csnd-dev] more failures to compile

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

[Csnd-dev] more failures to compile

jpff
[ 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] more failures to compile

Michael Gogins-2
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] more failures to compile

Victor Lazzarini-2
In reply to this post by jpff
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] more failures to compile

Michael Gogins-2
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
<[hidden email]> 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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] more failures to compile

Victor Lazzarini-2
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 <[hidden email]> 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
> <[hidden email]> 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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|

Re: [Csnd-dev] more failures to compile

Stephen Kyne
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 <[hidden email]> on behalf of Victor Lazzarini <[hidden email]>
Sent: 29 May 2018 22:05
To: [hidden email]
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 <[hidden email]> 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
> <[hidden email]> 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 <[hidden email]> 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