Menu

#8 Unable to use mozilla-sync-test on openSUSE

unstable
open
5
2008-01-19
2007-11-27
No

To make this issue better trackable I open a ticket for it.

As talked about in the forum mozilla-connect-test does not work with the openSUSE mozilla libraries at least not out of the box.

Furthermore openSUSE does not contain a Thunderbird-devel package to build mozilla-sync.

For now I have started building Thunderbird in the openSUSE-BuildService at http://download.opensuse.org/repositories/home:/felixmoeller2/

This repository contains MozillaThunderbird-OpenSync-2.0.0.9 and MozillaThunderbird-OpenSync-devel-2.0.0.9 which install into /opt/thunderbird/.

To compile mozilla-sync on openSUSE one now just has set PKG_CONFIG_PATH (i.e. export PKG_CONFIG_PATH=/opt/thunderbird/lib/pkgconfig/) and then cmake will detect everything.

To use the mozilla-sync-plugin one just has to set LD_LIBRARY_PATH (i.e. export LD_LIBRARY_PATH=/opt/thunderbird/lib/thunderbird-2.0.0.9/)

Hopefully the packages will be mirrored out in a few minutes ... Right now openSUSE-factory x86-64 is missing as Thunderbird does not build there with GCC 4.3 hopefully I can fix that soon.

Discussion

1 2 > >> (Page 1 of 2)
  • Felix Möller

    Felix Möller - 2007-11-29

    Logged In: YES
    user_id=1941911
    Originator: YES

    I still do not know how to build Thunderbird for x86-64 with gcc 4.3.

    Nevertheless I packaged libopensync-plugin-mozilla-0.34_SVN46 today and added it to my repository. This is built against MozillaThunderbird-OpenSync.

    To synchronoize one just has to do:
    # export LD_LIBRARY_PATH=/opt/thunderbird/lib/thunderbird-2.0.0.9/
    # msynctool --sync file2thunderbird

     
  • KaarPoSoft

    KaarPoSoft - 2007-11-29

    Logged In: YES
    user_id=1662541
    Originator: NO

    Excuse me for being so totally ignorant, but where is the repository you added it to?

     
  • Felix Möller

    Felix Möller - 2007-11-29

    Logged In: YES
    user_id=1941911
    Originator: YES

    The repository is at http://repos.opensuse.org/home:/felixmoeller2/.

     
  • KaarPoSoft

    KaarPoSoft - 2007-11-29

    Logged In: YES
    user_id=1662541
    Originator: NO

    Cool. Thanks for adding mozilla-sync there !!

    Btw, two small stupid questions:
    - how did you generate the rpm? Something to add to mozilla-sync CMakeFile to make it easier?
    - did you get the SVN46 infix automatically by some means I have not thought of?

     
  • KaarPoSoft

    KaarPoSoft - 2007-11-29
    • milestone: --> 772565
    • assigned_to: nobody --> kaarposoft
     
  • Felix Möller

    Felix Möller - 2007-11-29

    Logged In: YES
    user_id=1941911
    Originator: YES

    The repository is at http://repos.opensuse.org/home:/felixmoeller2/.

     
  • Felix Möller

    Felix Möller - 2007-11-29
    • assigned_to: kaarposoft --> nobody
    • milestone: 772565 -->
     
  • Felix Möller

    Felix Möller - 2007-11-29

    Logged In: YES
    user_id=1941911
    Originator: YES

    I just took the .spec file of another OpenSync plugin (from OpenSync:) and adapted it. The RPMs are now generated by the openSUSE Buildservice -- a compile cluster -- and therefore the are rebuilt on every OpenSync update automatically. (see http://en.opensuse.org/Build_Service\)

    Right now I use a little script to generate the package:
    #!/bin/bash
    cd /tmp/
    svn co https://bluezync.svn.sourceforge.net/svnroot/bluezync/trunk/libopensync-plugin-mozilla/ libopensync-plugin-mozilla
    cd libopensync-plugin-mozilla
    filename=libopensync-plugin-mozilla-0.34_SVN$(svn info | grep -oP "(?<=Revision: )\d+")
    svn export . ../$filename
    cd ..
    tar -cjf $HOME/$filename.tar.bz2 $filename
    rm -rf $filename

    I will look at CPACK the next days ...

    As soon as we get it built against openSUSE thunderbird i am sure I can talk to the suse OpenSync maintainter (cstender) to add it to the official repository.

     
  • Felix Möller

    Felix Möller - 2007-11-30

    Logged In: YES
    user_id=1941911
    Originator: YES

    wolfiR (Wolfgang Rosenauer) the mozilla Maintainer from SUSE took the time today to build an official Thunderbird-devel package for openSUSE.

    This is available right now at http://download.opensuse.org/repositories/mozilla/. I will look into compiling and linking against this one the next days ...

     
  • Felix Möller

    Felix Möller - 2007-12-03

    Logged In: YES
    user_id=1941911
    Originator: YES

    The packages had broken pkgconfig files but this is fixed now.

    cmake finds them but errors with:

    "[ 7%] Building CXX object src/CMakeFiles/mozilla-connect-test.dir/thunderbird-card.o
    /home/fm/svn/bluezync/trunk/libopensync-plugin-mozilla/src/thunderbird-card.cpp:39:26: error: nsIAbMDBCard.h: No such file or directory
    In file included from /home/fm/svn/bluezync/trunk/libopensync-plugin-mozilla/src/thunderbird-card.cpp:41:"

    I will investigate this.

     
  • Felix Möller

    Felix Möller - 2007-12-03

    Logged In: YES
    user_id=1941911
    Originator: YES

    I got mozilla-sync to build with the official thunderbird-devel package with the following patch:
    Index: trunk/libopensync-plugin-mozilla/cmake/modules/FindThunderbirdXpcom.cmake
    ===================================================================
    --- trunk/libopensync-plugin-mozilla/cmake/modules/FindThunderbirdXpcom.cmake (Revision 63)
    +++ trunk/libopensync-plugin-mozilla/cmake/modules/FindThunderbirdXpcom.cmake (Arbeitskopie)
    @@ -22,10 +22,10 @@
    ${_LIBTBXPCOM_INCLUDE_DIR}
    ${_LIBTBXPCOM_INCLUDE_DIR}/xpcom
    ${_LIBTBXPCOM_INCLUDE_DIR}/nspr
    - ${_LIBTBXPCOM_INCLUDE_DIR}/rdf
    + ${_LIBTBXPCOM_INCLUDE_DIR}/../rdf
    ${_LIBTBXPCOM_INCLUDE_DIR}/string
    - ${_LIBTBXPCOM_INCLUDE_DIR}/addrbook
    - ${_LIBTBXPCOM_INCLUDE_DIR}/xpcom_obsolete
    + ${_LIBTBXPCOM_INCLUDE_DIR}/../addrbook
    + ${_LIBTBXPCOM_INCLUDE_DIR}/../xpcom_obsolete
    ${THUNDERBIRDXPCOM_INCLUDE_DIRS}
    )
    # xpcom_obsolete is needed because nsIABDirectory pulls in nsFileSpec.h
    @kaarposoft: Is this a openSUSE packaging bug, or is it expected? The openSUSE MozillaThunderbird-devel package has no directories under /usr/include/thunderbird/xpcom/ ...

    Trying to connect I get now the following:
    Mozilla Connection Test says hello
    Parsing configuration file
    Parsing [/config/thunderbird-addressbook]
    Parsing [/config/thunderbird-addressbook/gre-directory]
    Parsing [/config/thunderbird-addressbook/profile-directory]
    Parsing [/config/thunderbird-addressbook/addressbook-file]
    Configuration file parsed
    Checking configuration file
    Configuration file checked
    Initializing XPCOM
    Getting GRE path
    GRE path: [/usr/lib/thunderbird]
    Creating nsProfileDirServiceProvider
    nsProfileDirServiceProvider::NS_NewProfileDirServiceProvider(223): Creating new provider
    NS_InitXPCOM2
    nsProfileDirServiceProvider::GetFile(195): [ComsD] -> [/home/fm/.thunderbird/arfrac6v.default]
    nsProfileDirServiceProvider::GetFile(195): [GreComsD] -> [/usr/lib/thunderbird/components]
    nsProfileDirServiceProvider::GetFile(195): [ComRegF] -> [/home/fm/.thunderbird/arfrac6v.default/compreg.dat]
    nsProfileDirServiceProvider::GetFile(195): [XCurProcD] -> [/usr/lib/thunderbird]
    nsProfileDirServiceProvider::GetFile(195): [XptiRegF] -> [/home/fm/.thunderbird/arfrac6v.default/xpti.dat]
    XPCOM initialized
    Registering GRE services
    AutoRegister failed. Continuing anyway...
    GRE component path: [/usr/lib/thunderbird//components]
    GRE services registered
    Component registry
    Collecting Contract IDs
    The component registrar has 1041 components registred, here are the Contract IDs:
    @KaarPoSoft.dk/blueZync/BZBluetooth;1
    ...
    @mozilla.org/xul/xul-tree-builder;1
    @mozilla.org:/content/content-area-dragdrop;1
    Getting addressbook
    *** Error in address book initialization
    Init(79): [do_GetService] returned [0x080040154]

     
  • KaarPoSoft

    KaarPoSoft - 2007-12-04

    Logged In: YES
    user_id=1662541
    Originator: NO

    On PCLinuxOS the "main" include dir is /usr/include/thunderbird-2.0.0.6/
    There are about a hundred files in this dir, including "nsXPCOM.h"
    There are about a hundred directories as well, including "xpcom"

    I think the problem might be, that your "nsXPCOM.h" is found under xpcom,
    so ${_LIBTBXPCOM_INCLUDE_DIR} gets set to "/usr/include/thunderbird/xpcom/" instead of "/usr/include/thunderbird/" as I think it should.

    I think that instead of your patch, it is better to find another file to look for in line 16.

    Suggestions:
    nsError.h
    mozilla-config.h
    nsCOMPtr.h
    nscore.h
    nsBuildID.h

    If you have any of those in the main include dir, please try to put this name in line 16 instead of nsXPCOM.h

    ----------

    I still do not know why your do_GetService fails, except that AutoRegister failed, and I don't know why that failed.
    You could try to run from the thunderbird extension; it will probably work because then tbird has set everything up correctly

    /Henrik

     
  • KaarPoSoft

    KaarPoSoft - 2007-12-04
    • assigned_to: nobody --> kaarposoft
    • milestone: --> unstable
     
  • Felix Möller

    Felix Möller - 2007-12-04

    Logged In: YES
    user_id=1941911
    Originator: YES

    Ok building mozilla-sync works with
    # svn diff
    Index: ../trunk/libopensync-plugin-mozilla/cmake/modules/FindThunderbirdXpcom.cmake
    ===================================================================
    --- ../trunk/libopensync-plugin-mozilla/cmake/modules/FindThunderbirdXpcom.cmake (Revision 63)
    +++ ../trunk/libopensync-plugin-mozilla/cmake/modules/FindThunderbirdXpcom.cmake (Arbeitskopie)
    @@ -13,10 +13,10 @@

    MESSAGE( "-- Found thunderbird-xpcom" )
    #If we found the thunderbird package, look for one of the includes
    - FIND_PATH(_LIBTBXPCOM_INCLUDE_DIR nsXPCOM.h
    + FIND_PATH(_LIBTBXPCOM_INCLUDE_DIR mozilla-config.h
    PATHS ${THUNDERBIRDXPCOM_INCLUDE_DIRS} ${EXTRA_INC_PATHS} )
    IF( NOT _LIBTBXPCOM_INCLUDE_DIR )
    - MESSAGE( FATAL_ERROR "Found thunderbird-xpcom, but not nsXPCOM.h" )
    + MESSAGE( FATAL_ERROR "Found thunderbird-xpcom, but not mozilla-config.h" )
    ENDIF ( NOT _LIBTBXPCOM_INCLUDE_DIR )
    SET( XPCOM_INCLUDE_DIRS
    ${_LIBTBXPCOM_INCLUDE_DIR}

    but right now i cannot make the thunderbird extension.
    # make
    [ 12%] Generating IBlueZync.h
    /bin/sh: XPIDL-NOTFOUND: command not found
    make[2]: *** [components/IBlueZync.h] Error 127
    make[1]: *** [components/CMakeFiles/BlueZync.dir/all] Error 2
    make: *** [all] Error 2

    xpidl is under /usr/lib/thunderbird/bin/xpidl.

    and _LIBDIRS is "/usr/lib/thunderbird" at:
    FIND_PROGRAM(XPIDL xpidl
    PATHS ${_LIBDIRS} )

     
  • Nobody/Anonymous

    Logged In: NO

    I tried to build r79 today and had to do the following:
    Index: ../trunk/libopensync-plugin-mozilla/cmake/modules/FindThunderbirdXpcom.cmake
    ===================================================================
    --- ../trunk/libopensync-plugin-mozilla/cmake/modules/FindThunderbirdXpcom.cmake (Revision 79)
    +++ ../trunk/libopensync-plugin-mozilla/cmake/modules/FindThunderbirdXpcom.cmake (Arbeitskopie)
    @@ -13,10 +13,10 @@

    MESSAGE( "-- Found thunderbird-xpcom" )
    #If we found the thunderbird package, look for one of the includes
    - FIND_PATH(_LIBTBXPCOM_INCLUDE_DIR nsXPCOM.h
    + FIND_PATH(_LIBTBXPCOM_INCLUDE_DIR mozilla-config.h
    PATHS ${THUNDERBIRDXPCOM_INCLUDE_DIRS} ${EXTRA_INC_PATHS} )
    IF( NOT _LIBTBXPCOM_INCLUDE_DIR )
    - MESSAGE( FATAL_ERROR "Found thunderbird-xpcom, but not nsXPCOM.h" )
    + MESSAGE( FATAL_ERROR "Found thunderbird-xpcom, but not mozilla-config.h" )
    ENDIF ( NOT _LIBTBXPCOM_INCLUDE_DIR )
    SET( XPCOM_INCLUDE_DIRS
    ${_LIBTBXPCOM_INCLUDE_DIR}
    @@ -27,6 +27,7 @@
    ${_LIBTBXPCOM_INCLUDE_DIR}/addrbook
    ${_LIBTBXPCOM_INCLUDE_DIR}/js
    ${_LIBTBXPCOM_INCLUDE_DIR}/xpcom_obsolete
    + ${_LIBTBXPCOM_INCLUDE_DIR}/necko
    ${THUNDERBIRDXPCOM_INCLUDE_DIRS}
    )
    # xpcom_obsolete is needed because nsIABDirectory pulls in nsFileSpec.h

    without the second path I get:
    libopensync-plugin-mozilla/src/mozilla-calendar.cpp:34:20: error: nsIURI.h: not found

    in addition I have a warning:
    /home/fm/svn/bluezync/trunk/libopensync-plugin-mozilla/src/mozilla-calendar.cpp: In member function ‘char* MozillaCalendar::CurrentXML(char**, void (*)(int, const char*, ...))’:
    /home/fm/svn/bluezync/trunk/libopensync-plugin-mozilla/src/mozilla-calendar.cpp:354: warning: deprecated conversion from string constant to ‘char*’

    To get further with build the thunderbird add-on i did the following:
    --- ../trunk/blueZync4thunderbird/cmake/modules/FindThunderbirdXpcom.cmake (Revision 79)
    +++ ../trunk/blueZync4thunderbird/cmake/modules/FindThunderbirdXpcom.cmake (Arbeitskopie)
    @@ -151,7 +151,7 @@

    # ---------- Find idl compiler executable
    FIND_PROGRAM(XPIDL xpidl
    - PATHS ${_LIBDIRS} )
    + PATHS ${_LIBDIRS} ${_LIBDIRS}/bin)
    #MESSAGE( "XPIDL ${XPIDL}" )

    And now i get the following:
    [ 12%] Generating IBlueZync.h
    /home/fm/svn/bluezync/trunk/blueZync4thunderbird/components/IBlueZync.idl:35: can't open included file nsISupports.idl for reading

    input callback returned failure
    make[2]: *** [components/IBlueZync.h] Error 2
    make[1]: *** [components/CMakeFiles/BlueZync.dir/all] Error 2
    make: *** [all] Error 2

    This file is at /usr/include/thunderbird/nsISupports.idl.

     
  • Felix Möller

    Felix Möller - 2007-12-06

    Logged In: YES
    user_id=1941911
    Originator: YES

    Ok I looked a little more into it. The problem was that ${LIBTBXPCOM_IDL_DIR} was not set correctly. Doing
    @@ -145,13 +145,13 @@
    STRING( REGEX REPLACE "/include" "/share/idl/" _IDL_PATH "${XPCOM_INCLUDE_DIRS}" )
    #MESSAGE( "_IDL_PATH ${_IDL_PATH}" )
    FIND_PATH( LIBTBXPCOM_IDL_DIR nsISupports.idl
    - PATHS ${_IDL_PATH} )
    + PATHS ${_IDL_PATH} ${_LIBTBXPCOM_INCLUDE_DIR})
    #MESSAGE( "LIBTBXPCOM_IDL_DIR ${LIBTBXPCOM_IDL_DIR}" )

    I solved that. But now I get "blueZync4thunderbird/components/IBlueZync.idl:36: can't open included file nsIArray.idl for reading" nsIArray.idl seems to be nowhere on my harddisk:
    # find /usr/include/thunderbird/ -name "nsIArray*"
    /usr/include/thunderbird/xpcom/nsIArray.h

     
  • KaarPoSoft

    KaarPoSoft - 2007-12-08

    Logged In: YES
    user_id=1662541
    Originator: NO

    Whow, I am really surprised that mozilla is packed so differently on different distros ))))-:
    Thank you for still being there, trying to solve this!

    I believe I have solved most of the issues you mention - except nsIArray.h - now available in SVN.
    (Note that I have made a few changes to the use of CMake. In particular, libopensync-plugin-mozilla now installs FindThunderbirdXpcom.cmake and more in PREFIX/share/libopensync-plugin-mozilla, from where blueZync4Thunderbird includes it)

    nsIArray.h should be included in the thunderbird-devel package.
    In PCLinuxOS it is put under /usr/share/idl/thunderbird-2.0.0.6 along with a thousand (1269, really!) other .idl files.

    I think you should talk to the mozilla Maintainer from SUSE, and ask him to include all the .idl files
    (If you are "desperate", it can also be found in the gecko sdk)

    /Henrik

     
  • Felix Möller

    Felix Möller - 2007-12-08

    Logged In: YES
    user_id=1941911
    Originator: YES

    Ok i wrote an email to the openSUSE maintainer.

    libopensync-plugin-mozilla builds with current SVN without a problem.

    But trying mozilla-connect-test I still get
    "@mozilla.org:/content/content-area-dragdrop;1
    Getting addressbook
    *** Error in address book initialization
    Init(79): [do_GetService] returned [0x080040154]"

    Thanks alot.

     
  • Nobody/Anonymous

    Logged In: NO

    Wolfgang fixed the MozillaThunderbird-devel package to include all .idl files just a few minutes ago. Now I can compile everything with just:
    Index: ../trunk/blueZync4thunderbird/CMakeLists.txt
    ===================================================================
    --- ../trunk/blueZync4thunderbird/CMakeLists.txt (Revision 98)
    +++ ../trunk/blueZync4thunderbird/CMakeLists.txt (Arbeitskopie)
    @@ -51,7 +51,7 @@
    # ---------- Find idl include directory
    STRING( REGEX REPLACE "/include" "/share/idl/" _IDL_PATH "${XPCOM_INCLUDE_DIRS}" )
    FIND_PATH( LIBTBXPCOM_IDL_DIR nsISupports.idl
    - PATHS ${_IDL_PATH} )
    + PATHS ${_IDL_PATH} ${XPCOM_INCLUDE_DIRS})

    IF( NOT LIBTBXPCOM_IDL_DIR )
    MESSAGE( FATAL_ERROR "*** Could not find idl include files under ${_IDL_PATH} or ${_LIBTBXPCOM_INCLUDE_DIR}" )

    This requires at least MozillaThunderbird-devel-2.0.0.9-8.1.

    I still hit "Error in address book initialization".

     
  • Felix Möller

    Felix Möller - 2007-12-09

    Logged In: YES
    user_id=1941911
    Originator: YES

    Thanks alot kaarposoft. current svn now builds without a problem. mozilla-connect-test fails.

     
  • KaarPoSoft

    KaarPoSoft - 2007-12-10

    Logged In: YES
    user_id=1662541
    Originator: NO

    Good to hear that it finally compiles!
    You could actually try the thunderbird extension (0.1.2 or 0.1.4) in Thunderbird.
    When called from inside Thunderbird, the classes are probably already registred and do_GetService may work.

     
  • Felix Möller

    Felix Möller - 2007-12-10

    Logged In: YES
    user_id=1941911
    Originator: YES

    I installed the thunderbird plugin but somehow i am not able to configure the group correctly.

    I allways get "The group is invalid First plugin should be mozilla-sync but was syncml-obex-client."

    My filesystem looks like this:
    blueZync/
    blueZync/group1
    blueZync/group1/archive.db
    blueZync/group1/2
    blueZync/group1/2/syncml-obex-client.conf
    blueZync/group1/2/syncmember.conf
    blueZync/group1/syncgroup.conf
    blueZync/group1/1
    blueZync/group1/1/mozilla-sync.conf
    blueZync/group1/1/syncmember.conf

    I am using svn r115.

     
  • KaarPoSoft

    KaarPoSoft - 2007-12-11

    Logged In: YES
    user_id=1662541
    Originator: NO

    Sorry about that.
    Stupid me thought that in OpenSync the first added group would be nth(0), the next nth(1), and so on. But no, groups come in random order (depending on g_dir). So we have to use osync_group_find_member instead of osync_group_nth_member.
    Fixed in 0.1.6

     
  • Felix Möller

    Felix Möller - 2007-12-12

    Logged In: YES
    user_id=1941911
    Originator: YES

    Thanks now synchronization starts! From within Thunderbird.

    It quits because it cannot find an id in the thunderbird addressbook, but this this is probably because of the broken syncml-obex-client.

     
  • Felix Möller

    Felix Möller - 2008-01-19
    • summary: Unable to use mozilla-sync with Thunderbird of openSUSE --> Unable to use mozilla-sync-test on openSUSE
     
1 2 > >> (Page 1 of 2)

Log in to post a comment.