Opened 7 years ago

Closed 7 years ago

#3916 closed defect (fixed)

Make install no longer works under mingw64

Reported by: robe Owned by: strk
Priority: blocker Milestone: PostGIS 2.2.7
Component: QA/buildbots Version: 2.4.x
Keywords: Cc:

Description

This might be my fault but hard to say since I upgraded winnie's jenkins and walked away. It's been failing for 2 weeks now.

With this error on 2.5.

---- Making install in liblwgeom
make[1]: Entering directory '/projects/postgis/branches/2.5/liblwgeom'
/bin/sh ../libtool --mode=install ../ liblwgeom.la "/usr/local/lib/liblwgeom.la"
libtool: install: ../ .libs/liblwgeom.lai /usr/local/lib/liblwgeom.la
../libtool: line 1733: ../: Is a directory
Makefile:166: recipe for target 'install-liblwgeom' failed
make[1]: *** [install-liblwgeom] Error 126
make[1]: Leaving directory '/projects/postgis/branches/2.5/liblwgeom'
GNUmakefile:16: recipe for target 'install' failed
make: *** [install] Error 1

Though the error looks very suspicious doesn't seem to have to do with jenkins upgrade.

Change History (25)

comment:1 by robe, 7 years ago

Milestone: PostGIS 2.5.0PostGIS 2.2.7

this is happening on all the tests on winnie, I suspect this change

r16031

---- Making install in liblwgeom
make[1]: Entering directory '/projects/postgis/branches/2.4/liblwgeom'
/bin/sh ../libtool --mode=install ../ liblwgeom.la "/usr/local/lib/liblwgeom.la"
libtool: install: ../ .libs/liblwgeom.lai /usr/local/lib/liblwgeom.la
../libtool: line 1733: ../: Is a directory
Makefile:166: recipe for target 'install-liblwgeom' failed
make[1]: *** [install-liblwgeom] Error 126
make[1]: Leaving directory '/projects/postgis/branches/2.4/liblwgeom'
GNUmakefile:16: recipe for target 'install' failed
make: *** [install] Error 1

comment:2 by robe, 7 years ago

Priority: mediumblocker

comment:3 by robe, 7 years ago

I confirmed it's not just jenkins upgrade, happening to me too on my local builds

make[2]: Leaving directory '/projects/postgis/branches/2.5/doc'
make[1]: Leaving directory '/projects/postgis/branches/2.5/doc'
for s in liblwgeom libpgcommon postgis regress raster topology loader utils doc extensions; do \
        echo "---- Making install in ${s}"; \
        make -C ${s} install || exit 1; \
done;
---- Making install in liblwgeom
make[1]: Entering directory '/projects/postgis/branches/2.5/liblwgeom'
/bin/sh ../libtool --mode=install ../ liblwgeom.la "/usr/local/lib/liblwgeom.la"
libtool: install: ../ .libs/liblwgeom.lai /usr/local/lib/liblwgeom.la
../libtool: line 1733: ../: Is a directory
Makefile:166: recipe for target 'install-liblwgeom' failed
make[1]: *** [install-liblwgeom] Error 126
make[1]: Leaving directory '/projects/postgis/branches/2.5/liblwgeom'
GNUmakefile:16: recipe for target 'install' failed
make: *** [install] Error 1


Last edited 7 years ago by robe (previous) (diff)

comment:4 by robe, 7 years ago

Owner: changed from robe to strk

comment:5 by robe, 7 years ago

Summary: winnie very unhappy failing on installMake install no longer works under mingw64

comment:6 by robe, 7 years ago

Okay I think the culprit is this change:

https://trac.osgeo.org/postgis/browser/branches/2.2/liblwgeom/Makefile.in?rev=16031#L23

Index: branches/2.2/liblwgeom/Makefile.in
===================================================================
--- a/branches/2.2/liblwgeom/Makefile.in
+++ b/branches/2.2/liblwgeom/Makefile.in
@@ -21,5 +21,5 @@
 includedir = @includedir@
 SHELL = @SHELL@
-INSTALL = $(SHELL) ../install-sh
+INSTALL = @INSTALL@
 LIBTOOL = @LIBTOOL@
 

My generated Makefile now has

INSTALL = ../
Last edited 7 years ago by robe (previous) (diff)

comment:7 by strk, 7 years ago

Interesting, now we have to figure out who's in charge to set @INSTALL@ … I guess it could be AC_PROG_LIBTOOL, but I'm not sure. What version of autoconf do you have, btw ? Does upgrading that changes anything ?

comment:8 by strk, 7 years ago

Oh and is this only in 2.2 or does any other branch work ?

comment:9 by strk, 7 years ago

Does adding AC_PROG_INSTALL to the configure.ac script help ?

comment:10 by strk, 7 years ago

and also, make sure to use a clean build (no caches!)

comment:11 by robe, 7 years ago

In 16067:

Make install no longer works under mingw64
Add a AC_PROG_INSTALL step to configure.ac to fix.
References #3916
References #3912

comment:12 by robe, 7 years ago

In 16068:

add comment
References #3916
References #3912

comment:13 by robe, 7 years ago

better but still not working completely. I thought it was fixed but then realized it doesn't work if I don't have a

/usr/local/lib folder. I get this error:

/bin/sh ../libtool --mode=install /bin/install -c liblwgeom.la "/usr/local/lib/liblwgeom.la"
libtool: install: /bin/install -c .libs/liblwgeom.lai /usr/local/lib/liblwgeom.la
/bin/install: cannot create regular file '/usr/local/lib/liblwgeom.la': No such file or directory
Makefile:166: recipe for target 'install-liblwgeom' failed
make[1]: *** [install-liblwgeom] Error 1
make[1]: Leaving directory '/projects/postgis/branches/2.5/liblwgeom'
GNUmakefile:16: recipe for target 'install' failed
make: *** [install] Error 1

My generated makefile now has

INSTALL = /bin/install -c

Can we disable installing in system it's so annoying.

comment:14 by robe, 7 years ago

Just noticed that debbie's also resolves to

INSTALL = /usr/bin/install -c

Anyway to force it to resolve to install-sh instead. Changing back to install-sh correctly creates the annoying /usr/local/ folder which I constantly delete cause its f-ing annoying that I have stuff in that folder I don't want. So even better would be to not install in system at all :).

comment:15 by robe, 7 years ago

In 16072:

Revert change of AC_PROG_INSTALL step to configure.ac.
Succeeeded in only replacing install-sh with install, which can't create directories under mingw
References #3916
References #3912

comment:16 by robe, 7 years ago

In 16073:

Hard-code build-aux/install-sh in all install scripts
instead of relying on @INSTALL@ to pick an install executable
on systems where @INSTALL@ resolves, ends up picking the system preferred install
which at least on mingw64 won't directories if they don't exist
in addition on mingw64, it doesn't
even fill in @INSTALL@ with install unless AC_PROG_INSALL is included
References #3916 for PostGIS 2.5 (trunk)
References #3912 for PostGIS 2.5 (trunk)

comment:17 by strk, 7 years ago

install -c wasn't bad, rather we probably just need to make sure the target directories exist. I think automake generates an "installdirs" Makefile target which is made a dependency of install rules, we could replicate that

comment:18 by robe, 7 years ago

can we just not install liblwgeom in system at all or at least make it obey —prefix? I'd rather have the option not to install it

comment:19 by strk, 7 years ago

Our configure should already obey —prefix, or even the more restrictive —includedir, please file a separate ticket if it doesn't

Not installing it would require statically linking shp2pgsql and pgsql2shp, which should probably be a builder's choice to make. We know Debian packagers are much happier with that library being linked dynamically, to be able to provide quick fixes to security issues.

comment:20 by strk, 7 years ago

In 16080:

Make sure target directories are created before copying files to them

References #3912
References #3916

comment:21 by robe, 7 years ago

In 16081:

cleanup dead paths on winnie's build
add —prefix step to prevent liblwgeom from being installed in /usr/local
References #3916

comment:22 by robe, 7 years ago

In 16083:

change back to using @INSTALL@ and put in AC_PROG_INSTALL
so install doesn't go to ../ for insall on mingw
References #3916
References #3912

comment:23 by strk, 7 years ago

In 16086:

Make sure target directories are created before copying files to them

References #3912 for 2.4 branch
References #3916 for 2.4 branch

comment:24 by strk, 7 years ago

In 16087:

Make sure target directories are created before copying files to them

References #3912 for 2.3 branch
References #3916 for 2.3 branch

comment:25 by strk, 7 years ago

Resolution: fixed
Status: newclosed

In 16088:

Make sure target directories are created before copying files to them

Closes #3912 in 2.2 branch
Closes #3916 in 2.2 branch

Note: See TracTickets for help on using tickets.