hishamhm / htop

htop is an interactive text-mode process viewer for Unix systems. It aims to be a better 'top'.
GNU General Public License v2.0
5.85k stars 580 forks source link

Does not compile under cygwin #266

Open petrklus opened 9 years ago

petrklus commented 9 years ago

./configure works, but make gives following error:

Petr@gamingpc:~/htop-1.0.3$ make
make  all-am
make[1]: Entering directory '/home/Petr/htop-1.0.3'
gcc -DHAVE_CONFIG_H -I.  -DNDEBUG  -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-AvailableMetersPanel.o -MD -MP -MF .deps/htop-AvailableMetersPanel.Tpo -c -o htop-AvailableMetersPanel.o `test -f 'AvailableMetersPanel.c' || echo './'`AvailableMetersPanel.c
gcc: error: unrecognized command line option ‘-rdynamic’
Makefile:467: recipe for target 'htop-AvailableMetersPanel.o' failed
make[1]: *** [htop-AvailableMetersPanel.o] Error 1
make[1]: Leaving directory '/home/Petr/htop-1.0.3'
Makefile:292: recipe for target 'all' failed
make: *** [all] Error 2
JoshuaGhost commented 9 years ago

“Executable formats in OS X and Windows are not ELF, thus the option -rdynamic is not supported building for these operating systems.” Citation: http://stackoverflow.com/questions/29534519/why-gcc-doesnt-recognize-rdynamic-option#

Petr Klus notifications@github.com于2015-9-9 14:44 周三写道:

./configure works, but make gives following error:

Petr@gamingpc:~/htop-1.0.3$ make make all-am make[1]: Entering directory '/home/Petr/htop-1.0.3' gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-AvailableMetersPanel.o -MD -MP -MF .deps/htop-AvailableMetersPanel.Tpo -c -o htop-AvailableMetersPanel.o test -f 'AvailableMetersPanel.c' || echo './'AvailableMetersPanel.c gcc: error: unrecognized command line option ‘-rdynamic’ Makefile:467: recipe for target 'htop-AvailableMetersPanel.o' failed make[1]: * [htop-AvailableMetersPanel.o] Error 1 make[1]: Leaving directory '/home/Petr/htop-1.0.3' Makefile:292: recipe for target 'all' failed make: * [all] Error 2

— Reply to this email directly or view it on GitHub https://github.com/hishamhm/htop/issues/266.

petrklus commented 9 years ago

ok, shouldn't this be picked up by ./configure then?

On Wed, Sep 9, 2015 at 3:02 PM, JoshuaGhost notifications@github.com wrote:

“Executable formats in OS X and Windows are not ELF, thus the option -rdynamic is not supported building for these operating systems.” Citation:

http://stackoverflow.com/questions/29534519/why-gcc-doesnt-recognize-rdynamic-option#

Petr Klus notifications@github.com于2015-9-9 14:44 周三写道:

./configure works, but make gives following error:

Petr@gamingpc:~/htop-1.0.3$ make make all-am make[1]: Entering directory '/home/Petr/htop-1.0.3' gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-AvailableMetersPanel.o -MD -MP -MF .deps/htop-AvailableMetersPanel.Tpo -c -o htop-AvailableMetersPanel.o test -f 'AvailableMetersPanel.c' || echo './'AvailableMetersPanel.c gcc: error: unrecognized command line option ‘-rdynamic’ Makefile:467: recipe for target 'htop-AvailableMetersPanel.o' failed make[1]: * [htop-AvailableMetersPanel.o] Error 1 make[1]: Leaving directory '/home/Petr/htop-1.0.3' Makefile:292: recipe for target 'all' failed make: * [all] Error 2

— Reply to this email directly or view it on GitHub https://github.com/hishamhm/htop/issues/266.

— Reply to this email directly or view it on GitHub https://github.com/hishamhm/htop/issues/266#issuecomment-138902717.

JoshuaGhost commented 9 years ago

Hmmm... sorry i've just found the reason, so maybe let's just wait for responsible experts :D

Petr Klus notifications@github.com于2015-9-9 15:06 周三写道:

ok, shouldn't this be picked up by ./configure then?

On Wed, Sep 9, 2015 at 3:02 PM, JoshuaGhost notifications@github.com wrote:

“Executable formats in OS X and Windows are not ELF, thus the option -rdynamic is not supported building for these operating systems.” Citation:

http://stackoverflow.com/questions/29534519/why-gcc-doesnt-recognize-rdynamic-option#

Petr Klus notifications@github.com于2015-9-9 14:44 周三写道:

./configure works, but make gives following error:

Petr@gamingpc:~/htop-1.0.3$ make make all-am make[1]: Entering directory '/home/Petr/htop-1.0.3' gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-AvailableMetersPanel.o -MD -MP -MF .deps/htop-AvailableMetersPanel.Tpo -c -o htop-AvailableMetersPanel.o test -f 'AvailableMetersPanel.c' || echo './'AvailableMetersPanel.c gcc: error: unrecognized command line option ‘-rdynamic’ Makefile:467: recipe for target 'htop-AvailableMetersPanel.o' failed make[1]: * [htop-AvailableMetersPanel.o] Error 1 make[1]: Leaving directory '/home/Petr/htop-1.0.3' Makefile:292: recipe for target 'all' failed make: * [all] Error 2

— Reply to this email directly or view it on GitHub https://github.com/hishamhm/htop/issues/266.

— Reply to this email directly or view it on GitHub https://github.com/hishamhm/htop/issues/266#issuecomment-138902717.

— Reply to this email directly or view it on GitHub https://github.com/hishamhm/htop/issues/266#issuecomment-138903821.

petrklus commented 9 years ago

I found that reason too but did not seem too relevant as we are not trying to compile ELF binaries on Win but to make sure htop is installable and thus detects all required settings.

Let's see what the solution may be!

On Wed, Sep 9, 2015 at 3:13 PM, JoshuaGhost notifications@github.com wrote:

Hmmm... sorry i've just found the reason, so maybe let's just wait for responsible experts :D

Petr Klus notifications@github.com于2015-9-9 15:06 周三写道:

ok, shouldn't this be picked up by ./configure then?

On Wed, Sep 9, 2015 at 3:02 PM, JoshuaGhost notifications@github.com wrote:

“Executable formats in OS X and Windows are not ELF, thus the option -rdynamic is not supported building for these operating systems.” Citation:

http://stackoverflow.com/questions/29534519/why-gcc-doesnt-recognize-rdynamic-option#

Petr Klus notifications@github.com于2015-9-9 14:44 周三写道:

./configure works, but make gives following error:

Petr@gamingpc:~/htop-1.0.3$ make make all-am make[1]: Entering directory '/home/Petr/htop-1.0.3' gcc -DHAVE_CONFIG_H -I. -DNDEBUG -pedantic -Wall -Wextra -std=c99 -rdynamic -D_XOPEN_SOURCE_EXTENDED -DSYSCONFDIR=\"/usr/local/etc\" -g -O2 -MT htop-AvailableMetersPanel.o -MD -MP -MF .deps/htop-AvailableMetersPanel.Tpo -c -o htop-AvailableMetersPanel.o test -f 'AvailableMetersPanel.c' || echo './'AvailableMetersPanel.c gcc: error: unrecognized command line option ‘-rdynamic’ Makefile:467: recipe for target 'htop-AvailableMetersPanel.o' failed make[1]: * [htop-AvailableMetersPanel.o] Error 1 make[1]: Leaving directory '/home/Petr/htop-1.0.3' Makefile:292: recipe for target 'all' failed make: * [all] Error 2

— Reply to this email directly or view it on GitHub https://github.com/hishamhm/htop/issues/266.

— Reply to this email directly or view it on GitHub https://github.com/hishamhm/htop/issues/266#issuecomment-138902717.

— Reply to this email directly or view it on GitHub https://github.com/hishamhm/htop/issues/266#issuecomment-138903821.

— Reply to this email directly or view it on GitHub https://github.com/hishamhm/htop/issues/266#issuecomment-138905283.

hishamhm commented 9 years ago

Hi!

htop was initially designed specifically for Linux and was never ported to Cygwin. Getting it to work there will definitely require patches, starting with ./configure and then on to the code... it's not a simple matter of getting it to build as in other cross-platform software.

In any case, if anyone gets a working Cygwin port going, patches are welcome!

SaltwaterC commented 9 years ago

The mention about OS X made me try to build htop-osx under Cygwin. The good news is that it built successfully on the first try. The bad news is that it doesn't use the emulated proc filesystem that Cygwin provides. This is obvious as OS X doesn't have any. I think a happy medium may be reached between the two, but my C-fu is not strong.

Here's htop.exe running alongside top, using Babun as environment (Cygwin + the whole shebang). The build dependencies were a pact install autoconf automake libtool away.

htop-top