Build problems: C++ code in pspell and new RPM-SPEC files



Hello!

I compiled balsa-1.2.0 on SuSE Linux 7.2 with Ximian GNOME 1.4. I got
some curious compilation errors. I fixed the problems with changing to
source and the RPM-SPEC files. I'd like to discuss about the changes.

1) configure showed "*** libpspell not found.  Please check
   http://www.balsa.net for information on the required files."

   But since I installed pspell-0.12.2 this isn't true. Why has pspell
   a version ".12.2" instead of "0.12.2"?

   After commenting

   # AC_CHECK_LIB(pspell, new_pspell_manager,,[
   #	AC_MSG_ERROR([*** libpspell not found.  Please check http://www.balsa.net for information on the required files.])
   #])

   in configure.in it worked. But this isn't a good solution, I know.

2) make failed to link balsa:

   /usr/lib/libpspell.so: undefined reference to `pspell_manager_funs_size'
   /usr/lib/libpspell.so: undefined reference to `ios virtual table'
   /usr/lib/libpspell.so: undefined reference to `ostream::flush(void)'
   /usr/lib/libpspell.so: undefined reference to `pspell_manager_funs'
   /usr/lib/libpspell.so: undefined reference to `istream::ios virtual table'
   /usr/lib/libpspell.so: undefined reference to `ostream::operator<<(char const *)'
   /usr/lib/libpspell.so: undefined reference to `ostream & operator<<<int>(ostream &, smanip<int> const &)'
   /usr/lib/libpspell.so: undefined reference to `ifstream::~ifstream(void)'
   /usr/lib/libpspell.so: undefined reference to `__iomanip_setw(ios &, int)'
   /usr/lib/libpspell.so: undefined reference to `fstreambase::fstreambase(int, char const *, int, int)'
   /usr/lib/libpspell.so: undefined reference to `ifstream::ios virtual table'
   collect2: ld returned 1 exit status
   make: *** [balsa] Error 1

   So gcc cannot find the C++ Library and is unable to find some
   symbols in libspell. One fix was, linking with g++ instead of gcc
   and adding "-lpspell-modules".

I made RPM-SPEC files for libesmtp, pspell and balsa. Here a my
changes against the original SPEC files

3) http://www.theochem.kth.se/~pawsa/balsa/libesmtp-0.8.4-1.src.rpm
   from Brian Stafford <brian@stafford.uklinux.net> is ok, but could
   be improved (missing libesmtp-config, no extra devel package). My
   suggestion for a libesmtp.spec file is in the attachment.

4) A working source RPM for pspell. There are some "Contributed RPMs"
   on http://pspell.sourceforge.net/, but the tested RPMs didn't work
   on my system (see above). I changed a SPEC file from SuSE Linux
   7.2. The SPEC file uses version 0.2.12 instead of ".2.12" so it
   doesn't work on the original source distribution.

5) Many people install balsa in "/opt/gnome" and the system wide
   configuration in /etc/opt/gnome. I would prefer a balsa.spec with
   comments for

   %define prefix /opt/gnome
   %define sysconfdir /etc/opt/gnome

   and for disabled features. I changed the original SPEC file in
   balsa-1.2.0.tar.gz. Please note: Linking balsa doesn't work without
   manual changes (see point 2).

Bye, Björn

-- 
Björn Voigt <bjoernvoigt@compuserve.de>
WWW:     http://user.cs.tu-berlin.de/~bjoern/

%define	      prefix %{_prefix}

Name:         pspell
Copyright:    GPL
Group:	      Applications/Text
Provides:     pspell
Requires:     ispell ispell_dictionary
Packager:     Bjoern Voigt <bjoern@cs.tu-berlin.de>
Autoreqprov:  on
Version:      0.12.2
Release:      1
Summary:      An interface for spellcheckers 
Source:	      pspell-%{version}.tar.gz		
BuildRoot: %{_tmppath}/%{name}-%{version}-root

%description
Pspell is an interface between applications (mailer, wordprocessing and
others) and spellcheckers (currently ispell and aspell).

Authors:
--------
    Kevin Atkinson <kevina@users.sourceforge.net>

%prep
%setup

%build
CXXFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix}
make

%install
rm -rf "$RPM_BUILD_ROOT"
mkdir -p $RPM_BUILD_ROOT%{prefix}

make install DESTDIR=$RPM_BUILD_ROOT
mkdir --parents $RPM_BUILD_ROOT%{prefix}/share/doc/packages/pspell
cp -r $RPM_BUILD_ROOT%{prefix}/doc/pspell \
   $RPM_BUILD_ROOT%{prefix}/share/doc/packages/pspell

%clean
test -z "$RPM_BUILD_ROOT" || rm -rf $RPM_BUILD_ROOT

%files
%{prefix}/lib/libpspell*.so.*
%{prefix}/share/doc/packages/pspell
%{prefix}/share/pspell
%package devel
Summary:      The developerfiles for pspell 
Group:        Development
Autoreqprov:  on

%description devel
The developerfiles for pspell.


%files devel
%{prefix}/lib/libpspell*.so
%{prefix}/lib/libpspell*.*a
%{prefix}/include/pspell

# libesmtp.spec.in
# Based on original file by Carlos Morgado <chbm@chbm.nu>
# and Brian Stafford <brian@stafford.uklinux.net>

%define prefix 	%{_prefix}
%define plugindir %{prefix}/lib/esmtp-plugins
%define ver     0.8.4

Summary:  	SMTP client library
Name:     	libesmtp
Version:  	%{ver}
Release:  	3
Packager:	Bjoern Voigt <bjoern@cs.tu-berlin.de>

Copyright:	LGPL
Group:    	System Environment/Libraries
Source:  	libesmtp-%{ver}.tar.bz2

URL:       	http://www.stafford.uklinux.net/libesmtp/
BuildRoot:	/var/tmp/libesmtp-%{ver}-root
Prefix:		%{prefix}

Packager:	Brian Stafford <brian@stafford.uklinux.net>
Provides:	libesmtp
Docdir:		%{_docdir}

%description
LibESMTP is a library to manage posting (or submission of) electronic
mail using SMTP to a preconfigured Mail Transport Agent (MTA) such as
Exim.  It may be used as part of a Mail User Agent (MUA) or another
program that must be able to post electronic mail but where mail
functionality is not the program's primary purpose.

%package devel
Summary: Libraries and include files for libesmtp
Group: Development/Libraries

%description devel
The libesmtp-devel package includes the static libraries and header
files for the libesmtp package.

Install libesmtp-devel if you want to develop programs which will use libesmtp.

%prep 
%setup -T -b 0
#%patch

%build
CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=%{prefix} --with-auth-plugin-dir=%{plugindir} --enable-pthreads --enable-require-all-recipients --enable-starttls --enable-etrn
make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR="$RPM_BUILD_ROOT" install

%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-, root, root)
%doc AUTHORS COPYING COPYING.GPL NEWS Notes README
%{prefix}/bin/*
%{prefix}/lib/libesmtp.so.*
%{prefix}/lib/libesmtp.la
%{plugindir}/sasl-*

%files devel
%defattr(-, root, root)
%{prefix}/include/*.h
%{prefix}/lib/libesmtp.so
%{prefix}/lib/libesmtp.a
#%define prefix /opt/gnome
#%define sysconfdir /etc/opt/gnome
%define prefix %{_prefix}
%define sysconfdir %{_sysconfdir}

%define config_opts --prefix=%{prefix} --sysconfdir=%{sysconfdir} --mandir=%{_mandir} --infodir=%{_infodir} --enable-threads --disable-system-install --disable-more-warnings --with-ssl --with-esmtp --enable-mdn-reply --enable-ldap --enable-gtkhtml --with-catgets --disable-pcre
# we disable PCRE because it introduces dependency on KDE packages,
# it is better to reduce number of dependencies in the standard build
# and link against glibc version of regex library.
Summary:   Balsa Mail Client
Name:      balsa
Version:   1.2.0
Release:   3
Copyright: GPL
Group:     Applications/Internet
Source0:   %{name}-%{version}.tar.bz2
Patch0:    %{name}-%{version}.dif
URL:       http://www.balsa.net/
BuildRoot: %{_tmppath}/%{name}-%{version}-root
Packager: Björn Voigt <bjoern@cs.tu-berlin.de>
Requires: gtk+ >= 1.2.7
Requires: gnome-libs >= 1.2.0
Requires: libesmtp >= 0.8.3
Provides: balsa

BuildRequires:  libesmtp >= 0.7.1
BuildRequires:  gnome-libs-devel >= 1.2.0
BuildRequires:  gtk+-devel >= 1.2.7

%description
Balsa is an e-mail reader.  This client is part of the GNOME
desktop environment.  It supports local mailboxes, POP3 and
IMAP.
 
%prep
%setup
%patch

%build
# Needed for snapshot releases.
%ifarch alpha
  ARCHFLAG="--host=alpha-redhat-linux"
%endif

aclocal -I macros
autoheader
autoconf

export CFLAGS="$RPM_OPT_FLAGS"
export LDFLAGS="-s"

CFLAGS="$RPM_OPT_FLAGS" ./configure $ARCHFLAG %{config_opts}

if [ "$SMP" != "" ]; then
  (make "MAKE=make -k -j $SMP"; exit 0)
  make
else
  make
fi

%install
rm -rf "$RPM_BUILD_ROOT"


make prefix=$RPM_BUILD_ROOT%{prefix} \
    sysconfdir=$RPM_BUILD_ROOT%{sysconfdir} \
    mandir=$RPM_BUILD_ROOT%{_mandir} \
    infodir=$RPM_BUILD_ROOT%{_infodir} install

%find_lang %{name}


%clean
[ -n "$RPM_BUILD_DIR/%{name}-%{version}" ] && rm -rf "$RPM_BUILD_DIR/%{name}-%{version}"

%files -f %{name}.lang
%defattr(-, root, root)
%doc README COPYING ChangeLog NEWS TODO AUTHORS HACKING docs/mh-mail-HOWTO
%doc docs/vconvert.awk docs/pine2vcard
%{prefix}/bin/balsa
%{prefix}/share/gnome/apps/Internet/balsa.desktop
%{prefix}/share/gnome/help/balsa/*
%{prefix}/share/pixmaps/*
%{prefix}/share/sounds/balsa/*
%{_mandir}/man1/balsa.1*
%config %{sysconfdir}/sound/events/*



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]