fpaquet / gtksheet

A spreadsheet widget for Gtk+
http://fpaquet.github.io/gtksheet/
Other
27 stars 9 forks source link

Cannot generate "configure" from fresh upstream sources #3

Closed lfaraone closed 14 years ago

lfaraone commented 14 years ago

Hi,

When I attempt to build gtksheet from the the latest tree, I get an error:

lfaraone@Opus:~/gtksheet$ ./autogen.sh 
Locating m4 macro language processor... found: /usr/bin/m4
Building files for libtool... done.
Building aclocal.m4... aclocal: aclocal: file `m4/gtk-doc.m4' does not exist
done.
Building configure... configure.ac:43: error: possibly undefined macro: AM_INIT_AUTOMAKE
      If this token and others are legitimate, please use m4_pattern_allow.
      See the Autoconf documentation.
configure.ac:50: error: possibly undefined macro: AM_SANITY_CHECK
configure.ac:54: error: possibly undefined macro: AM_PROG_CC_STDC
configure.ac:59: error: possibly undefined macro: AC_LIBTOOL_WIN32_DLL
configure.ac:60: error: possibly undefined macro: AM_PROG_LIBTOOL
configure.ac:62: error: possibly undefined macro: AM_MAINTAINER_MODE
configure.ac:74: error: possibly undefined macro: AM_CONDITIONAL
configure.ac:217: error: possibly undefined macro: AM_PATH_GLIB_2_0
done.
Building config header template... done.
Building Makefile templates... configure.ac: no proper invocation of AM_INIT_AUTOMAKE was found.
configure.ac: You should verify that configure.ac invokes AM_INIT_AUTOMAKE,
configure.ac: that aclocal.m4 is present in the top-level directory,
configure.ac: and that aclocal.m4 was recently regenerated (using aclocal).
configure.ac:55: installing `./install-sh'
automake: cannot open < gtk-doc.make: No such file or directory
done.
./configure
./configure: line 2045: syntax error near unexpected token `gtksheet,'
./configure: line 2045: `AM_INIT_AUTOMAKE(gtksheet, 0.2.0)'
  configure failed

The only way I was able to get a working build on Ubuntu 9.10 was to copy over the contents of the gtksheet/ subdirectory to the most recent release tarball, and building.

vhernandez commented 14 years ago

Ups, it forgot to copy gtk-doc.m4 to the source (the m4/gtk-doc.m4 included is a link to /usr/share/aclocal/gtk-doc.m4). It'll be fixed later today in git (now I can't push the changes). You'll be able to build the tree if you install the gtk-doc-tools package.

lfaraone commented 14 years ago

Okay, I can regenerate configure, but "make install" fails:

root@stone:/root/gtksheet-real# make install
Making install in gtksheet
make[1]: Entering directory `/root/gtksheet-real/gtksheet'
make[1]: Circular gtksheettypebuiltins.h <- gtksheettypebuiltins.h dependency dropped.
make[2]: Entering directory `/root/gtksheet-real/gtksheet'
make[2]: Circular gtksheettypebuiltins.h <- gtksheettypebuiltins.h dependency dropped.
test -z "/usr/local/lib" || /bin/mkdir -p "/usr/local/lib"
 /bin/bash ../libtool   --mode=install /usr/bin/install -c   libgtksheet-x11-2.0.la '/usr/local/lib'
libtool: install: /usr/bin/install -c .libs/libgtksheet-x11-2.0.so.0.1.2 /usr/local/lib/libgtksheet-x11-2.0.so.0.1.2
libtool: install: (cd /usr/local/lib && { ln -s -f libgtksheet-x11-2.0.so.0.1.2 libgtksheet-x11-2.0.so.0 || { rm -f libgtksheet-x11-2.0.so.0 && ln -s libgtksheet-x11-2.0.so.0.1.2 libgtksheet-x11-2.0.so.0; }; })
libtool: install: (cd /usr/local/lib && { ln -s -f libgtksheet-x11-2.0.so.0.1.2 libgtksheet-x11-2.0.so || { rm -f libgtksheet-x11-2.0.so && ln -s libgtksheet-x11-2.0.so.0.1.2 libgtksheet-x11-2.0.so; }; })
libtool: install: /usr/bin/install -c .libs/libgtksheet-x11-2.0.lai /usr/local/lib/libgtksheet-x11-2.0.la
libtool: install: /usr/bin/install -c .libs/libgtksheet-x11-2.0.a /usr/local/lib/libgtksheet-x11-2.0.a
libtool: install: chmod 644 /usr/local/lib/libgtksheet-x11-2.0.a
libtool: install: ranlib /usr/local/lib/libgtksheet-x11-2.0.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin:/sbin" ldconfig -n /usr/local/lib
----------------------------------------------------------------------
Libraries have been installed in:
   /usr/local/lib

If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the `-LLIBDIR'
flag during linking and do at least one of the following:
   - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
     during execution
   - add LIBDIR to the `LD_RUN_PATH' environment variable
     during linking
   - use the `-Wl,-rpath -Wl,LIBDIR' linker flag
   - have your system administrator add LIBDIR to `/etc/ld.so.conf'

See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
test -z "/usr/local/include/gtksheet-2.0/gtksheet" || /bin/mkdir -p "/usr/local/include/gtksheet-2.0/gtksheet"
 /usr/bin/install -c -m 644 gtkitementry.h gtksheet.h gtksheetfeatures.h gtksheet-marshal.h gtksheettypebuiltins.h gtksheetwidget.h gtksheet-marshal.h gtksheettypebuiltins.h '/usr/local/include/gtksheet-2.0/gtksheet'
/usr/bin/install: will not overwrite just-created `/usr/local/include/gtksheet-2.0/gtksheet/gtksheet-marshal.h' with `gtksheet-marshal.h'
/usr/bin/install: will not overwrite just-created `/usr/local/include/gtksheet-2.0/gtksheet/gtksheettypebuiltins.h' with `gtksheettypebuiltins.h'
make[2]: *** [install-gtksheetincludeHEADERS] Error 1
make[2]: Leaving directory `/root/gtksheet-real/gtksheet'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/root/gtksheet-real/gtksheet'
make: *** [install-recursive] Error 1
lfaraone commented 14 years ago

I was able to resolve the above error via the following change:

diff --git a/gtksheet/Makefile.am b/gtksheet/Makefile.am
index 1b3f9ee..a3d089c 100644
--- a/gtksheet/Makefile.am
+++ b/gtksheet/Makefile.am
@@ -94,7 +94,7 @@ INCLUDES = -I$(top_buildir) -I$(top_srcdir) $(GTK_CFLAGS)
 lib_LTLIBRARIES = $(gtksheettargetlib)

 gtksheetincludedir = $(includedir)/gtksheet-2.0/gtksheet
-gtksheetinclude_HEADERS = $(gtksheet_public_h_sources) $(gtksheet_built_public_sources)
+gtksheetinclude_HEADERS = $(gtksheet_public_h_sources)

 libgtksheet_x11_2_0_la_SOURCES = $(gtksheet_c_sources)
vhernandez commented 14 years ago

Thank you very much. I had to apply the patch manually but now it is in trunk.