[yoshimi] Re: Build errors on Mint 17, and a possible fix

  • From: Will Godfrey <willgodfrey@xxxxxxxxxxxxxxx>
  • To: yoshimi@xxxxxxxxxxxxx
  • Date: Sat, 4 Jun 2016 15:40:52 +0100

On Sat, 4 Jun 2016 14:43:45 +0200
Frank Neumann <beachnase@xxxxxx> wrote:


Hi,

haven't been building Yoshimi from source for quite a while, I tried it again
today on my LinuxMint 17 (Qiana), using gcc4.8.

I found hundreds of error messages like this:

/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h: In function ‘__m64 
_mm_cvtsi32_si64(int)’:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h:61:54: error: can’t 
convert between vector values of different size
   return (__m64) __builtin_ia32_vec_init_v2si (__i, 0);
                                                      ^
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h: In function ‘int 
_mm_cvtsi64_si32(__m64)’:
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h:104:53: error: cannot 
convert ‘__m64 {aka int}’ to ‘__vector(2) int’ for argument ‘1’ to ‘int 
__builtin_ia32_vec_ext_v2si(__vector(2) int, int)’
   return __builtin_ia32_vec_ext_v2si ((__v2si)__i, 0);
..
make[2]: *** [CMakeFiles/yoshimi.dir/Misc/Config.cpp.o] Error 1
make[2]: Leaving directory `/home/franky/src/audio/yoshimi-git/build/src'
make[1]: *** [CMakeFiles/yoshimi.dir/all] Error 2


but wasn't sure at first what changed. Then, a bit of googling brought me to
the recently introduced C++11 standard changes.
This page: 
http://stackoverflow.com/questions/19043109/gcc-4-8-1-combining-c-code-with-c11-code
stated that:
"...As it is not practical to comment a system header, a workaround is to use 
g++ --std=gnu++11 instead of g++ --std=c++11 as it does not define 
__STRICT_ANSI__. It worked in my case.

It seems to be a bug in gcc."


So, I tried this:
franky@silence:~/src/audio/yoshimi-git/build/src> diff -u CMakeLists.txt.orig 
CMakeLists.txt
--- CMakeLists.txt.orig 2016-06-04 14:29:38.518835880 +0200
+++ CMakeLists.txt      2016-06-04 14:30:53.324831450 +0200
@@ -24,7 +24,7 @@
     cmake_policy (SET CMP0046 OLD)
 endif (POLICY CMP0046)
 set (CMAKE_CXX_STANDARD 11) # we seem to need both for
-add_definitions(-std=c++11) # various versions of cmake
+add_definitions(-std=gnu++11) # various versions of cmake
 set (YOSHIMI_VERSION "1.4.0 rc2")
 file (WRITE version.txt "${YOSHIMI_VERSION}")

and was able to build Yoshimi fine again afterwards.

Not sure whether this can be regarded as an actual fix or just a workaround,
but I thought you might want to know.

Greetings,
Frank

Good catch Frank!

As luck would have it, I've been testing with gcc 4.9, 5.3, 6.1 Yours just
slipped underneath :o
This change seems to work correctly with these so will go in rc3.

rc3 will also have 'home' on right mouse click for all knobs as well as
sliders. However, this showed up another ancient bug.

When first selecting either Echo or Distortion the l/r crossover knob (LRc.)
shows the wrong value even though the correct one seems to be set. Change
preset then go back again and it's correct - our new 'home' feature also sets
it correctly. So far I've spent over a day trying to track this one down :(

-- 
Will J Godfrey
http://www.musically.me.uk
Say you have a poem and I have a tune.
Exchange them and we can both have a poem, a tune, and a song.
Yoshimi source code is available from either: 
http://sourceforge.net/projects/yoshimi
Or: https://github.com/Yoshimi/yoshimi
Our list archive is at: https://www.freelists.org/archive/yoshimi
To post, email to yoshimi@xxxxxxxxxxxxx

Other related posts: