Home > Debian, Free Software, God Damnit Linux, Hardware, Jon F > Blackbery Sync Attempt #3: Compiling from Source

Blackbery Sync Attempt #3: Compiling from Source

After my first two attempts at getting my Blackberry to sync with Mozilla Thunderbird, I got pissed off and went right to the source of my problems. I emailed the developer of the opensync-plugin-mozilla package that (allegedly) allows Thunderbird to play nicely with OpenSync, and gave him the what for, (politely) asking what I should do. He suggested that I follow the updated installation instructions for checking out and compiling the latest version of his plugin from scratch instead of using the older, precompiled versions that are no longer supported.

I set to it, first removing all of the packages that I had installed during my last two attempts, excluding Barry, as I had already built and installed the latest version of its libraries. Everything else, including OpenSync and all of its plugins went, and I started from scratch. Luckily, the instructions were easy to follow, although they recommended that I get the latest versions of some libraries by adding Debian’s sid repositories to my sources list. This resulted in me shitting my pants later in the day, when I saw 642 available updates for my system in Synaptic. I figured out what was going on pretty quickly and disabled updates from sid, without ruining my system. If there’s one thing that Windows has taught me over the years, it is to never set a machine to auto-install updates.

Once I had the source code and dependency libraries, the install was a snap. The plugin source came with a utils directory full of easy to use scripts that automated most of the process. With everything going swimmingly, I was jarred out of my good mood by a nasty error that occurred when I ran the build-install-opensync.sh script:

CMake Error at cmake/modules/FindPkgConfig.cmake:357 (message):
None of the required ‘libopensync1;>=0.39′ found
Call Stack (most recent call first):
cmake/modules/FindOpenSync.cmake:27 (PKG_SEARCH_MODULE)
CMakeLists.txt:15 (FIND_PACKAGE)

CMake Error at cmake/modules/FindOpenSync.cmake:46 (MESSAGE):
OpenSync cmake modules not found.  Have you installed opensync core or did
you set your PKG_CONFIG_PATH if installing in a non system directory ?
Call Stack (most recent call first):
CMakeLists.txt:15 (FIND_PACKAGE)

It turns out that the plugin requires OpenSync v0.39 or greater to be installed to work. Of course, the latest version of same in either the Debian main or lenny-backports repositories is v0.22-2. This well-aged philosophy of the Debian Stable build has irked me a couple of times now, and I fully intend to update my system to the testing repositories before the end of the month. In any case, I quickly made my way over to the OpenSync homepage to obtain a newer build of their libraries. There I found out not only that version 0.39 had just been released on September 21st, and also that it isn’t all that stable:

Releases 0.22 (and 0.2x svn branch) and before are considered stable and suitable for production. 0.3x releases introduce major architecture and API changes and are targeted for developers and testers only and may not even compile or are likely to contain severe bugs.

0.3x releases are not recommended for end users or distribution packaging.

Throwing caution to the wind, I grabbed a tarball of compilation scripts from the website, and went about my merry way gentooing it up. After a couple of minor tweaks to the setEnvOpensync.sh script, I got the cmpOpensync script to run, which checked out the latest trunk from the svn, and automatically compiled and installed it for me. By running the command msynctool –version, I found out that I now had OpenSync v0.40-snapshot installed. Relieved, I headed back to my BlueZync installation. This time around, I managed to get right up to the build-install-bluezync.sh script before encountering another horrible dependency error:

– checking for one of the modules ‘glib-2.0′
—   found glib-2.0, version 2.16.6
— Found GLib2: glib-2.0 /usr/include/glib-2.0;/usr/lib/glib-2.0/include
— Looking for include files HAVE_GLIB_GREGEX_H
— Looking for include files HAVE_GLIB_GREGEX_H – found
— checking for one of the modules ‘libxml-2.0′
—   found libxml-2.0, version 2.6.32
— checking for one of the modules ‘libopensync1′
—   found libopensync1, version 0.40-snapshot
— checking for one of the modules ‘thunderbird-xpcom;icedove-xpcom’
—   found icedove-xpcom, version 2.0.0.22
—     THUNDERBIRD_XPCOM_VERSION 2.0.0.22
—     THUNDERBIRD_VERSION_MAIN 2
—     THUNDERBIRD_XPCOM_MAIN_INCLUDE_DIR /usr/include/icedove
—     NSPR_MAIN_INCLUDE_DIR /usr/include/nspr
—     THUNDERBIRD_XPCOM_LIBRARY_DIRS /usr/lib/icedove
—     THUNDERBIRD_XPCOM_LIBRARIES xpcom;plds4;plc4;nspr4;pthread;dl
— checking for one of the modules ‘sunbird-xpcom;iceowl-xpcom’
—   found iceowl-xpcom, version 0.8
SUNBIRD_INCLUDE_DIRS /usr/include/iceowl;/usr/include/iceowl/xpcom;/usr/include/iceowl/string;/usr/include/nspr
SEVERAL
—      SUNBIRD_MAIN_INCLUDE_DIR /usr/include/iceowl
—      SUNBIRD_VERSION 0.8
— Found xpcom (thunderbird and sunbird):
—   THUNDERBIRD_XPCOM_VERSION=[2.0.0.22]
—   SUNBIRD_VERSION=[0.8]
—   THUNDERBIRD_VERSION_MAIN=[2]
—   SUNBIRD_VERSION_MAIN=[0]
—   XPCOM_INCLUDE_DIRS /usr/include/nspr;/usr/include/icedove;/usr/include/icedove/addrbook;/usr/include/icedove/extensions;/usr/include/icedove/rdf;/usr/include/icedove/string;/usr/include/icedove/xpcom_obsolete;/usr/include/icedove/xpcom;/usr/include/icedove/xulapp;/usr/include/iceowl
—   XPCOM_LIBRARY_DIRS /usr/lib/icedove
—   XPCOM_LIBRARIES xpcom;plds4;plc4;nspr4;pthread;dl
—   SUNBIRD_VERSION 0.8
CALENDAR_VERSION=[8]
LIBTBXPCOM_INCLUDE_DIR
XPCOM_LIBRARIES  xpcom;plds4;plc4;nspr4;pthread;dl
ENABLE_TESTING [yes]
TESTING ENABLED
— checking for one of the modules ‘check’
CMake Error at cmake/modules/FindPkgConfig.cmake:357 (message):
None of the required ‘check’ found
Call Stack (most recent call first):
cmake/modules/FindCheck.cmake:27 (PKG_SEARCH_MODULE)
CMakeLists.txt:73 (FIND_PACKAGE)

CMAKING mozilla-sync 0.1.7
— Configuring done

From what I can gather from this output, the configuration file was checking for dependencies, and got hung up on one called “check.” Unfortunately, this gave me zero information that I could use to solve the problem. I can verify that the install failed by running msynctool –listplugins, which returns:

Available plugins:
msynctool: symbol lookup error: msynctool: undefined symbol: osync_plugin_env_num_plugins

Ah, shit. Looks like I’m stuck again. Maybe one day I’ll figure it out. Until then, if any of our readers has ever seen something like this, I could use a couple of pointers.

  1. Tyler B
    October 6th, 2009 at 16:38 | #1

    You have dedication, I’ll give you that

  2. November 3rd, 2009 at 13:19 | #2

    Dear Jon F, Dear blog readers,

    It makes me really sad to see a post like this!

    blueZync is under development, is far from perfect, and contains bugs. It may work for you or it may not.

    However, blueZync *DOES* build if you follow the build instructions.

    As far as I can see, you did not (please correct me if I am wrong).

    Fist, you did not install the “check” package, although this was requested in the build instructions.

    Then where the build instructions tells you to use the provided scripts to download and build the correct version of OpenSync, plugins and prerequisites, you try with a very old version of OpenSync instead (although the referenced Compatibility page for blueZync clearly states that this does not work).

    Then you go on to pull sources and installation scripts from ANOTHER site, and install OpenSync, but apparently not the plugins. And it does not work.

    And all the way you got hints from the developer about what might have gone wrong, and how to fix it.

    May I suggest once again: Please try to build blueZync from the build instructions provided.

    This should work, and then we could – together – see how to root out any bugs that prevents blueZync to actually work for you!

    It would be great if you could report any problems – and any information helpful to solve the problems – over at the blueZync-developers forum,
    where we can pick it up and see what we can do about it.

    Good luck with The Linux Experiment!

    It is really a shame that you cannot sync your blackberry, and – even though not a single developer have stepped up to help – this is the kind of reason I am trying to provide blueZync to the Linux users!

    I don’t think you will find a solution somewhere else, so I guess it is the Linux way or the highway: help blueZync – please.

    Best regards
    /Henrik

    And yes, I am the developer of blueZync…

    PS: Thanks for pointing out the sid updating issue. I was not aware of this, but have now updated the build instructions to point out this problem.
    (It would have been welcome if you had pointed this out to the developer on the developers forum, though!)

    I appreciate that your problems to follow the build instructions may be caused by them not being clear enough.
    So I have tried to improve the build instructions a bit.
    If you have any further suggestions for improvements please don’t hesitate to post them at the blueZync-developers forum.

  3. Jon F
    November 3rd, 2009 at 14:32 | #3

    Henrik, thanks for all of the help that you’ve provided me with so far. I have a feeling that most of my problems have come from the fact that I’ve been installing OpenSync from their repository before installing from your scripts. It took some more careful reading of your installation instructions before I realized that your scripts actually take care of the OpenSync installation themselves.

    Overall, your packages and the help I’ve received on your forums have been fantastic, and most of my problems can be chalked up to my inexperience with Linux, with building, and with the process behind the sync operation.

    Thanks very much for your comment, and for all of your work on BlueZync. I have recently reinstalled my system (thus getting rid of all of the garbage that I installed), and will be attempting to get your code working again shortly.

    Sorry if I’ve come across as though I was disparaging your work on the software. Most of my comments were out of frustration with the process more than anything else.

  4. November 3rd, 2009 at 15:31 | #4

    Jon, Welcome to the Linux world!

    My experience is, that most things work much, much smoother that with Redmond software.

    However, when you come to “bleeding edge” development like blueZync, it may be a little bit difficult to get working ))-:

    In my experience, it works best if you FIRST follow the instructions to the letter, THEN venture into your own ways of doing it.

    If you have the time to read, I love this (25 years old, but still valid; just read the first few paragraphs):
    read a manual like a love letter – http://www.robelle.com/smugbook/manual.html

    Good luck with the experiment, and don’t hesitate to post on the blueZync-developers forum with questions or suggestions!

    That being said, I am afraid that you will run into
    https://sourceforge.net/tracker/?func=detail&aid=2891311&group_id=208811&atid=1007194
    but let’s worry about that later…

    /Henrik

  5. Jon F
    November 4th, 2009 at 09:44 | #5

    I will agree with things working smoother than they do on Windows in Linux. For me, a large part of this is the ability to install all of the programs that I want from the distribution repositories, and letting the package manager take care of dependencies and the like. As you have probably noticed, it’s when I go outside of the repositories that I get into trouble.

    The first few paragraphs of that response comparing manuals to love letters are excellent, and I would recommend that anybody else having trouble following instructions give them a read.

    As for that bug… I was hoping to use OpenSync as an intermediary between your Thunderbird plugin and the Barry project, which allows me to synchronize my phone via USB. I don’t even have a Bluetooth dongle. But as you say, we will worry about that when I get it installed.

  6. November 6th, 2009 at 17:09 | #6

    Getting outside the repositories is indeed a challenge!
    However, when what you need is not in the repositories, you can help the Open Souce community to get it there – just as you are doing over at the blueZync developers forum! I appreciate your efforts to get this to work!

    You “should” be able to use OpenSync with my plugin and the syncml plugin to sync over USB. I was just too lazy to implement the GUI for USB since I mainly use bluetooth. But if you don’t mind configuring osynctool manually, it should be doable.

  7. Jon F
    November 9th, 2009 at 09:50 | #7

    I’m hoping that I can, Henrik. So far, I’ve managed to get your plugin installed and visible from osynctool. I am, however, having trouble getting the Barry project installed on the same version of libopensync that your code uses.
    If there is one thing that the entire experience has taught me, it is that so far, while getting all of this stuff to work can be frustrating, most anything can be done through open sourced software. This is an exciting idea, and really gets me interested in becoming an open sourced developer. Although what you have accomplished so far is superb, I can see where it doesn’t yet service my needs as well as it could, and that makes me want to get involved and help out.

  1. November 5th, 2009 at 00:33 | #1