[ELGIS] Trying to build mapserver package, stumbling on missing libpgport.a

Hatzopoulos, Nikolaos hatzopou at chapman.edu
Tue Aug 30 13:03:07 EDT 2011


Peter I have solved this problem

they removed the libpgport library

you need to put:

#fix hardcoded issues
sed -i 's|-lpgport| |g' Makefile
sed -i 's|-lpgport| |g' mapscript/php3/Makefile
sed -i 's|-lpgport| |g' mapscript/csharp/Makefile
sed -i 's|-lpgport| |g' mapscript/java/Makefile

My sprms are here:
ftp://ftp4cast/nickhatz/elgis/centos6/SRPMS/

My Spec file:
cat mapserver.spec


Name:           mapserver
Version:        5.6.5
Release:        3%{?dist}
Summary:        Environment for building spatially-enabled internet applications
Group:          Development/Tools
License:        BSD
URL:            http://mapserver.gis.umn.edu
Source:         http://download.osgeo.org/mapserver/mapserver-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires:       httpd
BuildRequires:  libXpm-devel
BuildRequires:  httpd-devel php-devel
BuildRequires:  postgresql-devel mysql-devel
BuildRequires:  geos-devel proj-devel gdal-devel
BuildRequires:  php-devel freetype-devel gd-devel >= 2.0.16
BuildRequires:  python-devel curl-devel zlib-devel libxml2-devel
BuildRequires:  libjpeg-devel libpng-devel libtiff-devel
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  java-1.6.0-openjdk-devel swig > 1.3.24 java-1.6.0-openjdk
BuildRequires:  fcgi-devel pam-devel readline-devel


%define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")
%define java_home /usr/lib/jvm/java-1.6.0

%description
Mapserver is an internet mapping program that converts GIS data to
map images in real time. With appropriate interface pages, 
Mapserver can provide an interactive internet map based on 
custom GIS data.

%package -n php-mapserver
Summary:        PHP/Mapscript map making extensions to PHP
Group:          Development/Languages
Requires:       httpd php-gd

%description -n php-mapserver
The PHP/Mapscript extension provides full map customization capabilities within
the PHP scripting language.


%package perl
Summary:        Perl/Mapscript map making extensions to Perl
Group:          Development/Languages
Requires:       %{name} = %{version}-%{release}
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))

%description perl
The Perl/Mapscript extension provides full map customization capabilities
within the Perl programming language.

%package python
Summary:        Python/Mapscript map making extensions to Python
Group:          Development/Languages
Requires:       %{name} = %{version}-%{release}

%description python
The Python/Mapscript extension provides full map customization capabilities
within the Python programming language.

%package java
Summary:        Java/Mapscript map making extensions to Java
Group:          Development/Languages
Requires:       %{name} = %{version}-%{release}
Requires:       java-1.6.0-openjdk 

%description java
The Java/Mapscript extension provides full map customization capabilities
within the Java programming language.

%prep
%setup -q
# fix spurious perm bits
chmod -x tests/home.png
# chmod -x rfc/ms-rfc-8.txt
chmod -x mapscript/php3/php_mapscript.c
chmod -x mappluginlayer.c
chmod -x mapscript/php3/mapscript_i.c
chmod -x mapscript/php3/examples/test_writeshape.phtml
chmod -x mapscript/python/examples/*.py
chmod -x mapscript/python/tests/rundoctests.dist
chmod -x mapscript/perl/examples/*.pl
chmod -x mapscript/php3/README

%build

# fix a UTF-8 one
iconv -f ISO-8859-1 -t UTF-8 < \
mapscript/java/examples/QueryByAttributeUnicode.java > \
mapscript/java/examples/QueryByAttributeUnicode-tmp.java
mv -f mapscript/java/examples/QueryByAttributeUnicode-tmp.java \
mapscript/java/examples/QueryByAttributeUnicode.java

# fix gdal lookup
%{__sed} -i.libs -e 's|`\$GDAL_CONFIG --dep-libs`||' configure

%configure \
   --with-gd \
   --with-zlib \
   --with-tiff \
   --with-freetype=%{_bindir}/freetype-config \
   --with-gdal=%{_bindir}/gdal-config \
   --with-ogr=%{_bindir}/gdal-config \
   --with-geos=%{_bindir}/geos-config \
   --with-proj \
   --with-sos \
   --with-wfs \
   --with-wcs \
   --with-wmsclient \
   --with-wfsclient \
   --with-xpm \
   --with-agg \
   --with-postgis=%{_bindir}/pg_config \
   --with-mygis=%{_bindir}/mysql_config \
   --with-curl-config=%{_bindir}/curl-config \
   --with-xml2-config=%{_bindir}/xml2-config \
   --with-php=`php-config --include-dir` \
   --without-pdf \
   --without-eppl \
   --with-threads \
   --enable-debug \
    --with-fastcgi=/usr \
   --disable-runpath

# WARNING !!!
# using %{?_smp_mflags} may break build

#fix hardcoded issues
sed -i 's|-lpgport| |g' Makefile
sed -i 's|-lpgport| |g' mapscript/php3/Makefile
sed -i 's|-lpgport| |g' mapscript/csharp/Makefile
sed -i 's|-lpgport| |g' mapscript/java/Makefile

make

# build perl
cd mapscript/perl
perl Makefile.PL
make

# build python
cd ../python
python setup.py build

# build java
cd ../java
JAVA_HOME=%{java_home} make interface
JAVA_HOME=%{java_home} make

%install
rm -rf %{buildroot}

mkdir -p %{buildroot}/%{_sbindir}
mkdir -p %{buildroot}/%{_sysconfdir}/php.d
mkdir -p %{buildroot}%{_libdir}/php/modules
mkdir -p %{buildroot}/%{_bindir}
install -p -m 755 mapserv %{buildroot}/%{_sbindir}
install -p -m 755 shp2img %{buildroot}/%{_bindir}
install -p -m 755 shptree %{buildroot}/%{_bindir}
install -p -m 755 sortshp %{buildroot}/%{_bindir}
install -p -m 755 tile4ms %{buildroot}/%{_bindir}

install -p -m 755 mapscript/php3/php_mapscript.so %{buildroot}/%{_libdir}/php/modules/

# install perl module
pushd mapscript/perl
make DESTDIR=%{buildroot} pure_vendor_install
popd

# install python module
pushd mapscript/python
python setup.py install --root %{buildroot}
popd

# install java
mkdir -p %{buildroot}%{_javadir}
install -p -m 644 mapscript/java/mapscript.jar %{buildroot}%{_javadir}/

# install php config file
mkdir -p %{buildroot}%{_sysconfdir}/php.d/
cat > %{buildroot}%{_sysconfdir}/php.d/%{name}.ini <<EOF
; Enable %{name} extension module
extension=php_mapscript.so
EOF

# cleanup junks
for junk in {*.pod,*.bs,.packlist} ; do
find %{buildroot} -name "$junk" -exec rm -rf '{}' \;
done
# remove vera fonts, these are provided system wide
rm -rf %{buildroot}/%{_docdir}/%{name}-%{version}/tests/vera

# fix some exec bits
chmod 755 %{buildroot}/%{perl_vendorarch}/auto/mapscript/mapscript.so

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc README COMMITERS GD-COPYING HISTORY.TXT  
%doc INSTALL MIGRATION_GUIDE.TXT
%doc symbols tests
%doc fonts
%{_bindir}/shp2img
%{_bindir}/shptree
%{_bindir}/sortshp
%{_bindir}/tile4ms
%{_sbindir}/mapserv

%files -n php-mapserver
%defattr(-,root,root)
%doc mapscript/php3/README
%doc mapscript/php3/examples
%config(noreplace) %{_sysconfdir}/php.d/%{name}.ini
%{_libdir}/php/modules/php_mapscript.so

%files perl
%defattr(-,root,root)
%doc mapscript/perl/examples
%dir %{perl_vendorarch}/auto/mapscript
%{perl_vendorarch}/auto/mapscript/*
%{perl_vendorarch}/mapscript.pm

%files python
%defattr(-,root,root)
%doc mapscript/python/README
%doc mapscript/python/examples
%doc mapscript/python/tests
%{python_sitearch}/*

%files java
%defattr(-,root,root)
%doc mapscript/java/README
%doc mapscript/java/examples
%doc mapscript/java/tests
%{_javadir}/*.jar

%changelog
* Mon Jul 11 2011 Nikolaos Hatzopoulos <nhatzop at gmail.com> - 5.6.5-4
- el6 remove -lpgport does not exist any more this library

* Thu Sep 23 2010 Mathieu Baudier <mbaudier at argeo.org> - 5.6.5-3
- Remove agg dependencies

* Fri Sep 17 2010 Mathieu Baudier <mbaudier at argeo.org> - 5.6.5-2
- Build against GDAL 1.7.2

* Mon Jul 26 2010 Mathieu Baudier <mbaudier at argeo.org> - 5.6.5-1
- Update to 5.6.5

* Tue Jun 01 2010 Mathieu Baudier <mbaudier at argeo.org> - 5.6.3-1
- Update to 5.6.3
- Add missing build dependencies when building in mock

* Sun Jan 17 2010 Mathieu Baudier <mbaudier at argeo.org> - 5.6.0-2
- Add fcgi-devel build requirement

* Tue Oct 27 2009 Peter Hopfgartner <peter.hopfgartner at r3-gis.it> 5.6.0-beta4-1
- new 5.6.0-beta4 series upstream

* Tue Sep 15 2009 Peter Hopfgartner <peter.hopfgartner at r3-gis.it> 5.4.2-1
- new 5.4.2 series upstream

* Thu Jun 18 2009 Peter Hopfgartner <peter.hopfgartner at r3-gis.it> 5.2.1-1
- new 5.2.1 series upstream

* Wed Jul 23 2008 Balint Cristian <rezso at rdsor.ro> 5.2.0-1
- new 5.2 series upstream

* Thu Jul 05 2008 Balint Cristian <rezso at rdsor.ro> 5.0.3-3
- address bz#453925

* Thu Jun 26 2008 Devrim GUNDUZ <devrim at commandprompt.com> - 5.0.3-2
- Rebuilt against Geos 3.0.0

* Thu Jun 12 2008 Balint Cristian <rezso at rdsor.ro> 5.0.3-1
- update to 5.0.3 bugfix release
- fix some rpmlint warnings

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng at fedoraproject.org> - 5.0.2-2
- Autorebuild for GCC 4.3

* Sat Feb 9 2008 Devrim GUNDUZ <devrim at commandprompt.com> - 5.0.2-1
- Update to 5.0.2

* Sat Jan 5 2008 Devrim GUNDUZ <devrim at commandprompt.com> - 5.0.0-2
- Update BR for java-devel, per Patrice Dumas

* Fri Jan 4 2008 Devrim GUNDUZ <devrim at commandprompt.com> - 5.0.0-1
- Update to 5.0.0
- Removed patch0, since it is already in upstream.
- Updated BRs

* Thu Dec 06 2007 Release Engineering <rel-eng at fedoraproject dot org> - 4.10.3-3
- Rebuild for deps

* Thu Aug 30 2007 Oliver Falk <oliver at linux-kernel.at> 4.10.3-2
- Add fix to include libmapserver (in some places), instead of
  libmap, that doesn't exist (anymore)

* Thu Aug 30 2007 Oliver Falk <oliver at linux-kernel.at> 4.10.3-1
- Update to fix bz#256561, CVE-2007-4542

* Fri May 11 2007 Balint Cristian <cbalint at redhat.com> 4.10.2-4
- update require list properly.

* Thu May 10 2007 Balint Cristian <cbalint at redhat.com> 4.10.2-3
- use macros if possible in spec

* Thu May 10 2007 Balint Cristian <cbalint at redhat.com> 4.10.2-2
- further fixups for inclusion

* Thu May 10 2007 Balint Cristian <cbalint at redhat.com> 4.10.2-1
- new upsream tarball (bugfix)
- further fixups for inclusion

* Tue Apr 24 2007 Balint Cristian <cbalint at redhat.com> 4.10.1-3
- further fixups for inclusion
- enable java

* Fri Mar 16 2007 Balint Cristian <cbalint at redhat.com> 4.10.1-2
- add docs

* Fri Mar 16 2007 Balint Cristian <cbalint at redhat.com> 4.10.1-1
- first package

________________________________________
From: el-bounces at lists.osgeo.org [el-bounces at lists.osgeo.org] on behalf of Peter Hopfgartner [peter.hopfgartner at r3-gis.com]
Sent: Tuesday, August 30, 2011 8:51 AM
To: el at lists.osgeo.org
Subject: Re: [ELGIS] Trying to build mapserver package, stumbling on missing    libpgport.a

I had a look at the current Fedora 5.6 spec and found this snippet:

--- devel/rpmbuild/elgis/mapserver/SPECS/mapserver.spec    2011-08-30
15:21:13.090399236 +0200
+++ rpmbuild/SPECS/mapserver.spec    2011-08-30 17:47:47.831351541 +0200
@@ -148,6 +148,11 @@
     --with-experimental-png \
     --with-fribidi-config

+# disable pgport library lookup.
+for makefile in `find . -type f -name 'Makefile'`; do
+sed -i 's|-lpgport||g' $makefile
+done
+
  # WARNING !!!
  # using %{?_smp_mflags} may break build


which does the job.

Peter

On 08/30/2011 03:55 PM, Peter Hopfgartner wrote:
> I've configured a new Virtual Machine for building EL6 packages.
>
> Starting building the MapServer 5.6.7 package, I'm struck with this
> message:
>
> (...)
> g++ -g -fPIC -Wall     -DHAVE_VSNPRINTF -DNEED_STRLCAT
> -DNEED_STRRSTR     -DUSE_FASTCGI  -DUSE_FRIBIDI -DUSE_FRIBIDI2
> -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_SOS_SVR -DUSE_LIBXML2 -DUSE_CURL
> -DUSE_WCS_SVR -DUSE_WFS_SVR -DUSE_WMS_SVR   -DUSE_MYGIS -DUSE_POSTGIS
> -DPOSTGIS_HAS_SERVER_VERSION -DUSE_TIFF -DUSE_GDAL -DUSE_OGR
> -DUSE_GEOS -DGEOS_HAS_SIMPLIFY  -DUSE_THREAD -DUSE_PROJ
> -DUSE_RGBA_PNG -DUSE_AGG     -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG
> -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR
> -DGD_HAS_GETBITMAPFONTS -DUSE_ICONV -DUSE_ZLIB  -DUSE_FRIBIDI
> -DUSE_FRIBIDI2   -I/usr/include -I/usr/include/freetype2
> -I/usr/include/gdal -I/usr/include -I/usr/include/mysql  -g -pipe
> -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
> --param=ssp-buffer-size=4 -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64
> -D_LARGEFILE_SOURCE -fno-strict-aliasing -fwrapv -fPIC
> -DUNIV_LINUX    -I/usr/include  -I/usr/include -I/usr/include/fastcgi
> -I/usr/include/libxml2 -I/usr/include/fribidi    shp2img.o  -L.
> -lmapserver -lgd -L/usr/lib64 -lgd -ljpeg -lfreetype -lpng -lz -lXpm
> -lX11      -ltiff -ljpeg -lfreetype -lpng -lz -lXpm -lX11  -lproj
> -ljpeg -lpng  -lgdal   -L/usr/lib64 -lpq -lpgport -lxslt -lxml2 -lpam
> -lssl -lcrypto -lgssapi_krb5 -lz -lreadline -lcrypt -ldl -lm
> -rdynamic -L/usr/lib64/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lssl
> -lcrypto -lmysqlclient -lcurl    -L/usr/lib64 -lgeos_c -lpthread -lc
> -L/usr/lib -lfcgi -lz -lxml2 -lz -lm -lfribidi   -lm -lstdc++    -o
> shp2img
> /usr/bin/ld: cannot find -lpgport
> collect2: ld returned 1 exit status
> make: *** [shp2img] Error 1
>
>
>
> The static lib, which in EL5 was /usr/lib64/libpgport.a, has been
> dropped from the PostgreSQL packages in
>
> http://pkgs.fedoraproject.org/gitweb/?p=postgresql.git;a=commitdiff;h=a6a1e9bfab6192bbdaea41e88368ae7d242316d7
>
>
> but I do not see any dynamically linkable libpgport.so.
>
> How could I proceed?
>
> Regards,
>
> Peter
> _______________________________________________
> el mailing list
> el at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/el


--
Dott. Peter Hopfgartner
R3 GIS Srl - GmbH
Via Johann Kravogl-Str. 2
I-39012 Meran/Merano (BZ)
web  : www.r3-gis.com
mail : peter.hopfgartner at r3-gis.com
phone: +39 0473 494949
fax  : +39 0473 069902

ATTENZIONE! Le informazioni contenute nella presente e-mail e nei documenti eventualmente allegati sono confidenziali. La loro diffusione, distribuzione e/o riproduzione da parte di terzi, senza autorizzazione del mittente è vietata e può violare il D. Lgs. 196/2003. In caso di ricezione per errore, Vogliate immediatamente informare il mittente del messaggio e distruggere la e-mail.
ACHTUNG! Die in dieser Nachricht oder in den beigelegten Dokumenten beinhalteten Informationen sind streng vertraulich. Ihre Verbreitung und/oder ihre Wiedergabe durch Dritte ist ohne Erlaubnis des Absenders verboten und verstößt gegen das Legislativdekret 196/2003. Sollten Sie diese Mitteilung irrtümlicherweise erhalten haben, bitten wir Sie uns umgehend zu informieren und anschließend die Mitteilung zu vernichten.
WARNING! This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorised copying, disclosure or distribution of the material in this e-mail is strictly forbidden and could be against the law (D. Lgs. 196/2003)

_______________________________________________
el mailing list
el at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/el


More information about the el mailing list