Gcc Configure Ansi Error
Contents |
Building gcc with gmp source is failing with "Can't find gmp headers" (Centos 6.5) From: Dave Gittins
Gcc Unrecognized Command Line Option
dot gnu dot org Date: Mon, 14 Apr 2014 09:49:19 +1000 gcc error unrecognized command line option fstack protector strong Subject: Building gcc with gmp source is failing with "Can't find gmp headers" (Centos 6.5) Authentication-results: sourceware.org;
Gcc Fstack-protector-strong
auth=none I need to build gcc 4.4.0 (for various reasons beyond my control!) on my Centos 6.5 box. I want the resulting binaries to be usable by error unrecognized command line option m64 others who may not have the same external packages installed. So I am attempting to follow the instructions that suggest placing the source distributions for GMP/MPFR/MPC/ISL/CLooG in subdirectories of the main source directory. The gcc-4.4.0 distribution is lacking the "download_prerequisites" script. So I downloaded the minimum versions required of all five external libs, and then g++ unrecognized command line option did this: mkdir gcc-4.4.0-src mkdir gcc-4.4.0-obj rsync -a gcc_tarballs/gcc-4.4.0/ gcc-4.4.0-src rsync -a gcc_tarballs/gmp-4.3.2/ gcc-4.4.0-src/gmp/ rsync -a gcc_tarballs/mpc-0.8.1/ gcc-4.4.0-src/mpc/ rsync -a gcc_tarballs/mpfr-2.4.2/ gcc-4.4.0-src/mpfr/ rsync -a gcc_tarballs/isl-0.12.2/ gcc-4.4.0-src/isl/ rsync -a gcc_tarballs/cloog-0.18.1/ gcc-4.4.0-src/cloog/ cd gcc-4.4.0-obj/ ../gcc-4.4.0-src/configure --prefix=/home/dgittins/gcc-4.4.0 make This starts off OK but eventually stops with: checking which gmp to use... system checking gmp.h usability... no checking gmp.h presence... no checking for gmp.h... no configure: error: Can't find gmp headers. make[2]: *** [configure-stage1-cloog] Error 1 What am I doing wrong? Why does it seem to want to use system gmp? It has created a file gcc-4.4.0-obj/gmp/gmp.h which looks normal enough. I tried the entire process with gcc 4.6.4 with exactly the same result... Any help appreciated - I have tried to RTFM but I am a bit lost. Content of config.log below. Cheers D ========================================== config.log: This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by configure, which was generated by GNU Autoconf 2.59
to spam. Bug8974 - fabs error with -ansi Summary: fabs error with -ansi Status: RESOLVED WORKSFORME Alias: None Product: gcc
Gcc Error Unrecognized Command Line Option Mno Cygwin
Classification: Unclassified Component: other (show other bugs) Version: 3.2 Importance: P3 normal Target gcc error unrecognized fstack protector strong Milestone: --- Assignee: Not yet assigned to anyone URL: Keywords: Depends on: Blocks: Reported: 2002-12-17 02:16 UTC by
Gcc Command Line Option
warren Modified: 2005-07-23 22:49 UTC (History) CC List: 3 users (show) gcc-bugs steven warren See Also: Host: Target: Build: Known to work: Known to fail: Last reconfirmed: Attachments test.i.gz (3.35 KB, https://gcc.gnu.org/ml/gcc-help/2014-04/msg00048.html application/x-gzip ) 2003-05-21 15:17 UTC, warren Details View All Add an attachment (proposed patch, testcase, etc.) Note You need to log in before you can comment on or make changes to this bug. Description warren 2002-12-17 02:16:01 UTC fabs() gives garbage (output included below) when I compile the code below with gcc 3.2 with the -ansi flag and run it on a https://gcc.gnu.org/bugzilla/show_bug.cgi?id=8974 PentiumIV 2.4 GHz I have access to. The same code compiled with any other version of gcc or with icc works properly. Running the same binary on a different spec machine works properly, but gives the same problem on other machines of the same type. The problem only occurs when the -ansi flag is used (When I compile the code below with: gcc -ansi -lm -o test test.c it gives problems, but when I compile with: gcc -lm -o test test.c it works properly.). Source file: /* Test fabs problem */ #include
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about http://stackoverflow.com/questions/17977442/mex-generates-error-for-while-compiling-c-code-in-linux Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Mex generates error for // while compiling C code in Linux up vote 2 command line down vote favorite I want to compile a C code in ubuntu using mex which is configured with gcc. I can smoothly compile the code in OSX. However, when I want to compile it in Linux, the compiler generates the error on the comment lines starting with // (it works fine with /* */. Since the program includes several header files from third-party libraries, I cannot substitute // with /* command line option */. I would like to know whether there is any way around to overcome this problem. MATLAB version: R2012b gcc version in Linux: 4.7.2 gcc version in OSX: 4.2.1 Any help is appreciated Edit: Here is the command I use to compile the code: mex -g -largeArrayDims -ldl TDSVDHNGateway.c Here is the error generated by mex: In file included from TDSVDHNGateway.c:2:0: TDS.h:17:1: error: expected identifier or ‘(’ before ‘/’ token TDS.h:26:2: error: unknown type name ‘index_t’ TDS.h:27:2: error: unknown type name ‘index_t’ In file included from TDSVDHNGateway.c:2:0: TDS.h:146:3: error: unknown type name ‘index_t’ TDSVDHNGateway.c:37:3: error: unknown type name ‘index_t’ TDSVDHNGateway.c: In function ‘mexFunction’: TDSVDHNGateway.c:166:25: error: ‘index_t’ undeclared (first use in this function) TDSVDHNGateway.c:166:25: note: each undeclared identifier is reported only once for each function it appears in Line 17 in header file is: //Defining index_t typedef size_t index_t; If I replace //Defining index_t with /*Defining index_t*/ the code will be compiled with no problem. c gcc mex share|improve this question edited Jul 31 '13 at 18:03 asked Jul 31 '13 at 17:51 Pouya 4101719 Can you list out the compiler errors? –Rhs Jul 31 '13 at 17:52 2 Please determine and post the exact command line which mex uses to invoke gcc. I suspect there