Install putty (build putty on Solaris) on Solaris)

Source: Internet
Author: User
Putty is a very useful open-source terminal software. Supports most remote logon protocols.
However, in addition to terminal, Solaris does not seem to have terminal software such as securecrt and putty.

Putty is open-source and the code can be downloaded in the http://www.putty.nl/download.html.

The following describes how to compile Putty:
First, download to putty0.6, go to the Unix directory, and run./configure
This will automatically generate makefile Based on the machine's situation.
Then make.
Some problems may occur during the make process, which are summarized as follows:

1. Symbolic connection Error
Undefined first referenced
Symbol in file
In6addr_loopback uxnet. o
In6addr_any uxnet. o
Ld: Fatal: Symbol referencing errors. No output written to plink
Collect2: LD returned 1 exit status
* ** Error code 1
Make: Fatal error: Command failed for target 'plink'
Cause: the IPv6 library is not found during compilation.
Solution: Modify makefile
Add-lsocket after uldflags =-lxnet.

2. Compilation option Error
Gcc-O puttygen cmdgen. O import. O Misc. O notiming. O sshaes. O sshbn. O/
Sshdes. O sshdss. O sshdssg. O sshmd5.o sshprime. O sshpubk. O/
Sshrand. O sshrsa. O sshrloud. O sshsh512.o sshsha. O time. O/
Tree234.o uxcons. O uxgen. O uxmisc. O uxnoise. O uxstore. O/
Version. O-lxnet
Gcc-g-O2-wall-werror-dhave_config_h-I/usr/local/include/gtk-1.2-I/usr/local/include/glib-1.2-I/usr/local/ LIB/glib/include-I/usr/openwin/include-I .. /. /-I .. /charset/-I .. /Windows/-I .. /Unix/-I .. /MAC/-I .. /MacOSX/-C .. /config. c
../Config. C: In function 'portfwd _ handler ':
../Config. C: 1060: Warning: unused variable 'idx'
* ** Error code 1
Make: Fatal error: Command failed for target 'config. o'
Cause: Some header files contain # pragma ident string indication, and its function is to add the string. comment does not affect program execution, but GCC cannot identify it and generates a warning. because you do not have the permission to modify the header file, remove the compile option-werror in makefile, this compilation option allows the compiler to handle warnings as errors, and generate a warning that make will not stop.
Solution: remove the-werror option in makefile.

3. System Call
Gcc-g-O2-wall-dhave_config_h-I/usr/local/include/gtk-1.2-I/usr/local/include/glib-1.2-I/usr/local/lib/ glib/include-I/usr/openwin/include-I .. /. /-I .. /charset/-I .. /Windows/-I .. /Unix/-I .. /MAC/-I .. /MacOSX/-C .. /Unix/uxpty. c
../Unix/uxpty. C: In function 'pty _ open_master ':
../Unix/uxpty. C: 364: Error: 'fionbio 'undeclared (first use in this function)
../Unix/uxpty. C: 364: Error: (each undeclared identifier is reported only once
../Unix/uxpty. C: 364: Error: for each function it appears in .)
* ** Error code 1
Make: Fatal error: Command failed for target 'uxpty. o'
Cause: uxpty. the macro fionbio is used in C. The macro is actually defined in sys/filio. in H, sys/IOCTL. h contains sys/filio. h, while uxpty. C contains sys/IOCTL. h. fionbio should be correctly referenced for normal understanding, but the fionbio symbol cannot be found during compilation, so sys/filio. H is included in uxpty. it is okay to recompile in C, which indicates that the compiler preprocessing has some problems.
Solution: Include sys/filio. h In uxpty. C.

4. Code Modification
Gcc-O pterm be_none.o using line. O config. O dialog. O fromucs. O gtkcfg. O/
Gtkcols. O gtkdlg. O gtkwin. O ldisc. O ldiscucs. O localenc. O/
Logging. O macenc. O mimeenc. O minibidi. O Misc. O nocproxy. O/
Sbcs. O sbcsdat. O sercfg. O settings. O slookup. O terminal. O/
Time. O timing. O toucs. O tree234.o utf8.o uxcfg. O uxmisc. O/
Uxprint. O uxpterm. O uxpty. O uxsel. O uxsignal. O uxstore. O/
Uxucos. o version. O wcwidth. O xenc. O xkeysym. O xpmptcfg. O/
Xpmpterm. o-lxnet-L/usr/SFW/lib-L/usr/openwin/lib-r/usr/openwin/lib-lgtk-lgdk-r/usr/SFW/lib- lgmodule-lglib-lxext-lx11-lsocket-lnsl-LM
Undefined first referenced
Symbol in file
Xutf8textlisttotextproperty gtkwin. o
Xutf8textpropertytotextlist gtkwin. o
Ld: Fatal: Symbol referencing errors. No output written to pterm
Collect2: LD returned 1 exit status
* ** Error code 1
Make: Fatal error: Command failed for target 'ptermin'
Cause: the xutf8textlisttotextproperty and xutf8textpropertytotextlist functions are available only after a certain version of X11. They should be available in xutil. h, but they may not be available in the current version of X11.
Solution: there are some other functions in xutil. h. The parameters are exactly the same. xmbtextlisttotextproperty and xmbtextpropertytotextlist, so we try to replace them and compile them successfully to obtain executable files. However, the most fundamental solution is to compile with the new X11.

5. runtime warning
GTK-warning **: unable to locate loadable module in module_path: "libpixmap. So"
This problem seems very common. Google then finds a solution on Ubuntu:
This is caused by the lack of the gtk1 pixmap engine.
You can install it (and thus fix this issue) by APT-getting the _ GTK-engines-pixmap _ package.
However, the gtkengines is not found on the blastwave.

According to the above method, Putty can be compiled smoothly. Run./Putty to see a good interface.
Enjoy!

Note: the compilation process is compiled by the Unix-center user he1l0. I have summarized it with my own compilation. Thank you very much for he1l0. Original post please visit: http://www.unix-center.net/bbs/viewthread.php? Tid = 1526 & extra = Page % 3d1 & page = 1

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.