2017-01-22 43 views
0

我使用G ++固有不能轉換

$ G ++ --version G ++(Ubuntu的4.8.4-2ubuntu1〜14.04.3)4.8.4

在LinuxMint 17.2箱

試圖建立從https://github.com/briand/gr-scan.git

GR-掃描與

中的gnuradio 3.7.10.1-1〜ubuntu14.04.1myriadr AMD64的GNU Radio軟件無線電工具包

我發現人們處理g ++類似破損的各種軟件包,或在他們自己的代碼中的謎題。但是,我還沒有找到適用的明確解決方案。

看來,一些與內在的巫術是巫術的罪魁禍首。

在我的情況下,錯誤是這樣的:

g++ -DVERSION="\"gr-scan 2012082301\"" -std=c++11 -Wall -I/usr/local/include -largp -lgnuradio-pmt -lgnuradio-runtime -lgnuradio-blocks -lgnuradio-fft -lgnuradio-filter -lgnuradio-osmosdr -lboost_system -O2 -Wno-unused-function -o gr-scan main.cpp 
In file included from /usr/lib/gcc/x86_64-linux-gnu/4.8/include/x86intrin.h:30:0, 
       from /usr/include/x86_64-linux-gnu/c++/4.8/bits/opt_random.h:33, 
       from /usr/include/c++/4.8/random:51, 
       from /usr/include/c++/4.8/bits/stl_algo.h:65, 
       from /usr/include/c++/4.8/algorithm:62, 
       from /usr/include/boost/smart_ptr/shared_ptr.hpp:42, 
       from /usr/include/boost/shared_ptr.hpp:17, 
       from /usr/local/include/gnuradio/sptr_magic.h:26, 
       from /usr/local/include/gnuradio/basic_block.h:27, 
       from /usr/local/include/gnuradio/hier_block2.h:27, 
       from /usr/local/include/gnuradio/top_block.h:27, 
       from topblock.hpp:26, 
       from main.cpp:23: 
/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); 
                ^
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h: In function ‘__m64 _mm_packs_pi16(__m64, __m64)’: 
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h:143:69: error: cannot convert ‘__v4hi {aka short int}’ to ‘__vector(4) short int’ for argument ‘1’ to ‘__vector(8) char __builtin_ia32_packsswb(__vector(4) short int, __vector(4) short int)’ 
    return (__m64) __builtin_ia32_packsswb ((__v4hi)__m1, (__v4hi)__m2); 
                    ^
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h: In function ‘__m64 _mm_packs_pi32(__m64, __m64)’: 
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h:158:69: error: cannot convert ‘__m64 {aka int}’ to ‘__vector(2) int’ for argument ‘1’ to ‘__vector(4) short int __builtin_ia32_packssdw(__vector(2) int, __vector(2) int)’ 
    return (__m64) __builtin_ia32_packssdw ((__v2si)__m1, (__v2si)__m2); 
                    ^
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h: In function ‘__m64 _mm_packs_pu16(__m64, __m64)’: 
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h:173:69: error: cannot convert ‘__v4hi {aka short int}’ to ‘__vector(4) short int’ for argument ‘1’ to ‘__vector(8) char __builtin_ia32_packuswb(__vector(4) short int, __vector(4) short int)’ 
    return (__m64) __builtin_ia32_packuswb ((__v4hi)__m1, (__v4hi)__m2); 
                    ^
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h: In function ‘__m64 _mm_unpackhi_pi8(__m64, __m64)’: 
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h:187:70: error: cannot convert ‘__v8qi {aka char}’ to ‘__vector(8) char’ for argument ‘1’ to ‘__vector(8) char __builtin_ia32_punpckhbw(__vector(8) char, __vector(8) char)’ 
    return (__m64) __builtin_ia32_punpckhbw ((__v8qi)__m1, (__v8qi)__m2); 
                    ^
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h: In function ‘__m64 _mm_unpackhi_pi16(__m64, __m64)’: 
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h:201:70: error: cannot convert ‘__v4hi {aka short int}’ to ‘__vector(4) short int’ for argument ‘1’ to ‘__vector(4) short int __builtin_ia32_punpckhwd(__vector(4) short int, __vector(4) short int)’ 
    return (__m64) __builtin_ia32_punpckhwd ((__v4hi)__m1, (__v4hi)__m2); 
                    ^
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h: In function ‘__m64 _mm_unpackhi_pi32(__m64, __m64)’: 
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h:215:70: error: cannot convert ‘__m64 {aka int}’ to ‘__vector(2) int’ for argument ‘1’ to ‘__vector(2) int __builtin_ia32_punpckhdq(__vector(2) int, __vector(2) int)’ 
    return (__m64) __builtin_ia32_punpckhdq ((__v2si)__m1, (__v2si)__m2); 
                    ^
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h: In function ‘__m64 _mm_unpacklo_pi8(__m64, __m64)’: 
/usr/lib/gcc/x86_64-linux-gnu/4.8/include/mmintrin.h:229:70: error: cannot convert ‘__v8qi {aka char}’ to ‘__vector(8) char’ for argument ‘1’ to ‘__vector(8) char __builtin_ia32_punpcklbw(__vector(8) char, __vector(8) char)’ 
    return (__m64) __builtin_ia32_punpcklbw ((__v8qi)__m1, (__v8qi)__m2); 
                    ^

有一個簡單的解決方案嗎?

+0

這看起來像你的c + + stdlib有問題! –

回答

0

這絕對看起來不像GNU無線電問題,更像是你的GCC/g ++/stdlibC++安裝有根本錯誤。確保你沒有衝突的安裝,或者當構建gnuradio軟件包時使用的標誌與你現在使用的軟件不兼容。

事實上,std=c++11似乎確實可疑。

+0

GCC/g ++/stdlibC++安裝全部使用軟件包管理工具完成,而不是使用手動容易出錯的方法。我做了一個dpkg - 驗證,沒有任何相關的報道。 –

+0

我嘗試從gr-scan Makefile中刪除std = C++ 11,並且出現錯誤,因爲作者使用了2011 C++標準中的一些語法。我將拿出手冊並將其重寫爲默認的1994年標準。 –

+0

我會看看gnuradio安裝和編譯標誌。這是用https://smile.amazon.com/Hobbyists-Guide-RTL-SDR-Software-Defined/dp/1514716690/ –

相關問題