Author Topic: Building Kde-pim/pi On Solaris? (solved - Sort Of)  (Read 3270 times)

pakman

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Building Kde-pim/pi On Solaris? (solved - Sort Of)
« on: June 21, 2005, 01:22:01 pm »
Hi,

This is not strictly an embedded Linux question, but I cannot find anywhere else to ask about this, so here goes....

I am trying to build KDE-Pim/PI on Solaris, and am making some progress. I have managed to work around the fact that Solaris does not provide a setenv system call, but I have now got stuck and would really appreciate any hints on how to proceed, especially as I am not a C++ programmer. The problem is with lines 56 and 62 of korganizer/koeditordetails.cpp:

Code: [Select]
CustomListViewItem::~CustomListViewItem()
...
void CustomListViewItem::updateItem()

and the compiler output is:

Quote
cd korganizer && make -f Makefile
g++ -c -Wall -W -O2 -D_REENTRANT  -DKORG_NOPLUGINS -DKORG_NOARCHIVE -DKORG_NOMAIL -DKORG_NODCOP -DKORG_NOKALARMD -DKORG_NORESOURCEVIEW -DKORG_NOSPLITTER -DKORG_NOLVALTERNATION -DDESKTOP_VERSION -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -I/usr/local/qt/mkspecs/default -I. -I../microkde -I.. -Iinterfaces -I../microkde/kdecore -I../microkde/kdeui -I../microkde/kio/kfile -I../microkde/kio/kio -I../libkdepim -I/usr/local/qt/include -Imoc/unix/ -o obj/unix/koeditordetails.o koeditordetails.cpp
/usr/local/qt/include/qtooltip.h:86: warning: 'class QToolTip' has virtual functions but non-virtual destructor
/usr/local/qt/include/qnetworkprotocol.h:58: warning: 'class QNetworkProtocolFactoryBase' has virtual functions but non-virtual destructor
/usr/local/qt/include/qfiledialog.h:78: warning: 'class QFilePreview' has virtual functions but non-virtual destructor
../microkde/kresources/managerimpl.h:51: warning: 'class KRES::ManagerImplListener' has virtual functions but non-virtual destructor
../libkcal/incidencebase.h:45: warning: 'class KCal::IncidenceBase::Observer' has virtual functions but non-virtual destructor
koeditordetails.cpp:56: error: 'KCal::Attendee' is not a template type
koeditordetails.cpp:62: error: 'KCal::Attendee' is not a template type
koeditordetails.cpp: In member function 'void KOEditorDetails::insertAttendees(const QString&, const QStringList&, const QStringList&, const QStringList&)':
koeditordetails.cpp:317: warning: comparison between signed and unsigned integer expressions
koeditordetails.cpp: At global scope:
koeditordetails.cpp:450: warning: unused parameter 'pnt'
*** Error code 1
make: Fatal error: Command failed for target `obj/unix/koeditordetails.o'

I am trying to build kdepimpi version 2.1.6. My OS is SPARC/Solaris 9, and I am using GCC version 4.0 with Gnu binutils version 2.16 and version 3.3.4 of Qt (obtained ready-built from sunfreeware.com).

Thanks,
P.
« Last Edit: June 28, 2005, 10:31:15 am by pakman »
Now: Gemini 4G/Android. Previously: Zaurus C760/Cacko lite 1.23

pakman

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Building Kde-pim/pi On Solaris? (solved - Sort Of)
« Reply #1 on: June 28, 2005, 10:35:35 am »
I had another look at this over the weekend, and I have now managed to build it (apart from the gammu stuff, which I don't have the hardware for anyway). It turned out to be a compiler problem: it doesn't build under gcc version 4.0, but does under 3.4.4. This could affect any platform, not just Solaris.

Doing the build turned out to be quite an adventure. If anyone is interested, please say so here, and I'll summarise as much as I can about how I did it. I'm going away for a few weeks, but if there is any interest I'll  post when I get back.

Regards,
P.
Now: Gemini 4G/Android. Previously: Zaurus C760/Cacko lite 1.23

trevz

  • Newbie
  • *
  • Posts: 2
    • View Profile
Building Kde-pim/pi On Solaris? (solved - Sort Of)
« Reply #2 on: November 14, 2005, 08:15:08 am »
Quote
I had another look at this over the weekend, and I have now managed to build it (apart from the gammu stuff, which I don't have the hardware for anyway). It turned out to be a compiler problem: it doesn't build under gcc version 4.0, but does under 3.4.4. This could affect any platform, not just Solaris.

Doing the build turned out to be quite an adventure. If anyone is interested, please say so here, and I'll summarise as much as I can about how I did it. I'm going away for a few weeks, but if there is any interest I'll  post when I get back.

Regards,
P.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=86180\"][{POST_SNAPBACK}][/a][/div]

I'm a bit late to respond, but yes please pakman, I'd be interested to know how you got the build done. I'm trying to compile kdepimpi on Kubuntu Breezy and coming up with the same error.
..
TrevZ

pakman

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Building Kde-pim/pi On Solaris? (solved - Sort Of)
« Reply #3 on: November 14, 2005, 06:42:08 pm »
Quote
I'm a bit late to respond, but yes please pakman, I'd be interested to know how you got the build done. I'm trying to compile kdepimpi on Kubuntu Breezy and coming up with the same error.

Hi trevz,

I hit the specific problem that I mentioned above because the C++ language seems to have changed from gcc version 3.x to gcc 4.0, and the source of kdepimpi is writen for the earlier verison. I don't know what version of the compiler you are using (I've looked on the Kubuntu pages, but I couldn't find which version is included in the distribution). You can find out by doing:

Code: [Select]
gcc --version
which should produce output something like this:

Quote
gcc (GCC) 3.4.2
Copyright © 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

If you are using 4.0 or later, you will need to use a suitable alternative version (I used version 3.4.4) and use that to do the build. I know nothing about the Ubuntu distributions, so I have no idea what other versions are available. If you are very lucky, a suitable version may already be installed, and you may be able to run it with a command like:

Quote
gcc -V 3.4.4

(Look in the same directory as the gcc binary for a file matching the wildcard *gcc-3.*) If not, and you can't find a suitable binary package ready to install, you will have to download the source for gcc 3.4.4 from http://gcc.gnu.org/ and do a bootstrap configure and build of this version of the compilers. The process is documented, but it still needs care and patience and if you haven't done it before you may need a couple of attempts. Make sure that you specify an alternative installation path (e.g. /opt/mygcc) to avoid altering your existing gcc, unless you really know what you are doing.

The other problems that I had were all very specific to using gcc under Solaris, so are unlikely to affect you.

Good luck,
P.
Now: Gemini 4G/Android. Previously: Zaurus C760/Cacko lite 1.23

trevz

  • Newbie
  • *
  • Posts: 2
    • View Profile
Building Kde-pim/pi On Solaris? (solved - Sort Of)
« Reply #4 on: November 17, 2005, 07:36:55 pm »
Quote
If you are using 4.0 or later, you will need to use a suitable alternative version (I used version 3.4.4) and use that to do the build. I know nothing about the Ubuntu distributions, so I have no idea what other versions are available. If you are very lucky, a suitable version may already be installed, and you may be able to run it with a command like:
Quote
gcc -V 3.4.4
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]

Much appreciated, P. I picked up that I should compile with the earlier versions of gcc and g++ (and did so inelegantly by symlinking those commands to the relevant versions, which are fortunately supplied with Kubuntu - you've reminded me to symlink back now!).

It didn't take me *too* long to realise that I also had to install every likely-looking Qt and KDE development package, including build-essential, linux-headers-[your kernel version], kde-devel etc.

I'm fairly sure the way I got past the error you mentioned...
Code: [Select]
koeditordetails.cpp:56: error: 'KCal::Attendee' is not a template type...was to install libkcal2a and libkcal2-dev.

The thorniest problem for me was then errors connected with QPlatinumStyle, viz:
Code: [Select]
main.cpp: In function `int main(int, char**)':
main.cpp:34: error: `QPlatinumStyle?' has not been declared

From [a href=\"http://lists.debian.org/debian-devel/2003/02/msg00355.html]this posting[/url] I gleaned that Qt styles are now handled as plugins, at least in Debian. Following advice from here and here I discovered that I had to edit the three troublesome main.cpp files (gulp!). In each, I added qstylefactory.h as an include in the headers and then changed this line:
   
Code: [Select]
QApplication::setStyle(new !QPlatinumStyle());to
   
Code: [Select]
QApplication::setStyle(QStyleFactory::create("platinum"));
Similarly, in pwminit.cpp I had to drop in includes for both qstylefactory.h and  qplatinumstyle.h, and change
Code: [Select]
setStyle(new !QPlatinumStyle());to
Code: [Select]
setStyle(QStyleFactory::create("platinum"));
One final fix I did (again not elegantly but it worked) was to fake the path to qdialog.h thus:
Code: [Select]
# cd /usr/local
# mkdir qt && cd qt && ln -s /usr/include/qt/include

The blighter then finally compiled and the binaries are running sweetly, allowing me to sync without problems between kopi/kapi on my desktop and kopi/kapi on my Zaurus (collie),

It took me a loooong time to work that lot out (since I'm no programmer). Hope the above might help some other mortal, and thanks again for your help Pakman.

Cheers,

TrevZ
« Last Edit: November 17, 2005, 07:40:06 pm by trevz »
..
TrevZ