Opened 14 years ago

Closed 14 years ago

#28555 closed defect (fixed)

gdal-grass build fails to find libraries when grass is Grass 6.4

Reported by: macports-trac@… Owned by: Veence (Vincent)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: gdal-grass

Description

The code in the Portfile to detect the macports installation of Grass 6.4 as /Applications/GRASS-6.4.app fails, and the flag sent to the configure command is actually --with-grass=/opt/local:

In order to get around the bug where gdal-grass has a false dependence on the nonexistent port grass64, I modified the following lines in the Portfile

# Select Grass version

variant grass64 description "Builds against grass64" {
	depends_lib-delete		port:grass
	depends_lib-append		port:grass64
	
	configure.args-delete	--with-grass=${prefix}/lib
	
	if {[file exists ${applications_dir}/GRASS-6.4.app]} {
		configure.args-append	\
			--with-grass=${applications_dir}/GRASS-6.4.app/Contents/MacOS/
	} else {
		configure.args-append --with-grass=${prefix}
	}
}

to read

# Select Grass version

variant grass64 description "Builds against grass64" {
	
    configure.args-delete	--with-grass=${prefix}
	
		configure.args-append	\
			--with-grass=${applications_dir}/GRASS-6.4.app/Contents/MacOS/lib
}

Even with this modification, configure fails to find Grass to its satisfaction.

Attachments (2)

main.log (107.8 KB) - added by macports-trac@… 14 years ago.
Log of destroot failure after change r76526.
Makefile (2.0 KB) - added by macports-trac@… 14 years ago.
The state of the Makefile at the point of failure

Download all attachments as: .zip

Change History (10)

comment:1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to vince@…

comment:2 Changed 14 years ago by Veence (Vincent)

Should be fixed by r76526. Please update, try again and tell me.

Changed 14 years ago by macports-trac@…

Attachment: main.log added

Log of destroot failure after change r76526.

comment:3 Changed 14 years ago by macports-trac@…

Installation now fails in a different way (see attached log file, which was produced after a port clean --all gdal-grass).

Looking at /opt/local/lib after the failed install, there's a gdalplugins directory with the built binaries in it; the failed build doesn't leave a work/destroot directory behind.

It seems that the make install during staging into destroot is targeting the ultimate location for the binaries rather than the staging hierarchy under work/destroot. The modifications to the Makefile seem to leave it in a state with no reference to the DESTROOT flag, whose value needs to be prefixed to the directories given in the install: goal (if I understand things correctly).

Thanks for looking into this! We're almost there.

comment:4 Changed 14 years ago by Veence (Vincent)

I can't reproduce this. On my side, it works perfectly well

make: Entering directory `/usr/pkg/var/macports/build/_Volumes_Dev_Macports_macports-trunk_dports_gis_gdal-grass/work/gdal-grass-1.4.3'
install -d /usr/pkg/var/macports/build/_Volumes_Dev_Macports_macports-trunk_dports_gis_gdal-grass/work/destroot/usr/pkg/lib/gdalplugins
cp gdal_GRASS.so /usr/pkg/var/macports/build/_Volumes_Dev_Macports_macports-trunk_dports_gis_gdal-grass/work/destroot/usr/pkg/lib/gdalplugins
cp ogr_GRASS.so /usr/pkg/var/macports/build/_Volumes_Dev_Macports_macports-trunk_dports_gis_gdal-grass/work/destroot/usr/pkg/lib/gdalplugins
test -d /usr/pkg/var/macports/build/_Volumes_Dev_Macports_macports-trunk_dports_gis_gdal-grass/work/destroot/usr/pkg/share/gdal/grass || mkdir -p /usr/pkg/var/macports/build/_Volumes_Dev_Macports_macports-trunk_dports_gis_gdal-grass/work/destroot/usr/pkg/share/gdal/grass
test -d /usr/pkg/var/macports/build/_Volumes_Dev_Macports_macports-trunk_dports_gis_gdal-grass/work/destroot/usr/pkg/share/gdal/grass/etc || mkdir -p /usr/pkg/var/macports/build/_Volumes_Dev_Macports_macports-trunk_dports_gis_gdal-grass/work/destroot/usr/pkg/share/gdal/grass/etc
cp /usr/pkg/share/grass-6.4.0/etc/ellipse.table /usr/pkg/var/macports/build/_Volumes_Dev_Macports_macports-trunk_dports_gis_gdal-grass/work/destroot/usr/pkg/share/gdal/grass/etc
cp /usr/pkg/share/grass-6.4.0/etc/datum.table /usr/pkg/share/grass-6.4.0/etc/datumtransform.table /usr/pkg/var/macports/build/_Volumes_Dev_Macports_macports-trunk_dports_gis_gdal-grass/work/destroot/usr/pkg/share/gdal/grass/etc
test -d /usr/pkg/var/macports/build/_Volumes_Dev_Macports_macports-trunk_dports_gis_gdal-grass/work/destroot/usr/pkg/share/gdal/grass/driver || mkdir -p /usr/pkg/var/macports/build/_Volumes_Dev_Macports_macports-trunk_dports_gis_gdal-grass/work/destroot/usr/pkg/share/gdal/grass/driver
test -d /usr/pkg/var/macports/build/_Volumes_Dev_Macports_macports-trunk_dports_gis_gdal-grass/work/destroot/usr/pkg/share/gdal/grass/driver/db || mkdir -p /usr/pkg/var/macports/build/_Volumes_Dev_Macports_macports-trunk_dports_gis_gdal-grass/work/destroot/usr/pkg/share/gdal/grass/driver/db
cp -r /usr/pkg/share/grass-6.4.0/driver/db/* /usr/pkg/var/macports/build/_Volumes_Dev_Macports_macports-trunk_dports_gis_gdal-grass/work/destroot/usr/pkg/share/gdal/grass/driver/db/
make: Leaving directory `/usr/pkg/var/macports/build/_Volumes_Dev_Macports_macports-trunk_dports_gis_gdal-grass/work/gdal-grass-1.4.3'

(I use /usr/pkg rather than /opt/local because of a NetBSD package legacy) Maybe clean and try again?

Changed 14 years ago by macports-trac@…

Attachment: Makefile added

The state of the Makefile at the point of failure

comment:5 in reply to:  4 Changed 14 years ago by macports-trac@…

I have reproduced this on a freshly erased Macports tree on a machine on which I don't do development. I reinstalled Macports 1.9.2 and issued the command "sudo port install gdal-grass". I had to do "port install db46 +no_java" beforehand owing to an obviously unrelated bug in the Java dependency in that port.

I have attached the Makefile that is created for gdal-grass.

Build environment: Mac Mini 1.66 GHz Intel Core Duo running Mac OS X 10.6.6.

comment:6 Changed 14 years ago by Veence (Vincent)

Ah, there was a fix for that, but only for universal builds! :| Try with r76566.

comment:7 Changed 14 years ago by macports-trac@…

Confirmed: r76566 fixes the issue.

comment:8 Changed 14 years ago by Veence (Vincent)

Resolution: fixed
Status: newclosed

Thanks!

Note: See TracTickets for help on using tickets.