Gcc g++ on cygwin - configure: error: *** A compiler with support for C++11 language features is req


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Gcc g++ on cygwin - configure: error: *** A compiler with support for C++11 language features is req
# 8  
Old 07-01-2019
Quote:
Originally Posted by Neo
Yeah, it was a long shot, as I have no idea about anything on Windows, including Cygwin.

I thought, maybe wrong, that as long as the architecture was the same (CPU family and number of bits, I assume 64 bit), that if you use gcc to compile a static binary on one, it should run on the other.

I am probably way off and totally wrong.
You are not entirely wrong, just that one anomaly to be able to pipe if necessary.
Most - if not all - native Windows _apps_ will launch happily from CygWin but don't expect to be able to pipe into SoundRecorder.exe for example like this and expect it to work:
echo " \/FILE waveform.wav \/DURATION 0000:00:02" | /full/path/to/SoundRecorder.exe
# 9  
Old 07-01-2019
cygwin runs using the windows api, via a sort of translation library: UNIX -> intermediate libraries -> windows. It is an elf executable.
# 10  
Old 07-02-2019
Thanks everyone for your replies. I see it now more complicated.

The latest version of GCC available through Cygwin is 8.3.0 hence I tried to compile 9.1.0 from source. But I get some errors, even though I installed gmp, mpfr & mpc and set their paths in configure and also via Environmental variables it still throws the same errors.

Quote:
admin@HP-BIG-DESK ~/gcc-9.1.0
$ ./configure --disable-shared --disable-bootstrap --disable-libstdcxx-pch --enable-languages=all --enable-libgomp --enable-lto --enable-threads=posix --enable-tls --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --with-libelf=/usr/local

checking build system type... x86_64-pc-cygwin
checking host system type... x86_64-pc-cygwin
checking target system type... x86_64-pc-cygwin
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... gawk
checking for libatomic support... yes
checking for libitm support... no
checking for libsanitizer support... no
checking for libvtv support... yes
checking for libhsail-rt support... no
checking for libphobos support... no
checking to see if cat works as expected... yes
checking for gcc... /usr/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/gcc accepts -g... yes
checking for /usr/bin/gcc option to accept ISO C89... unsupported
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether g++ accepts -static-libstdc++ -static-libgcc... no
checking for gnatbind... gnatbind
checking for gnatmake... gnatmake
checking whether compiler driver understands Ada... yes
checking how to compare bootstrapped objects... cmp --ignore-initial=16 $$f1 $$f2
checking for objdir... .libs
checking for the correct version of gmp.h... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at
their respective hosting sites as well as at
ftp://gcc.gnu.org/pub/gcc/infrastructure/. See also
Prerequisites for GCC
- GNU Project - Free Software Foundation (FSF)
for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files. They may be located in separate packages.

admin@HP-BIG-DESK ~/gcc-9.1.0
$

admin@HP-BIG-DESK ~/gcc-9.1.0
$ ls /usr/local
bin etc include lib share

admin@HP-BIG-DESK ~/gcc-9.1.0
$ ls /usr/local/include/
gmp.h isl mpc.h mpf2mpfr.h mpfr.h

admin@HP-BIG-DESK ~/gcc-9.1.0
$ ls /usr/local/lib
libgmp.a libgmp.la libisl.a libisl.la libmpc.a libmpc.la libmpfr.a libmpfr.la pkgconfig

admin@HP-BIG-DESK ~/gcc-9.1.0
$ pwd
/home/admin/gcc-9.1.0

admin@HP-BIG-DESK ~/gcc-9.1.0
$ echo $LDFLAGS
-L/usr/local/lib

admin@HP-BIG-DESK ~/gcc-9.1.0
$ echo $CPPFLAGS
-I/usr/local/include

admin@HP-BIG-DESK ~/gcc-9.1.0
$
# 11  
Old 07-03-2019
Maybe you can move off Window's based CygWin and on to a real unix-like operating system Smilie

From the CygWin site:

Quote:
Cygwin is:

a large collection of GNU and Open Source tools which provide functionality similar to a Linux distribution on Windows.
a DLL (cygwin1.dll) which provides substantial POSIX API functionality.
...isn't it?

Cygwin is not:

a way to run native Linux apps on Windows. You must rebuild your application from source if you want it to run on Windows.
a way to magically make native Windows apps aware of UNIX® functionality like signals, ptys, etc. Again, you need to build your apps from source if you want to take advantage of Cygwin functionality.


If you truly want full gcc capability, move to Linux and off Windows Smilie

Please note. This question is in the "UNIX for Advanced & Expert Users" forum, but this is not a "UNIX for Advanced & Expert Users" question, it is a Windows Cygwin question.

We are not a "Windows" forum, to be honest.
This User Gave Thanks to Neo For This Post:
# 12  
Old 07-03-2019
Thanks Neo, will do.

Probably I will try Windows Subsystem for Linux (WSL).

Best regards,
# 13  
Old 07-03-2019
Welcome.

FYI, I never use Windows for anything.

Linux for servers (like this site and other servers). MacOS for desktop work (actually, I have four Macs, one 12 core MacPro, one MacMini and two Mac Book Airs).

Today I just bought a new 1TB (actually 960GB, Transcend 855) SSD for my MacPro and installed it already (removing the original 256GB drive), and it works great.

Now that I have more "on board" SSH (internal), it renders video (Adobe After Effects) about twice as fast. One complex (lots of effects) video which took 1.5 hours to render, before the upgrade, rendered today in 40 minutes after the upgrade.

I currently have 64GB of RAM, but I'm considering upgrading to max out at 128GB so I can render faster, especially since I'm prone to spelling errors in After Effects which has no grammar or spelling checker (that I know of). Haha

Anyway, I really suggest you get off "Windows" and move on to a really great unix-based OS like Linux or MacOS Smilie If you want pretty windows and a slick UI, then go with the Mac. If you just want a raw server, then go with Linux. That's what I do, at least. Linux on the servers (without any GUI, terminal only) and Macs to run all the "eye candy" apps on the desktop (rending video with Adobe After Effects, Premier Pro, Camtasia, etc).

Cheers and Good Luck.
# 14  
Old 07-03-2019
A full blown Linux kernel - WSL2 is part of the Windows 10 June update. So it does not require you to install cygwin or dual boot Ubuntu (or whatever Linux) to be able to effectively use UNIX.
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

cc compiler and gcc compiler

hi, can we install gcc compiler in unix based OS(sun solar,IBM AIX,HP,etc) and also can we install sun cc compiler in AIX environment and vice versa. and more ..is linux support cc compiler regards Ajay (3 Replies)
Discussion started by: ajaysahoo
3 Replies

2. Programming

gcc compiler

Which gcc compiler release had the Arm 9 multicore support?Whether the compiler that used for the single Arm 9 core can be used for its multicore systems ? If gcc not support,please tell me which are the compilers that are available for Arm 9 multicore systems (including commerical).Whether... (0 Replies)
Discussion started by: sujith4u87
0 Replies

3. UNIX for Dummies Questions & Answers

GCC compiler Ld fatal error

Hi all I'm trying to install sudo. When I first ran the sudo configure script it errored saying that I didn't have a C compiler. I have since installed the GCC 3.4.6 package for sol8 from sun freeware. Doing that resolved the no C complier found error. I was then getting an error saying... (1 Reply)
Discussion started by: Donkey25
1 Replies

4. Ubuntu

./configure command Error while trying to install GCC compiler on unix machine

Hi, I need to install the GCC compiler on a my Linus machine. First step is to run the ./configure command and here we need to specify ./configure --target="target machine name (CPU type-Manufacturer-OS) or other way would be just give the command ./configure and it guesses the target name... (11 Replies)
Discussion started by: viji19812001
11 Replies

5. Ubuntu

gcc compiler

where to download gcc compiler for ubuntu? how to install? how to build and run "c programs"? screen shots if possible.....:b::D tutorials too:cool: (5 Replies)
Discussion started by: villanarun
5 Replies

6. HP-UX

gcc error..compiler cannot create executables

Hi I have locally compiled and installed gcc-4.1.2 in directory /usr/local/pkg/gcc/4.1.2/bin/gcc I want to compile beecrypt using this new compiler , So i have done setenv CC usr/local/pkg/gcc/4.1.2/bin/gcc ( Note this configuration is running properly with older version of... (1 Reply)
Discussion started by: vasanthan
1 Replies

7. Programming

New to C/gcc compiler - compile error.

I am new to comiling c/c++ programs with gcc compilier unix - AIX version 5.3 gcc compiler version - 4.0.0 My makefile. # makefile 1.0 08/20/98 #CC = cc CC = gcc ESQL = esql CFLAGS = -Wall DBSLIB= DBSLIB=-L${INFORMIXDIR}/lib/esql -L${INFORMIXDIR}/lib `esql -libs` ALL = hds_near... (9 Replies)
Discussion started by: anish
9 Replies

8. UNIX for Dummies Questions & Answers

xl C/C++ compiler to GCC compiler

Hi, we are converting from IBM-AIX(xl c/c++ compiler) to Linux(GCC complier). As a part of this i need to change the CFLAGS. The xl c/c++ complier CFLAGS is CFLAGS := $(CDEBUG) $(PROJECT_INCLUDE_DIRS) $(COBJECT_MODE) -qcpluscmt -qmakedep -qcheck=all \ -qalign=bit_packed $(LINT_FLAGS)... (0 Replies)
Discussion started by: pbattu1
0 Replies

9. Programming

gcc compiler

i write c++ code it run perfectely with g++ compiler but same code when i compile with GCC compiler it gives linker error , followed these linker error /tmp/ccfZtXOQ.o(.text+0x22): In function `main': conf_system.cpp: undefined reference to `operator new(unsigned int)'... (5 Replies)
Discussion started by: munnu
5 Replies
Login or Register to Ask a Question