[postgis-users] Errors in jdbc rpm build on Fedora Core 6

Dido dido+postgis at sarge.mine.nu
Fri Feb 2 06:04:01 PST 2007


Hi @,
I'm trying to make postgis 1.2.1 Fedora Core 6 rpm package, but I have  
some errors.
Also I would like to make postgis rpm against postgresql 8.2.1 , did  
someone have feedback ?

Here is list of postgres and java packages:
[root at fc-test ~]# rpm -qa | grep postgres
postgresql-server-8.1.6-1.fc6
postgresql-docs-8.1.6-1.fc6
postgresql-8.1.6-1.fc6
postgresql-devel-8.1.6-1.fc6
postgresql-libs-8.1.6-1.fc6
postgresql-contrib-8.1.6-1.fc6
postgresql-jdbc-8.1.407-1jpp.4
[root at fc-test ~]# rpm -qa | grep java
java-1.4.2-gcj-compat-1.4.2.0-40jpp.110
gcc-java-4.1.1-51.fc6
java-1.4.2-gcj-compat-devel-1.4.2.0-40jpp.110

I'm using following SPEC file from 1.2.0, with version change

[root at fc-test ~]# cat /usr/src/redhat/SPECS/postgis.spec
%{!?javabuild:%define   javabuild 1}
%{!?utils:%define       utils 1}
%{!?gcj_support:%define gcj_support 1}

Summary:        Geographic Information Systems Extensions to PostgreSQL
Name:           postgis
Version:        1.2.1
Release:        2%{?dist}
License:        GPL
Group:          Applications/Databases
Source0:         
http://postgis.refractions.net/download/%{name}-%{version}.tar.gz
Source4:        filter-requires-perl-Pg.sh
#Patch1:                postgis-configure.patch
Patch2:         postgis-javamakefile.patch
URL:            http://postgis.refractions.net/
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  postgresql-devel, proj-devel, geos-devel, byacc,  
proj-devel, flex, postgresql-jdbc
Requires:       postgresql, geos, proj

%description
PostGIS adds support for geographic objects to the PostgreSQL  
object-relational
database. In effect, PostGIS "spatially enables" the PostgreSQL server,
allowing it to be used as a backend spatial database for geographic  
information
systems (GIS), much like ESRI's SDE or Oracle's Spatial extension. PostGIS
follows the OpenGIS "Simple Features Specification for SQL" and has been
certified as compliant with the "Types and Functions" profile.

%if %javabuild
%package jdbc
Summary:        The JDBC driver for PostGIS
Group:          Applications/Databases
License:        LGPL
Requires:       postgis
BuildRequires:  ant >= 0:1.6.2, junit >= 0:3.7

%if %{gcj_support}
BuildRequires:          gcc-java
Requires(post):         java-1.4.2-gcj-compat
Requires(postun):       java-1.4.2-gcj-compat
%endif

%description jdbc
The postgis-jdbc package provides the essential jdbc driver for PostGIS.
%endif

%if %utils
%package utils
Summary:        The utils for PostGIS
Group:          Applications/Databases
Requires:       postgis, perl-DBD-Pg

%description utils
The postgis-utils package provides the utilities for PostGIS.
%endif

%define __perl_requires %{SOURCE4}

%prep
%setup -q
#%patch1 -p0
%patch2 -p0

%build
%configure
make %{?_smp_mflags} LPATH=`pg_config --pkglibdir` shlib="%{name}.so"

%if %javabuild
export MAKEFILE_DIR=%{_builddir}/%{name}-%{version}/java/jdbc
JDBC_VERSION_RPM=`rpm -ql postgresql-jdbc| grep 'jdbc.jar$'|awk -F '/'  
'{print $5}'`
sed 's/postgresql.jar/'${JDBC_VERSION_RPM}'/g' $MAKEFILE_DIR/Makefile  
 > $MAKEFILE_DIR/Makefile.new
mv -f $MAKEFILE_DIR/Makefile.new $MAKEFILE_DIR/Makefile
make -C java/jdbc
%endif

%if %utils
  make -C utils
%endif

%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
install -d %{buildroot}%{_libdir}/pgsql/
install lwgeom/liblwgeom.so* %{buildroot}%{_libdir}/pgsql/
install -d  %{buildroot}%{_datadir}/pgsql/contrib/
install -m 644 *.sql %{buildroot}%{_datadir}/pgsql/contrib/
rm -f  %{buildroot}%{_libdir}/liblwgeom.so*
rm -f  %{buildroot}%{_datadir}/*.sql

%if %javabuild
install -d %{buildroot}%{_javadir}
install -m 755 java/jdbc/%{name}_%{version}.jar %{buildroot}%{_javadir}
%if %{gcj_support}
aot-compile-rpm
%endif
%endif

strip %{buildroot}/%{_libdir}/gcj/%{name}/*.jar.so

%if %utils
install -d %{buildroot}%{_datadir}/%{name}
install -m 644 utils/*.pl %{buildroot}%{_datadir}/%{name}
%endif

%clean
rm -rf %{buildroot}

%post -p %{_bindir}/rebuild-gcj-db

%postun -p %{_bindir}/rebuild-gcj-db

%files
%defattr(-,root,root)
%doc COPYING CREDITS NEWS TODO README.%{name} TODO doc/html  
loader/README.* doc/%{name}.xml  doc/ZMSgeoms.txt
%attr(755,root,root) %{_bindir}/*
%attr(755,root,root) %{_libdir}/pgsql/liblwgeom.so*
%{_datadir}/pgsql/contrib/*.sql

%if %javabuild
%files jdbc
%defattr(-,root,root)
%doc java/jdbc/COPYING_LGPL java/jdbc/README
%attr(755,root,root) %{_javadir}/%{name}_%{version}.jar
%if %{gcj_support}
%dir %{_libdir}/gcj/%{name}
%{_libdir}/gcj/%{name}/*.jar.so
%{_libdir}/gcj/%{name}/*.jar.db
%endif
%endif

%if %utils
%files utils
%defattr(-,root,root)
%doc utils/README
%attr(755,root,root) %{_datadir}/%{name}/test_estimation.pl
%attr(755,root,root) %{_datadir}/%{name}/profile_intersects.pl
%attr(755,root,root) %{_datadir}/%{name}/test_joinestimation.pl
%attr(644,root,root) %{_datadir}/%{name}/create_undef.pl
%attr(644,root,root) %{_datadir}/%{name}/%{name}_proc_upgrade.pl
%attr(644,root,root) %{_datadir}/%{name}/%{name}_restore.pl
%endif

%changelog
* Mon Dec 26 2006 - Devrim GUNDUZ <devrim at commandprompt.com> 1.2.0-2
- More spec file fixes per bugzilla review #220743

----------------------------------------------------- errors log here:  
-----------

+ make -C java/jdbc
----------
1. ERROR in ./src/org/postgis/ComposedGeom.java (at line 29)
         import org.postgresql.util.PGtokenizer;
                ^^^^^^^^^^^^^^^^^^^
The import org.postgresql.util cannot be resolved
----------
2. ERROR in ./src/org/postgis/ComposedGeom.java (at line 104)
         PGtokenizer t = new PGtokenizer(PGtokenizer.removePara(value), ',');
         ^^^^^^^^^^^
PGtokenizer cannot be resolved to a type
----------
3. ERROR in ./src/org/postgis/ComposedGeom.java (at line 104)
         PGtokenizer t = new PGtokenizer(PGtokenizer.removePara(value), ',');
                             ^^^^^^^^^^^
PGtokenizer cannot be resolved to a type
----------
4. ERROR in ./src/org/postgis/ComposedGeom.java (at line 104)
         PGtokenizer t = new PGtokenizer(PGtokenizer.removePara(value), ',');
                                         ^^^^^^^^^^^
PGtokenizer cannot be resolved
----------
----------
5. ERROR in ./src/org/postgis/DriverWrapper.java (at line 72)
         public class DriverWrapper extends Driver {
                                            ^^^^^^
Driver cannot be resolved to a type
----------
----------
6. ERROR in ./src/org/postgis/DriverWrapperAutoprobe.java (at line 54)
         public class DriverWrapperAutoprobe extends DriverWrapper {
                      ^^^^^^^^^^^^^^^^^^^^^^
The hierarchy of the type DriverWrapperAutoprobe is inconsistent
----------
----------
7. ERROR in ./src/org/postgis/DriverWrapperLW.java (at line 49)
         public class DriverWrapperLW extends DriverWrapper {
                      ^^^^^^^^^^^^^^^
The hierarchy of the type DriverWrapperLW is inconsistent
----------
----------
8. ERROR in ./src/org/postgis/PGbox2d.java (at line 31)
         public class PGbox2d extends PGboxbase {
                      ^^^^^^^
The hierarchy of the type PGbox2d is inconsistent
----------
----------
9. ERROR in ./src/org/postgis/PGbox3d.java (at line 32)
         public class PGbox3d extends PGboxbase {
                      ^^^^^^^
The hierarchy of the type PGbox3d is inconsistent
----------
----------
10. ERROR in ./src/org/postgis/PGboxbase.java (at line 40)
         public abstract class PGboxbase extends PGobject {
                                                 ^^^^^^^^
PGobject cannot be resolved to a type
----------
----------
11. ERROR in ./src/org/postgis/PGgeometry.java (at line 34)
         public class PGgeometry extends PGobject {
                                         ^^^^^^^^
PGobject cannot be resolved to a type
----------
----------
12. ERROR in ./src/org/postgis/PGgeometryLW.java (at line 37)
         public class PGgeometryLW extends PGgeometry {
                      ^^^^^^^^^^^^
The hierarchy of the type PGgeometryLW is inconsistent
----------
----------
13. ERROR in ./src/org/postgis/java2d/Java2DWrapper.java (at line 50)
         public class Java2DWrapper extends Driver {
                                            ^^^^^^
Driver cannot be resolved to a type
----------
----------
14. ERROR in ./src/org/postgis/java2d/PGShapeGeometry.java (at line 63)
         public class PGShapeGeometry extends PGobject implements Shape {
                                              ^^^^^^^^
PGobject cannot be resolved to a type
----------
14 problems (14 errors)make: *** [compile] Error 255
error: Bad exit status from /var/tmp/rpm-tmp.18862 (%build)

How I can tackle with this situation ?

Best regards,
Dido




More information about the postgis-users mailing list