-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mtr (GTK interface) doesn't work as expected on win32 #202
Comments
OK. To me this becomes more readable than among the "mess" of different things in the other issue. Thus improving the chances of finding a fix.... The GTK warnings are probably about the "pipe" from mtr-packet to the mtr-gui. In curses-mode those are used in an mtr-internal select call, but in GTK, these are passed to "..add_watch.." and then gtk is supposed to watch those FDs and dispatch to the code to handle the IO that comes in. The question is: Did we create the wrong type of filedescriptor? Or does GTK on Windows simply not support pipes as an object to watch? |
Lack of support? Humm, maybe I should try linking all the libraries in GTK folder in case of internal dependency (I didn't see any complaints during compilation though). I will let you know if this changes anything.
|
Linked all the lib in gtk+/lib,
same error.
|
Sorry. forgot to reply to tell you that wouldn't help. Under Unix the philosophy is: "everything is a file". So you open a serial port by opening /dev/ttyUSB0, /dev/ttyS0 or /dev/ttyAMA0. For basic operations, that's "a file descriptor" that works just like any other. There are a few extra things that you can do through ioctl, but for everything else it just works. On MSwindows, there is a special API for serial ports. what you get is a serial port handle, and that might not work everywhere a normal file handle works. The "serial" above is just an example. In the case at hand, the g_io_add_watch_full function seems to expect a file descriptor or a socket. The handle, 5, apparently does not qualify. It is a pipe to the sub-program "mtr-packet". So... Either g_io_add_watch_full needs to be expanded for the "special" case where the descriptor refers to a pipe, or mtr needs to be modified to make the pipe work as a file descriptor or a socket. (probably "socket"). |
<cut & pasted from #199>
I also tried to compile it with GTK+, at first am trapped at linking stage for mtr.exe,
make -n
GTK_LIBS is set to a directory. I corrected my brainless error, moved all the directory to
GTK_CFLAGS=-L'/c/Program Files/...'
But I am still getting a lot of compiling errorundefined reference to g_type_check_instance_cast
etc. like below:After linked a lot of lib like below by hand it successfully compiled:
But the compiled binary doesn't work. giving error alert asking for a
-mms-bitfields
switch, so my final CFLAGS for GTK become:After all these tinkering, the compiling completed without error, but the application doesn't work as expected. The UI is functional, and user interaction is ok. but it doesn't do the job. there is no data after setting the host, [restart] & [pause], console shows:
Not sure what can be done next to get this right...
<cut paste from #199>
PS: my win32 GTK is
gtk+-bundle_2.24.10-20120208_win32
recenetly downloaded by RGtk.I can't imagine
msys2
orcygwin
users from Windows platform be such a fan of GTK+ to gone through all these pains to compile their GTK enabled mtr... I am compiling GTK simply because its claimed as supported and I never saw it before. Anyway I am quite happy with the current ncurses version status.Thanks for creating this nice piece of software, and offering it to public for free.
The text was updated successfully, but these errors were encountered: