20

How to install build-essential in Cygwin?
I've tried using: apt-cyg install build-essential But does not work.

Installing build-essential
Package build-essential not found or ambiguous name, exiting

I'm also having problems like:

(gedit: 13864): Gtk-WARNING **: can not open display:


So I can not install crunch. See It:

$ make all
Building binary...
/usr/bin/gcc -pthread -Wall -pedantic -std=c99 undefined crunch.c -lm -o crunch
gcc: error: undefined: No such file or directory
Makefile:48: recipe for target 'crunch' failed
make: *** [crunch] Error 1

What's the problem here, and how can I fix it?

1
  • 1
    You can compile crunch, but you need to edit the Makefile first and remove all occurrences of $(LFS) which is looking for a non existing shell variable and causing the compiler command option to have the undefined (an obvious error) in it.
    – not2qubit
    Commented Dec 25, 2017 at 11:19

2 Answers 2

23

There isn't a build-essential package in Cygwin.

Build-essential is a collection of packages. So you'll have to select the packages manually, which I believe are the following:

  1. make
  2. automake
  3. gcc
  4. gcc-c++

Assuming you're doing development, you'll want to select those packages from the Devel branch. This is done when you first install Cygwin and the installer asks you to select the packages, after choosing the download site from the list.

Screenshot

As for the Gtk-WARNING **: can not open display: error, this is because your system is not running Cygwin's X11 display server, which provides a surface for graphical applications to render to. Check out http://x.cygwin.com/.

If you want to run gedit in Windows, you should get the binary for windows here. That's built for Windows and doesn't need Cygwin.

EDIT: Running sudo apt-get install build-essential on Elementary OS Freya mentions the following dependencies will be installed as well, so you'll probably want that for a 'closer-to-Linux' build environment as well.

The following extra packages will be installed:

  • g++
  • g++-4.8
  • libstdc++-4.8-dev

Suggested packages:

  • g++-multilib
  • g++-4.8-multilib
  • gcc-4.8-doc
  • libstdc++6-4.8-dbg
  • libstdc++-4.8-doc

The following NEW packages will be installed:

  • build-essential
  • g++
  • g++-4.8
  • libstdc++-4.8-dev

The list of files installed can be found here and the contents of the file list (current as of 4/24/2014) can be found in this PasteBin I made.

2
  • Thank you so very much. Excuse me for repeating. The topic has already been deleted. Commented Apr 10, 2015 at 19:31
  • 2
    Don't worry about it, welcome to SO @JedaiasRodrigues! I've removed the link as well. :) have a great friday! Commented Apr 10, 2015 at 19:33
6

build-essential is an abstract package, short for its dependencies:

  • dpkg-dev
    • binutils
    • bzip2
    • libdpkg-perl
    • make
    • patch
    • perl
    • tar
    • xz-utils
  • g++
  • gcc
  • libc6-dev
  • make

So in Cygwin, it is the same to install their substitutes:

apt-cyg install make gcc-core gcc-g++ patch bzip2 perl tar xz

make and gcc-g++ (g++), which depends on gcc-core (gcc), are the most important.

If you really want to compile various projects in Cygwin, packages below may be also helpful. Be careful, libboost-devel is very large.

apt-cyg install git automake cmake python3-devel libboost-devel

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.