|
From: | Ullal Devappa Kini |
Subject: | Building Plotutils-2.4.1 Under Cygwin |
Date: | Sat, 14 Jun 2003 21:31:34 +0530 |
Dear Sir,
Some time back, I had downloaded plotutils-2.4.1. I managed to build the software under Cygwin. Details are given below with the hope that they will be of use to you. If you do not find the details of interest, I apologize for wasting your time; please ignore the message. With Best Wishes,
U.D.Kini
Bangalore, India. ------------------------------------------- Building plotutils-2.4.1 under
i686-pc-cygwin:
Cygwin Version 1.3.22 XFree86 Version 4.2 gcc Version 3.2 Windows 98 2nd Edition Pentium III Processor. Part One.
--------- Try building everything by doing configure and make. In the Top Source Directory ( /usr/src/plotutils-2.4.1 ) do LDFLAGS="-L/usr/local/lib -L/usr/X11R6/lib "
\
CPPFLAGS=-I/usr/X11R6/include \ ./configure --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib \ --disable-shared --enable-static --disable-libtool-lock --with-x \ --with-athena=/usr/X11R6 --with-motif=/usr/X11R6 --with-xpm=/usr/X11R6 \ --enable-ps-fonts-in-pcl --enable-lj-fonts-in-ps --enable-lj-fonts-in-x \ --enable-libplotter --enable-libxmi # Before making, add -Wno-deprecated to CPPFLAGS
in
# libplotter/Makefile to avoid unnecessary warnings. make
Errors while making the libplotter
library.
-------- /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/ include -I/usr/X11R6/include -I/usr/X11R6/include -I./../include -DLIBPLOT -DLIB PLOTTER -I/usr/X11R6/include -Wno-deprecated -O2 -c g_write.cc c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/include -I/usr/X11R6/include -I/us r/X11R6/include -I./../include -DLIBPLOT -DLIBPLOTTER -I/usr/X11R6/include -Wno- deprecated -O2 -c g_write.cc -o g_write.o g_write.cc: In function `void _write_bytes(const plPlotterData*, int, const unsigned char*)': g_write.cc:43: invalid conversion from `const unsigned char*' to `const char*' g_write.cc:43: initializing argument 1 of `std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::write(const _CharT*, int) [with _CharT = char, _Traits = std::char_traits<char>]' --------- Delete g_write.cc in libplotter directory. Copy ../libplot/g_write.c to g_write.cc. Edit g_write.cc to change declaration of c to const char * c in the above function. Execute the script starting with c++ in libplotter to compile g_write.o make
Error.
------- /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/ include -I/usr/X11R6/include -I/usr/X11R6/include -I./../include -DLIBPLOT -DLIB PLOTTER -I/usr/X11R6/include -Wno-deprecated -O2 -c i_rle.cc c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/include -I/usr/X11R6/include -I/us r/X11R6/include -I./../include -DLIBPLOT -DLIBPLOTTER -I/usr/X11R6/include -Wno- deprecated -O2 -c i_rle.cc -o i_rle.o i_rle.cc: In function `void _write_block(rle_out*)': i_rle.cc:81: invalid conversion from `unsigned char*' to `const char*' i_rle.cc:81: initializing argument 1 of `std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::write(const _CharT*, int) [with _CharT = char, _Traits = std::char_traits<char>]' -------- Repeat for i_rle.cc in libplotter. Copy ../libplot/i_rle.h to libplotter. Change declaration of oblock to char oblock[256]. Run above script with c++ in libplotter to compile i_rle.cc make
Error.
--------- /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/ include -I/usr/X11R6/include -I/usr/X11R6/include -I./../include -DLIBPLOT -DLIB PLOTTER -I/usr/X11R6/include -Wno-deprecated -O2 -c n_write.cc c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/include -I/usr/X11R6/include -I/us r/X11R6/include -I./../include -DLIBPLOT -DLIBPLOTTER -I/usr/X11R6/include -Wno- deprecated -O2 -c n_write.cc -o n_write.o n_write.cc: In member function `void PNMPlotter::_n_write_pbm()': n_write.cc:211: invalid conversion from `unsigned char*' to `const char*' n_write.cc:211: initializing argument 1 of `std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::write(const _CharT*, int) [with _CharT = char, _Traits = std::char_traits<char>]' n_write.cc:256: invalid conversion from `unsigned char*' to `const char*' n_write.cc:256: initializing argument 1 of `std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::write(const _CharT*, int) [with _CharT = char, _Traits = std::char_traits<char>]' n_write.cc: In member function `void PNMPlotter::_n_write_pgm()': n_write.cc:369: invalid conversion from `unsigned char*' to `const char*' n_write.cc:369: initializing argument 1 of `std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::write(const _CharT*, int) [with _CharT = char, _Traits = std::char_traits<char>]' n_write.cc:395: invalid conversion from `unsigned char*' to `const char*' n_write.cc:395: initializing argument 1 of `std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::write(const _CharT*, int) _Traits>& std::basic_ostream<_CharT, _Traits>::write(const _CharT*, int) [with _CharT = char, _Traits = std::char_traits<char>]' n_write.cc: In member function `void PNMPlotter::_n_write_ppm()': n_write.cc:517: invalid conversion from `unsigned char*' to `const char*' n_write.cc:517: initializing argument 1 of `std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::write(const _CharT*, int) [with _CharT = char, _Traits = std::char_traits<char>]' n_write.cc:545: invalid conversion from `unsigned char*' to `const char*' n_write.cc:545: initializing argument 1 of `std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::write(const _CharT*, int) [with _CharT = char, _Traits = std::char_traits<char>]' ---------- The problem is with the quantities linebuf and rowbuf. Search for these and change from unsigned char to char. In fwrite, leave the cast (unsigned char) alone as this has something to do with data being written. Using above c++ command, compile n_write.cc make
Error.
-------- /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/ include -I/usr/X11R6/include -I/usr/X11R6/include -I./../include -DLIBPLOT -DLIB PLOTTER -I/usr/X11R6/include -Wno-deprecated -O2 -c z_write.cc c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/include -I/usr/X11R6/include -I/us r/X11R6/include -I./../include -DLIBPLOT -DLIBPLOTTER -I/usr/X11R6/include -Wno- deprecated -O2 -c z_write.cc -o z_write.o z_write.cc: In function `void _our_write_fn(png_struct*, png_byte*, unsigned int)': z_write.cc:487: invalid conversion from `png_byte*' to `const char*' z_write.cc:487: initializing argument 1 of `std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::write(const _CharT*, int) [with _CharT = char, _Traits = std::char_traits<char>]' make[2]: [z_write.lo] Error 1 (ignored) ----------- Copy ../libplot/z_write.c z_write.cc. Remember ( see pngconf.h ) that png_byte means unsigned char. Hence, define data as char * on line 487 and line 61. Run script containing c++ and z_write.o gets built. Now, build the library libplotter.a in libplotter/.libs using ar: ar cru .libs/libplotter.a apioldcc.o
mi_alloc.o mi_api.o mi_arc.o mi_canvas.o
mi_fllarc.o mi_fllrct.o mi_fplycon.o mi_gc.o mi_ply.o mi_plycon.o mi_plygen.o mi_plypnt.o mi_plyutil.o mi_spans.o mi_widelin.o mi_zerarc.o mi_zerolin.o mi_version.o g_affine.o g_alabel.o g_alab_her.o g_attrib.o g_arc.o g_bez.o g_box.o g_circ.o g_clipper.o g_closepl.o g_colors.o g_cntrlify.o g_dash.o g_dash2.o g_defplot.o g_defstate.o g_ellipse.o g_endpath.o g_error.o g_erase.o g_flushpl.o g_font.o g_fontdb.o g_fontd2.o g_havecap.o g_her_glyph.o g_integer.o g_line.o g_linewidth.o g_mark.o g_matrix.o g_miscmi.o g_move.o g_openpl.o g_outbuf.o g_outfile.o g_pagetype.o g_param.o g_param2.o g_path.o g_pentype.o g_point.o g_relative.o g_range.o g_retrieve.o g_savestate.o g_space.o g_subpaths.o g_vector.o g_version.o g_write.o g_xmalloc.o g_xstring.o m_attribs.o m_closepl.o m_defplot.o m_emit.o m_erase.o m_mark.o m_openpl.o m_path.o m_point.o m_text.o b_closepl.o b_defplot.o b_erase.o b_openpl.o b_path.o b_point.o t_attribs.o t_closepl.o t_color.o t_color2.o t_defplot.o t_erase.o t_openpl.o t_path.o t_point.o t_tek_md.o t_tek_mv.o t_tek_vec.o r_attribs.o r_closepl.o r_color.o r_defplot.o r_erase.o r_openpl.o r_path.o r_point.o h_attribs.o h_closepl.o h_color.o h_defplot.o h_erase.o h_font.o h_openpl.o h_path.o h_point.o h_text.o f_closepl.o f_color.o f_color2.o f_defplot.o f_erase.o f_openpl.o f_path.o f_point.o f_retrieve.o f_text.o c_attribs.o c_closepl.o c_color.o c_defplot.o c_emit.o c_erase.o c_mark.o c_openpl.o c_path.o c_point.o c_text.o p_closepl.o p_color.o p_color2.o p_defplot.o p_erase.o p_openpl.o p_path.o p_point.o p_text.o a_attribs.o a_color.o a_closepl.o a_defplot.o a_erase.o a_openpl.o a_path.o a_point.o a_text.o s_closepl.o s_color.o s_defplot.o s_erase.o s_openpl.o s_path.o s_point.o s_text.o i_closepl.o i_color.o i_defplot.o i_erase.o i_openpl.o i_path.o i_point.o i_rle.o n_defplot.o n_write.o z_defplot.o z_write.o x_attribs.o x_closepl.o x_color.o x_defplot.o x_erase.o x_flushpl.o x_openpl.o x_path.o x_point.o x_retrieve.o x_savestate.o x_text.o y_closepl.o y_defplot.o y_erase.o y_openpl.o ----------------End of Part One
----------------------
Part Two.
--------- Using earlier experience, modify the sources in libplot directory and try using make. Take the above three *.cc files and put them as
corresponding *.c files in
libplot directory. Take i_rle.h ( modified ) and put it into the libplot directory. From Top Directory,
make clean
make Error.
--------- /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/ include -I/usr/X11R6/include -I/usr/X11R6/include -I./../include -DLIBPLOT -I/u sr/X11R6/include -O2 -c g_write.c gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/include -I/usr/X11R6/include -I/us r/X11R6/include -I./../include -DLIBPLOT -I/usr/X11R6/include -O2 -c g_write.c - o g_write.o g_write.c:35: conflicting types for `_write_bytes' extern.h:1164: previous declaration of `_write_bytes' make[2]: *** [g_write.lo] Error 1 --------------- Try repairing libplot/extern.h. Change unsigned char * to char * in prototype of function _write_bytes. make
Error.
------- /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/ include -I/usr/X11R6/include -I/usr/X11R6/include -I./../include -DLIBPLOT -DLIB PLOTTER -I/usr/X11R6/include -Wno-deprecated -O2 -c t_tek_vec.cc c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/include -I/usr/X11R6/include -I/us r/X11R6/include -I./../include -DLIBPLOT -DLIBPLOTTER -I/usr/X11R6/include -Wno- deprecated -O2 -c t_tek_vec.cc -o t_tek_vec.o t_tek_vec.cc: In member function `void TekPlotter::_tek_vector(int, int)': t_tek_vec.cc:88: invalid conversion from `unsigned char*' to `const char*' t_tek_vec.cc: In member function `void TekPlotter::_tek_vector_compressed(int, int, int, int, bool)': t_tek_vec.cc:164: invalid conversion from `unsigned char*' to `const char*' make[2]: *** [t_tek_vec.lo] Error 1 -------------- Edit libplot/t_tek_vec.c Trouble seems to be with declaration unsigned char byte_buf[5] Change this to char byte_buf[5]. make
Error.
------ /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/ include -I/usr/X11R6/include -I/usr/X11R6/include -I./../include -DLIBPLOT -DLIB PLOTTER -I/usr/X11R6/include -Wno-deprecated -O2 -c c_defplot.cc c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/include -I/usr/X11R6/include -I/us r/X11R6/include -I./../include -DLIBPLOT -DLIBPLOTTER -I/usr/X11R6/include -Wno- deprecated -O2 -c c_defplot.cc -o c_defplot.o c_defplot.cc: In member function `virtual void CGMPlotter::terminate()': c_defplot.cc:1183: invalid conversion from `unsigned char*' to `const char*' c_defplot.cc:1555: invalid conversion from `unsigned char*' to `const char*' c_defplot.cc:1561: invalid conversion from `unsigned char*' to `const char*' c_defplot.cc:1582: invalid conversion from `unsigned char*' to `const char*' c_defplot.cc:1610: invalid conversion from `unsigned char*' to `const char*' make[2]: *** [c_defplot.lo] Error 1 ----------- Trouble seems to be the use of cast ( unsigned char *) on these lines in libplot/c_defplot.c. Change cast to ( char *) and make
Error.
------ /bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/ include -I/usr/X11R6/include -I/usr/X11R6/include -I./../include -DLIBPLOT -DLIB PLOTTER -I/usr/X11R6/include -Wno-deprecated -O2 -c i_closepl.cc c++ -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/X11R6/include -I/usr/X11R6/include -I/us r/X11R6/include -I./../include -DLIBPLOT -DLIBPLOTTER -I/usr/X11R6/include -Wno- deprecated -O2 -c i_closepl.cc -o i_closepl.o i_closepl.cc: In member function `void GIFPlotter::_i_write_short_int(unsigned int)': i_closepl.cc:434: invalid conversion from `unsigned char*' to `const char*' make[2]: *** [i_closepl.lo] Error 1 -------- Trouble is that in libplot/i_closepl.c, bytes[2] is declared unsigned char. Change declaration to char. make
Make finishes. Now,
make check
-----------
Making check in test make[1]: Entering directory `/usr/src/plotutils-2.4.1/test' make check-TESTS make[2]: Entering directory `/usr/src/plotutils-2.4.1/test' FAIL: spline.test ============================================>(FAIL) PASS: ode.test PASS: graph.test PASS: plot2plot.test PASS: plot2hpgl.test PASS: plot2pcl.test PASS: plot2fig.test PASS: plot2cgm.test PASS: plot2ps.test PASS: plot2svg.test PASS: tek2plot.test PASS: pic2plot.test ==================== 1 of 12 tests failed ==================== One test ( spline test ) fails. The other eleven
are passed. This happens even if libplotter.a is not built ( I have checked
this
separately ).
make install
The different programs and libraries are
installed
------------------------End Of
Message------------------
|
[Prev in Thread] | Current Thread | [Next in Thread] |