Opened 15 years ago

Closed 15 years ago

Last modified 12 years ago

#142 closed defect (fixed)

1.4 snapshot build is broken

Reported by: robe Owned by: kneufeld
Priority: critical Milestone: PostGIS 1.4.0
Component: postgis Version: 1.4.X
Keywords: Cc:

Description (last modified by robe)

What steps will reproduce the problem?

  1. Download postgis-1.4.0SVN.tar.gz from postgis website
  2. ./configure

What is the expected output? config.status: executing libtool commands sed: can't read ./ltmain.sh: No such file or directory sed: can't read ./ltmain.sh: No such file or directory mv: cannot stat `libtoolT': No such file or directory cp: cannot stat `libtoolT': No such file or directory chmod: cannot access `libtool': No such file or directory

What do you see instead? It should hmm work without error. Mike first pointed this out in postgis newsgroup

http://postgis.refractions.net/pipermail/postgis-users/2009-March/023054.html

Please use labels and text to provide additional information.

Change History (23)

comment:1 by pramsey, 15 years ago

Could be a symptom of the versions of autotools on the server generating the snapshots. When I pull down clean source and run autogen.sh and ./configure I don't even *get* the line 'config.status: executing libtool commands'. I don't have an ltmain.sh file either, which is fine, because in the version of configure generated by my autotools (aclocal = 1.10, autoconf = 2.61) ltmain.sh is never called.

comment:2 by mloskot, 15 years ago

This is not related to versions but to incomplete or broken process of generating build scripts.

In the snapshot, libtool script is provided (and without executable mode set) which actually is not needed, but ltmain.sh is necessary. So, this is ltmain.sh missing in the snapshot.

The snapshot (as release package) should include following helper scripts: config.guess config.sub configure depcomp install-sh ltmain.sh missing

When building PostGIS SVN code, autogen.sh does not call libtoolize which is required to get ltmain.sh script which in turn is used to generate libtool. So, users are forced to call libtoolize manually and it's better to call libtoolize —force —copy, then all files are copied but no symlinks are used.

comment:3 by pramsey, 15 years ago

That doesn't really explain why my sandbox never ever *calls* ltmain.sh, but the snapshot build does.

comment:4 by mloskot, 15 years ago

If I run ./configure without ltmain.sh file (see attached log and rm ltmain.sh), it fails. This is expected behavior because ltmain.sh generates libtool which is crucial.

Perhaps this particular issue is related to versions, see 8.3.9.1

http://www.gnu.org/software/automake/manual/html_node/Libtool-Issues.html

In any case, libtoolize has to be called at some point, imp- or explicitly.

comment:5 by kneufeld, 15 years ago

The versions of aclocal and autoconf on the server generating the package is 1.10 and 2.60 respectively. I upgraded autoconf to 2.63 but it produced a slew of errors autogenerating postgis … so reverted back to 2.60.

The build is still broken when run from the build server.

Curiously, a different server within our intranet seems to build postgis fine running aclocal 1.9.2 and autoconf 2.59

Are others able to properly build postgis at the moment? Or is this just an server configuration issue on the packaging server?

— Kevin

comment:6 by mloskot, 15 years ago

Kevin, at this moment SVN server seems to be not responding, so can't check now. However, I have had not experience any problems with building SVN trunk. So yes, postgis builds for me properly on Linux using automake 1.10.2 and autoconf 2.63 and libtool 2.2.6.

comment:7 by mloskot, 15 years ago

Trying to connect to SVN, I'm getting this error:

mloskot@dog:~/dev/postgis/_svn$ svn co http://svn.refractions.net/postgis/trunk trunk svn: OPTIONS of 'http://svn.refractions.net/postgis/trunk': Could not read status line: Connection reset by peer (http://svn.refractions.net)

comment:8 by mloskot, 15 years ago

I have managed to build PostGIS trunk. After I updated today, I experienced problems with running ./configure. It was throwing error about missing config.sub script. Strange, because the script is actually in the repository.

I use Ubuntu 8.10 with libtool 2.2.4, autoconf 2.61 and automake 1.10.1.

Anyway, I've investigated this and there are number of issues:

  1. Behavior of libtoolize has changed. I was wrong saying the problem is not related

to versions. Paul, please accept my apology.

  1. Here is what libtool NEWS [*] says:

<code> New in 1.9b: 2004-08-29; CVS version 1.5a, Libtool team:

Like automake, libtoolize no longer installs config.guess and config.sub by

default. Use new —install option to get the old behaviour.

</code>

[*] (http://cvs.savannah.gnu.org/viewvc/libtool/NEWS?root=libtool&amp;view=markup)

  1. For libtool 1.9b+, option —install is required. So, it seems autogen.sh needs to

detect automake and libtool versions to set options properly.

  1. I have attached my custom version of autogen.sh based on the one I prepared for

GEOS. I have used this autogen.sh to configure PostGIS successfully. See TODO comment, it says what is to be done to handle variety of libtool versions.

  1. It's not a good idea to keep intermediate files in repository. I'd suggest to

remove files like config.sub, config.guess and install-sh. All these files will be properly installed by libtoolize tool.

A digression:

Frank is protecting GDAL against autotools-hell by being the only master of configuration and keeping all autotool stuff in a repo. I don't like it. Many (if not most) FOSS projects (see GNOME Foundation, Mozilla Foundation) have learned that it's a bad idea. When I was helping Frank in the project, I never built GDAL without —without-libtool option, unless I had to fix libtool-related configuration in GDAL. There is number of projects that went further and they don't use automake (PostGIS included) as well as they don't use libtool (i.e. GRASS, Mozilla). There reasons reasons [] and these projects can live without it.

[] http://grass.itc.it/pipermail/grass5/2002-April/005065.html https://developer.mozilla.org/en/Mozilla_Build_FAQ

*Perhaps*, it isn't a bad idea to re-think use of libtool in PostGIS too and eventually get rid of libtool.

comment:9 by pramsey, 15 years ago

Close,

I tried this out, removing the autotools artefacts (config.*, install-sh) and running your autogen.sh. First I found that version testing really *is* needed, not just a TODO, as my glibtoolize hated the extra parameter, so I manually changed that for testing purposes. Second, I found that after running autogen.sh I was still missing install.sh

configure: error: cannot find install-sh or install.sh in '.' './..' './../..'

I'm not sure what auto* invocation installs install-sh, but not one in autogen apparently.

comment:10 by mloskot, 15 years ago

Just for the records and easy track of the discussion, Paul and me, we tested some solutions that look promising and Paul improved the autogen.sh script:

http://logs.qgis.org/postgis/%23postgis.2009-03-23.log

comment:11 by robe, 15 years ago

I'm not sure if this has anything to these changes, but I can no longer compile under mingw. The .configure works okay and now gives me pretty details about what is being used just like the old 1.3 does, but make throws all these errors. It could very well be because before I was testing under 8.3 and I recently switched to testing 8.2 (so perhaps I have a mixed up install somewhere). Anyrate this is the noise I am getting under mingw.

I even reloaded my svn trunk from scratch from osgeo.org new location to rule that out as an issue.

$ ./configure —includedir=/usr/local/include —with-pgconfig=/usr/local/pgsql/bin/pg_config —libdir=/usr/local/lib —with-projdir=/usr/local Using user-specified proj directory: /usr/local checking proj_api.h usability… yes checking proj_api.h presence… yes checking for proj_api.h… yes checking for pj_get_release in -lproj… yes configure: creating ./config.status config.status: creating liblwgeom/Makefile config.status: creating liblwgeom/cunit/Makefile config.status: creating postgis/Makefile config.status: creating postgis/sqldefines.h config.status: creating loader/Makefile config.status: creating topology/Makefile config.status: creating regress/Makefile config.status: creating doc/Makefile config.status: creating postgis_config.h

PostGIS is now configured for i686-pc-mingw32

——————— Compiler Info ——————-

C compiler: gcc -g -O2 C++ compiler: g++ -g -O2

——————— Dependencies ———————

GEOS config: /usr/local/bin/geos-config GEOS version: 3.1 PostgreSQL config: /usr/local/pgsql/bin/pg_config PostgreSQL version: 8.2 PROJ4 version: 46 PostGIS debug level: 0

$ make make -C liblwgeom make[1]: Entering directory `/D/SVNProjects/Postgis/trunknew/liblwgeom' gcc -g -O2 -DDLL_EXPORT -DPIC -c -o measures.o measures.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o box2d.o box2d.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o ptarray.o ptarray.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwgeom_api.o lwgeom_api.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwgeom.o lwgeom.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwpoint.o lwpoint.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwline.o lwline.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwpoly.o lwpoly.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwmpoint.o lwmpoint.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwmline.o lwmline.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwmpoly.o lwmpoly.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwcollection.o lwcollection.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwcircstring.o lwcircstring.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwcompound.o lwcompound.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwcurvepoly.o lwcurvepoly.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwmcurve.o lwmcurve.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwmsurface.o lwmsurface.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwutil.o lwutil.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwalgorithm.o lwalgorithm.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwgunparse.o lwgunparse.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwgparse.o lwgparse.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lwsegmentize.o lwsegmentize.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o wktparse.tab.o wktparse.tab.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o lex.yy.o lex.yy.c gcc -g -O2 -DDLL_EXPORT -DPIC -c -o vsprintf.o vsprintf.c ar rs liblwgeom.a measures.o box2d.o ptarray.o lwgeom_api.o lwgeom.o lwpoint.o lwline.o lwpoly.o lwmpoint.o lwmline.o lwmpoly.o lwcollection.o lwcircstring.o lwcompound.o lwcurvepoly.o lwmcurve.o lwmsurface.o lwutil.o lwalgorithm.o lwgunparse.o lwgparse.o lwsegmentize.o wktparse.tab.o lex.yy.o vsprintf.o C:\MinGW\bin\ar.exe: creating liblwgeom.a make[1]: Leaving directory `/D/SVNProjects/Postgis/trunknew/liblwgeom' make -C postgis make[1]: pg_config: Command not found make[1]: Entering directory `/D/SVNProjects/Postgis/trunknew/postgis' make[1]: pg_config: Command not found make[1]: pg_config: Command not found make[1]: pg_config: Command not found make[1]: pg_config: Command not found make[1]: pg_config: Command not found gcc -E -traditional-cpp postgis.sql.in.c | grep -v '#' > postgis.sql.in sed 's,MODULE_PATHNAME,$libdir/postgis-1.4,g' postgis.sql.in >postgis.sql gcc -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-

statement

-Wendif-labels -fno-strict-aliasing -fwrapv -I/usr/local/include -I/u

sr/local/include

-I../liblwgeom -I. -I/server -I/internal -I./src/include/port/w

in32 -DEXEC_BACKEND

'-IC:/msys/1.0/local/pgsql/lib/pgxs/src/MAKEFI~1/../../src/

include/port/win32'

-I/server/port/win32 -c -o lwgeom_pg.o lwgeom_pg.c lwgeom_pg.c:1:22: postgres.h: No such file or directory lwgeom_pg.c:2:18: fmgr.h: No such file or directory lwgeom_pg.c:3:26: executor/spi.h: No such file or directory In file included from lwgeom_pg.c:7: lwgeom_pg.h:5:29: utils/geo_decls.h: No such file or directory In file included from lwgeom_pg.c:7: lwgeom_pg.h:83: error: syntax error before 'getGeometryOID' lwgeom_pg.h:83: warning: type defaults to int' in declaration of getGeometryOI

D'

lwgeom_pg.h:83: warning: data definition has no type or storage class lwgeom_pg.h:87: error: syntax error before '*' token lwgeom_pg.h:88: error: syntax error before 'BOX' lwgeom_pg.h:91: error: syntax error before 'BOX2D_same' lwgeom_pg.h:91: warning: type defaults to int' in declaration of BOX2D_same' lwgeom_pg.h:91: warning: parameter names (without types) in function declaration lwgeom_pg.h:91: warning: data definition has no type or storage class lwgeom_pg.h:92: error: syntax error before 'BOX2D_overlap' lwgeom_pg.h:92: warning: type defaults to int' in declaration of BOX2D_overlap

'

lwgeom_pg.h:92: warning: parameter names (without types) in function declaration lwgeom_pg.h:92: warning: data definition has no type or storage class lwgeom_pg.h:93: error: syntax error before 'BOX2D_overleft' lwgeom_pg.h:93: warning: type defaults to int' in declaration of BOX2D_overlef

t'

lwgeom_pg.h:93: warning: parameter names (without types) in function declaration lwgeom_pg.h:93: warning: data definition has no type or storage class lwgeom_pg.h:94: error: syntax error before 'BOX2D_left' lwgeom_pg.h:94: warning: type defaults to int' in declaration of BOX2D_left' lwgeom_pg.h:94: warning: parameter names (without types) in function declaration lwgeom_pg.h:94: warning: data definition has no type or storage class lwgeom_pg.h:95: error: syntax error before 'BOX2D_right' lwgeom_pg.h:95: warning: type defaults to int' in declaration of BOX2D_right' lwgeom_pg.h:95: warning: parameter names (without types) in function declaration lwgeom_pg.h:95: warning: data definition has no type or storage class lwgeom_pg.h:96: error: syntax error before 'BOX2D_overright' lwgeom_pg.h:96: warning: type defaults to int' in declaration of BOX2D_overrig

ht'

lwgeom_pg.h:96: warning: parameter names (without types) in function declaration lwgeom_pg.h:96: warning: data definition has no type or storage class lwgeom_pg.h:97: error: syntax error before 'BOX2D_overbelow' lwgeom_pg.h:97: warning: type defaults to int' in declaration of BOX2D_overbel

ow'

lwgeom_pg.h:97: warning: parameter names (without types) in function declaration lwgeom_pg.h:97: warning: data definition has no type or storage class lwgeom_pg.h:98: error: syntax error before 'BOX2D_below' lwgeom_pg.h:98: warning: type defaults to int' in declaration of BOX2D_below' lwgeom_pg.h:98: warning: parameter names (without types) in function declaration lwgeom_pg.h:98: warning: data definition has no type or storage class lwgeom_pg.h:99: error: syntax error before 'BOX2D_above' lwgeom_pg.h:99: warning: type defaults to int' in declaration of BOX2D_above' lwgeom_pg.h:99: warning: parameter names (without types) in function declaration lwgeom_pg.h:99: warning: data definition has no type or storage class lwgeom_pg.h:100: error: syntax error before 'BOX2D_overabove' lwgeom_pg.h:100: warning: data definition has no type or storage class lwgeom_pg.h:101: error: syntax error before 'BOX2D_contained' lwgeom_pg.h:101: warning: type defaults to int' in declaration of BOX2D_contai

ned'

lwgeom_pg.h:101: warning: parameter names (without types) in function declaratio

n

lwgeom_pg.h:101: warning: data definition has no type or storage class lwgeom_pg.h:102: error: syntax error before 'BOX2D_contain' lwgeom_pg.h:102: warning: type defaults to int' in declaration of BOX2D_contai

n'

lwgeom_pg.h:102: warning: parameter names (without types) in function declaratio

n

lwgeom_pg.h:102: warning: data definition has no type or storage class lwgeom_pg.h:103: error: syntax error before 'BOX2D_intersects' lwgeom_pg.h:103: warning: type defaults to int' in declaration of BOX2D_inters

ects'

lwgeom_pg.h:103: warning: parameter names (without types) in function declaratio

n

lwgeom_pg.h:103: warning: data definition has no type or storage class lwgeom_pg.h:104: error: syntax error before 'BOX2D_union' lwgeom_pg.h:104: warning: type defaults to int' in declaration of BOX2D_union' lwgeom_pg.h:104: warning: parameter names (without types) in function declaratio

n

lwgeom_pg.h:104: warning: data definition has no type or storage class lwgeom_pg.h:106: error: syntax error before 'LWGEOM_same' lwgeom_pg.h:106: warning: type defaults to int' in declaration of LWGEOM_same' lwgeom_pg.h:106: warning: parameter names (without types) in function declaratio

n

lwgeom_pg.h:106: warning: data definition has no type or storage class lwgeom_pg.h:107: error: syntax error before 'BOX3D_construct' lwgeom_pg.h:107: warning: type defaults to int' in declaration of BOX3D_constr

uct'

lwgeom_pg.h:107: warning: parameter names (without types) in function declaratio

n

lwgeom_pg.h:107: warning: data definition has no type or storage class lwgeom_pg.h:108: error: syntax error before 'BOX2DFLOAT4_ymin' lwgeom_pg.h:108: warning: type defaults to int' in declaration of BOX2DFLOAT4_

ymin'

lwgeom_pg.h:108: warning: parameter names (without types) in function declaratio

n

lwgeom_pg.h:108: warning: data definition has no type or storage class lwgeom_pg.h:110: error: syntax error before 'LWGEOM_force_2d' lwgeom_pg.h:110: warning: type defaults to int' in declaration of LWGEOM_force

_2d'

lwgeom_pg.h:110: warning: parameter names (without types) in function declaratio

n

lwgeom_pg.h:110: warning: data definition has no type or storage class lwgeom_pg.h:111: error: syntax error before 'LWGEOM_force_3dm' lwgeom_pg.h:111: warning: type defaults to int' in declaration of LWGEOM_force

_3dm'

lwgeom_pg.h:111: warning: parameter names (without types) in function declaratio

n

lwgeom_pg.h:111: warning: data definition has no type or storage class lwgeom_pg.h:112: error: syntax error before 'LWGEOM_force_3dz' lwgeom_pg.h:112: warning: type defaults to int' in declaration of LWGEOM_force

_3dz'

lwgeom_pg.h:112: warning: parameter names (without types) in function declaratio

n

lwgeom_pg.h:112: warning: data definition has no type or storage class

When I run my /usr/local/pgsql/bin/pg_config

it outputs $ /usr/local/pgsql/bin/pg_config BINDIR = C:/msys/1.0/local/pgsql/bin DOCDIR = C:/msys/1.0/local/pgsql/doc INCLUDEDIR = C:/msys/1.0/local/pgsql/include PKGINCLUDEDIR = C:/msys/1.0/local/pgsql/include INCLUDEDIR-SERVER = C:/msys/1.0/local/pgsql/include/server LIBDIR = C:/msys/1.0/local/pgsql/lib PKGLIBDIR = C:/msys/1.0/local/pgsql/lib LOCALEDIR = MANDIR = C:/msys/1.0/local/pgsql/man SHAREDIR = C:/msys/1.0/local/pgsql/share SYSCONFDIR = C:/msys/1.0/local/pgsql/etc PGXS = C:/msys/1.0/local/pgsql/lib/pgxs/src/MAKEFI~1/pgxs.mk CONFIGURE = '—without-zlib' CC = gcc CPPFLAGS = -I./src/include/port/win32 -DEXEC_BACKEND -I../../../src/include/port/win32 CFLAGS = -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Winline -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv CFLAGS_SL = LDFLAGS = -Wl,—allow-multiple-definition LDFLAGS_SL = LIBS = -lpgport -lm -lws2_32 -lshfolder VERSION = PostgreSQL 8.2.13

if someone else using MingW could check this out, that would be appreciated.

As a side note, works okay on the OpenSUSE box I tested. That one is running 8.3 though.

comment:12 by mcayland, 15 years ago

Assuming /usr/local/pgsql/bin isn't in PATH, I think this is a symptom of GBT#115 which only got fixed in PostgreSQL 8.3 :( The mail thread mentioned that there was no urgency to get this back-patched to older releases, but perhaps we have more of a case for it now.

The work around should be to add pg_config to PATH manually by launching 'make install' like:

PATH=/usr/local/pgsql/bin:$PATH make install

HTH,

Mark.

comment:13 by mloskot, 15 years ago

I'd like to report that I can build PostGIS trunk r3935 on Linux (Ubuntu 8.10, 32-bit) using GEOS from SVN trunk as well.

comment:14 by robe, 15 years ago

Now for the real test would be if we can build from the tar ball. We've always been able to build from svn. I guess the builder that uploads to the site is not back in place yet since I don't see my recent changes reflected on the site (at least not doco).

comment:15 by kneufeld, 15 years ago

Correct. The box that Hudson resides on which autobuilds PostGIS has been unable to build a clean checkout since this all began (rev.3924) using the typical: ./autogen.sh ./configure make

It errors out with: Running aclocal -I macros Running autoconf ====================================== Now you are ready to run './configure' ====================================== ./configure: line 1951: syntax error near unexpected token `build_libtool_libs,' ./configure: line 1951: ` _LT_DECL(build_libtool_libs, enable_shared, 0,'

We've tried numerous versions of libtool and autogen, but nothing seems to fix this.

— Kevin

comment:16 by mcayland, 15 years ago

Hi Kevin,

Have you tried adding the —force / -f options to libtoolize and/or autoconf in autogen.sh?

ATB,

Mark.

comment:17 by kneufeld, 15 years ago

Yes. Unfortunately I get the same error.

Since I can build PostGIS successfully on other linux boxes, I'm pretty sure the configuration of this old server is out to lunch. Pretty soon here I'm going to have to rewrite all the autobuild scripts and move them to another server. Unfortunately, the only ones available to me are internal to Refractions, which means the public will no longer have access to Hudson to view the build logs - not the end of the world, since code breakers will still get emailed.

comment:18 by robe, 15 years ago

Description: modified (diff)
Owner: changed from robe to pramsey
Status: assignednew

comment:19 by pramsey, 15 years ago

Owner: changed from pramsey to kneufeld

comment:20 by kneufeld, 15 years ago

Resolution: acceptedfixed
Status: newclosed

OK, this should work again.

http://postgis.refractions.net/download/postgis-1.4.0SVN.tar.gz

I recreated the autobuild environment on a new box, so the html docs, pdf doc, and tarball are generated automatically (right now through SVN polling, but hopefully this will get moved to SVN trigger hooks as it was before the SVN move). I also added automatic regression tests against 8.2 and 8.3 and will tackle 8.4 soon.

I tested the build on several boxes … seems to work, but please test and let me know if there are any changes the autobuild scripts I need to do.

Cheers, Kevin

comment:21 by pramsey, 12 years ago

Version: 1.41.4.X
Note: See TracTickets for help on using tickets.