I got this error while compiling cc1: error: unrecognized command line option '-std=c11'
a project. All the related issues suggest to use a gcc greater than 4.7 but I already have a gcc greater than 4.7.This is the details
gcc version 6.3.0 20170519 (Ubuntu/Linaro 6.3.0-18ubuntu2~16.04)
I am trying to compile this https://github.com/rhdunn/espeak/tree/master/android . Issue is happening in this file https://github.com/rhdunn/espeak/blob/master/android/jni/Android.mk while ndk-build.
This is what I am doing
-vbox:~/eSpeak/espeak-master/android/jni$ ndk-build
Compile mips : ttsespeak <= case.c
cc1: error: unrecognized command line option '-std=c11'
make: *** [/home/apertium/eSpeak/espeak-master/android/obj/local/mips/objs/ttsespeak/__/__/src/ucd-tools/src/case.o] Error 1
ndk-build V=1
command will give the following log.
apertium@ap-vbox:~/eSpeak/espeak-master/android/jni$ ndk-build V=1
rm -f /home/apertium/eSpeak/espeak-master/android/libs/armeabi/lib*.so /home/apertium/eSpeak/espeak-master/android/libs/armeabi-v7a/lib*.so /home/apertium/eSpeak/espeak-master/android/libs/mips/lib*.so /home/apertium/eSpeak/espeak-master/android/libs/x86/lib*.so
rm -f /home/apertium/eSpeak/espeak-master/android/libs/armeabi/gdbserver /home/apertium/eSpeak/espeak-master/android/libs/armeabi-v7a/gdbserver /home/apertium/eSpeak/espeak-master/android/libs/mips/gdbserver /home/apertium/eSpeak/espeak-master/android/libs/x86/gdbserver
rm -f /home/apertium/eSpeak/espeak-master/android/libs/armeabi/gdb.setup /home/apertium/eSpeak/espeak-master/android/libs/armeabi-v7a/gdb.setup /home/apertium/eSpeak/espeak-master/android/libs/mips/gdb.setup /home/apertium/eSpeak/espeak-master/android/libs/x86/gdb.setup
Compile mips : ttsespeak <= case.c
/home/apertium/android-ndk-x86/android-ndk-r9/toolchains/mipsel-linux-android-4.6/prebuilt/linux-x86/bin/mipsel-linux-android-gcc -MMD -MP -MF /home/apertium/eSpeak/espeak-master/android/obj/local/mips/objs/ttsespeak/__/__/src/ucd-tools/src/case.o.d -fpic -fno-strict-aliasing -finline-functions -ffunction-sections -funwind-tables -fmessage-length=0 -fno-inline-functions-called-once -fgcse-after-reload -frerun-cse-after-loop -frename-registers -no-canonical-prefixes -O2 -g -DNDEBUG -fomit-frame-pointer -funswitch-loops -finline-limit=300 -I/home/apertium/eSpeak/espeak-master/android/jni/include -I/home/apertium/eSpeak/espeak-master/android/jni/../../src/ucd-tools/src/include -I/home/apertium/eSpeak/espeak-master/android/jni/../../src/include -I/home/apertium/eSpeak/espeak-master/android/jni -DANDROID -std=c11 -DINCLUDE_KLATT -DINCLUDE_SONIC -Wa,--noexecstack -Wformat -Werror=format-security -I/home/apertium/android-ndk-x86/android-ndk-r9/platforms/android-14/arch-mips/usr/include -c /home/apertium/eSpeak/espeak-master/android/jni/../../src/ucd-tools/src/case.c -o /home/apertium/eSpeak/espeak-master/android/obj/local/mips/objs/ttsespeak/__/__/src/ucd-tools/src/case.o
cc1: error: unrecognized command line option '-std=c11'
make: *** [/home/apertium/eSpeak/espeak-master/android/obj/local/mips/objs/ttsespeak/__/__/src/ucd-tools/src/case.o] Error 1
Any help is greatly appreciated.
asked Nov 16, 2017 at 6:28
9
With the help of David Foerster I found out that the above mentioned error was due to the fact that the Android NDK includes its own C compiler so my NDK was using GCC 4.6 which doesn’t support C11. So I updated my NDK to r16 and resulted in the below error.
root@ap-vbox:~/eSpeak/espeak-master# make V=1 apk-release
cd android && ndk-build
/home/apertium/android-ndk-r-16/android-ndk-r16/prebuilt/linux-x86_64/bin/python: 10: /home/apertium/android-ndk-r-16/android-ndk-r16/prebuilt/linux-x86_64/bin/python: Syntax error: word unexpected (expecting ")")
/home/apertium/android-ndk-r-16/android-ndk-r16/prebuilt/linux-x86_64/bin/python: 10: /home/apertium/android-ndk-r-16/android-ndk-r16/prebuilt/linux-x86_64/bin/python: Syntax error: word unexpected (expecting ")")
Android NDK: WARNING: APP_PLATFORM android-14 is higher than android:minSdkVersion 1 in ./AndroidManifest.xml. NDK binaries will *not* be comptible with devices older than android-14. See https://android.googlesource.com/platform/ndk/+/master/docs/user/common_problems.md for more information.
/home/apertium/android-ndk-r-16/android-ndk-r16/prebuilt/linux-x86_64/bin/python: 10: /home/apertium/android-ndk-r-16/android-ndk-r16/prebuilt/linux-x86_64/bin/python: Syntax error: word unexpected (expecting ")")
make[1]: Entering directory `/home/apertium/eSpeak/espeak-master/android'
rm -f ./libs/arm64-v8a/* ./libs/armeabi/* ./libs/armeabi-v7a/* ./libs/mips/* ./libs/mips64/* ./libs/x86/* ./libs/x86_64/*
rm -f ./libs/arm64-v8a/gdbserver ./libs/armeabi/gdbserver ./libs/armeabi-v7a/gdbserver ./libs/mips/gdbserver ./libs/mips64/gdbserver ./libs/x86/gdbserver ./libs/x86_64/gdbserver
rm -f ./libs/arm64-v8a/gdb.setup ./libs/armeabi/gdb.setup ./libs/armeabi-v7a/gdb.setup ./libs/mips/gdb.setup ./libs/mips64/gdb.setup ./libs/x86/gdb.setup ./libs/x86_64/gdb.setup
[mips] Compile : ttsespeak <= case.c
/home/apertium/android-ndk-r-16/android-ndk-r16/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -MMD -MP -MF ./obj/local/mips/objs/ttsespeak/__/__/src/ucd-tools/src/case.o.d -gcc-toolchain /home/apertium/android-ndk-r-16/android-ndk-r16/toolchains/mips64el-linux-android-4.9/prebuilt/linux-x86_64 -target mipsel-none-linux-android -fpic -ffunction-sections -funwind-tables -fstack-protector-strong -fmessage-length=0 -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -no-canonical-prefixes -g -mips32 -O2 -DNDEBUG -Ijni/include -Ijni/../../src/ucd-tools/src/include -Ijni/../../src/include -Ijni -DANDROID -std=c11 -DINCLUDE_KLATT -DINCLUDE_SONIC -D__ANDROID_API__=14 -Wa,--noexecstack -Wformat -Werror=format-security --sysroot /home/apertium/android-ndk-r-16/android-ndk-r16/sysroot -isystem /home/apertium/android-ndk-r-16/android-ndk-r16/sysroot/usr/include/mipsel-linux-android -c jni/../../src/ucd-tools/src/case.c -o ./obj/local/mips/objs/ttsespeak/__/__/src/ucd-tools/src/case.o
/home/apertium/android-ndk-r-16/android-ndk-r16/toolchains/llvm/prebuilt/linux-x86_64/bin/clang: 1: /home/apertium/android-ndk-r-16/android-ndk-r16/toolchains/llvm/prebuilt/linux-x86_64/bin/clang: Syntax error: ")" unexpected
make[1]: *** [obj/local/mips/objs/ttsespeak/__/__/src/ucd-tools/src/case.o] Error 2
make[1]: Leaving directory `/home/apertium/eSpeak/espeak-master/android'
make: *** [jni] Error 2
I was using a virtual box for this. But when I tried to compile the same on an ubuntu installed system there were no issues. Everything went smooth and compiled. So I guess the issue was with my virtual box.
answered Nov 23, 2017 at 5:49
This is on CentOS 6.5 with gcc 4.4.7:
$ cc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)
Here’s the stdout from opam install mirage-xen-minios
/install.sh
make[1]: Entering directory `/var/run/sr-mount/88087a1d-af80-a232-ca10-833522abd024/opam/4.01.0/build/mirage-xen-minios.0.6.0/xen-minios-v0.5/extras/mini-os'
ln -sf . include/mini-os
ln -sf ../../../xen/include/public include/xen
ln -sf . arch/x86/include/mini-os
cp /var/run/sr-mount/88087a1d-af80-a232-ca10-833522abd024/opam/4.01.0/build/mirage-xen-minios.0.6.0/xen-minios-v0.5/extras/mini-os/../../xen/include/xen/libfdt/fdt.h include/fdt.h
sed 's!xen/libfdt/!!' /var/run/sr-mount/88087a1d-af80-a232-ca10-833522abd024/opam/4.01.0/build/mirage-xen-minios.0.6.0/xen-minios-v0.5/extras/mini-os/../../xen/include/xen/libfdt/libfdt.h > include/libfdt.h
gcc -DCONFIG_START_NETWORK -DCONFIG_SPARSE_BSS -DCONFIG_BLKFRONT -DCONFIG_NETFRONT -DCONFIG_KBDFRONT -DCONFIG_FBFRONT -DCONFIG_CONSFRONT -DCONFIG_XENBUS -nostdinc -isystem /usr/lib/gcc/x86_64-redhat-linux/4.4.7/include -fno-builtin -Wall -Werror -Wredundant-decls -Wno-format -Wno-redundant-decls -Wformat -fno-stack-protector -fgnu89-inline -Wstrict-prototypes -Wnested-externs -Wpointer-arith -Winline -O3 -fno-tree-loop-distribute-patterns -D__INSIDE_MINIOS__ -m64 -mno-red-zone -fno-reorder-blocks -fno-asynchronous-unwind-tables -isystem /var/run/sr-mount/88087a1d-af80-a232-ca10-833522abd024/opam/4.01.0/build/mirage-xen-minios.0.6.0/xen-minios-v0.5/extras/mini-os/../../extras/mini-os/include -D__MINIOS__ -D__XEN_INTERFACE_VERSION__=0x00030205 -isystem /var/run/sr-mount/88087a1d-af80-a232-ca10-833522abd024/opam/4.01.0/build/mirage-xen-minios.0.6.0/xen-minios-v0.5/extras/mini-os/../../extras/mini-os/arch/x86/include -isystem /var/run/sr-mount/88087a1d-af80-a232-ca10-833522abd024/opam/4.01.0/build/mirage-xen-minios.0.6.0/xen-minios-v0.5/extras/mini-os/../../extras/mini-os/arch/x86/include/x86_64 -c blkfront.c -o /var/run/sr-mount/88087a1d-af80-a232-ca10-833522abd024/opam/4.01.0/build/mirage-xen-minios.0.6.0/xen-minios-v0.5/extras/mini-os/blkfront.o
Here’s the stderr:
+ . ./vars.sh
++ '[' '' = '' ']'
++ command -v opam
+++ opam config var prefix
++ PREFIX=/var/run/sr-mount/88087a1d-af80-a232-ca10-833522abd024/opam/4.01.0
++ MINIOS=minios-v0.5
++ MINIOS_ARCHIVE=minios-v0.5.tar.gz
++ MINIOS_URL=https://github.com/talex5/xen/archive/minios-v0.5.tar.gz
++ LIBM=openlibm-0.4.1-tal1
++ LIBM_ARCHIVE=v0.4.1-tal1.tar.gz
++ LIBM_URL=https://github.com/talex5/openlibm/archive/v0.4.1-tal1.tar.gz
+ rm -rf xen-minios-v0.5
+ tar -zxf minios-v0.5.tar.gz
+ cd xen-minios-v0.5/extras/mini-os
+ make debug=n
cc1: error: unrecognized command line option "-fno-tree-loop-distribute-patterns"
Is centos 6 support needed, or will just centos 7 be sufficient?
I think we can probably target 7 only. I guess the best fix would be to
have a ‘configure’ step explain the problem and shield the user from the
gcc error.
On Thu, Feb 12, 2015 at 10:51 AM, Anil Madhavapeddy <
notifications@github.com> wrote:
Is centos 6 support needed, or will just centos 7 be sufficient?
—
Reply to this email directly or view it on GitHub
#12 (comment)
.
Dave Scott
should most likely be $(call cc-option,$(CC),-fno-tree-loop-distribute-patterns)
instead…
It’s probably safe to remove it for very old versions of gcc (since I guess back then we compiled without it). I don’t know if there are versions of gcc that support the troublesome optimisation but provide no way to disable it.
The effect of not using the flag when needed is that Mini-OS’s memcpy
, strlen
and similar basic functions get replaced with versions that directly call themselves, resulting in an infinite loop.
I think @hannesm’ solution seems safest…
$(call cc-option,$(CC),-fno-tree-loop-distribute-patterns)
If the flag is present, invoke it.
(my last comment: but the CFLAGS in mirage-platform shouldn’t matter here due to the check of the minor version of gcc inside the scripts)
Didn’t help much unfortunately. After removing the flag I get this error instead:
### stderr ###
# ...[truncated]
# ++ LIBM=openlibm-0.4.1-tal1
# ++ LIBM_ARCHIVE=v0.4.1-tal1.tar.gz
# ++ LIBM_URL=https://github.com/talex5/openlibm/archive/v0.4.1-tal1.tar.gz
# + cp -av /home/mag/git/mirage-xen-minios/xen-minios-v0.6 .
# + cd xen-minios-v0.6/extras/mini-os
# + make debug=n
# In file included from blkfront.c:6:
# /home/mag/.opam/system/build/mirage-xen-minios.0.7.0/xen-minios-v0.6/extras/mini-os/../../extras/mini-os/include/stdint.h:1:24: error: stdint-gcc.h: No such file or directory
# make[1]: *** [/home/mag/.opam/system/build/mirage-xen-minios.0.7.0/xen-minios-v0.6/extras/mini-os/blkfront.o] Error 1
# make: *** [build] Error 2
Looks like stdint-gcc.h isn’t available in gcc 4.4…
I think we can probably target 7 only.
To the best of my understanding, Xen is not supported on CentOS 7 yet. Seems like this should support 6 at least until there is a simple installation path for Xen on 7. No?
@djs55 @jonludlam — could you comment on CentOS 6 vs 7 and how xen4centos fits into all this?
btw, xen decided to move mini-os out of their xen repository (it lives here). this does not contain all of our patches to minios, but some updates esp within the build system (esp: it builds with clang, does not depend on stdint-gcc.h anymore, …)… we should really fork that and getting our patches on top of it (unfortunately I’m currently low on time regarding this). @avsm could you do an automated mirror of the xen mini-os repo within mirage organization on GitHub, similar to (or instead of?) the xen mirror
Closing, as the title issue is now fixed. Please open a new issue if compiling on older CentOS versions is still needed and not working for some other reason.
При компиляции SpanDSP 0.0.6 на Centos 5 возникает ошибка:
cc1: error: unrecognized command line option "-Wunused-but-set-variable"
Возможная причина устаревшие версии autoconf и automake.
Решение
cd /usr/src yum install libtool wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/tpokorra:/openpetra/CentOS_CentOS-5/i386/autoconf-2.69-3.2.i386.rpm rpm -Uhv autoconf-2.69-3.2.i386.rpm wget ftp://ftp.pbone.net/mirror/ftp5.gwdg.de/pub/opensuse/repositories/home:/tpokorra:/openpetra/CentOS_CentOS-5/x86_64/automake-1.13-10.1.x86_64.rpm rpm -Uhv automake-1.13-10.1.x86_64.rpm wget http://soft-switch.org/downloads/spandsp/spandsp-0.0.6.tar.gz tar zxvf spandsp-0.0.6.tar.gz cd spandsp-0.0.6 autoreconf --force --install ./configure make make install для 64 битной системы: ln -s /usr/local/lib/libspandsp.so.2 /usr/lib64/libspandsp.so.2
Проверим:
asterisk -rx «core restart now»
CLI> module show like fax Module Description Use Count Status res_fax.so Generic FAX Applications 1 Running res_fax_spandsp.so Spandsp G.711 and T.38 FAX Technologies 0 Running 2 modules loaded
Troubleshooting
- Remove From My Forums
-
Question
-
User2028823583 posted
This is my first attempt at using the Ajax control Toolbox. I’m getting this message on a AutoCompleteExtender that I’m trying to use. Do you know what this error means and how to fix? unrecognized tag prefix or device filter ‘cc1’.
I’ve got the autocomplete working in debug mode (I get prompted to enter an value and click invoke). However, when I try on the server not in debug mode, the page just loads, and doesn’t autocomplete when I type in any values. Is this becuase of
this error? I’m using VisualStudio 2008 and .net 3.5my code:
<html xmlns=»http://www.w3.org/1999/xhtml»>
<head runat=»server»>
<title>Untitled Page</title>
<script
type=»text/javascript»>
function pageLoad() {
}
</script>
</head>|
<body>
<form
id=»form1″
runat=»server»>
<asp:ScriptManager
ID=»ScriptManager1″
runat=»server»>
</asp:ScriptManager>
<div>
<asp:TextBox
ID=»TextBox1″
runat=»server»
Width=»785px»></asp:TextBox>
<cc1:AutoCompleteExtender
id=»AutoCompleteExtender1″
runat=»server»
minimumprefixlength=»1″
servicemethod=»GetProducts»
servicepath=»WebService.asmx»
targetcontrolid=»TextBox1″
completionsetcount=»20″></cc1:AutoCompleteExtender></div>
</form>
</body>
</html>my webservice to select from sqlImports System
Imports System.Configuration
Imports System.Data
Imports System.Data.SqlClient
Imports System.Web
Imports System.Collections
Imports System.Web.Services
Imports System.Web.Services.Protocols
Imports System.Web.Script.Services
<ScriptService()> _
<WebService([Namespace]:=«http://newemployment.com/»)> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
Public
Class WebService
Inherits System.Web.Services.WebService
Public Sub
New()
End Sub
<WebMethod()> _
Public Function GetProducts(ByVal prefixText
As String)
As String()
Dim sql As
String = «Select * from tclient Where clnum like @prefixText»
Dim da As
New SqlDataAdapter(sql, ConfigurationManager.ConnectionStrings(«ClientConnectionString»).ConnectionString)
da.SelectCommand.Parameters.Add(«@prefixText», SqlDbType.VarChar).Value = prefixText +
«%»
Dim dt As
New DataTable()
da.Fill(dt)
Dim items As
String() = New
String(dt.Rows.Count — 1) {}
Dim i As
Integer = 0
For Each dr
As DataRow In dt.Rows
items.SetValue(dr(«clnum»).ToString(), i)
i += 1
Next
Return items
End Function
End Class
Answers
-
User-125547262 posted
here you go this is what the full one whould be
<%@ Register Assembly=»AjaxControlToolkit»
Namespace=»AjaxControlToolkit» TagPrefix=»cc1″ %>-
Marked as answer by
Thursday, October 7, 2021 12:00 AM
-
Marked as answer by
-
User-1573490007 posted
«cc» is for «custom control». Its just the default value that Visual Studio will give if none are defined in the custom control’s assembly. Think of it as a control namespace alias, so to speak. As shown in the post above, you deside which one to use in
the end, you can put cc1, you can put abcd, whatever.The register tag is simply a definition of the namespace/assembly of the controls. Visual Studio usually figures it out on its own if you drag and drop a control from the toolbox, though.
-
Marked as answer by
Anonymous
Thursday, October 7, 2021 12:00 AM
-
Marked as answer by