Note

The Funtoo Linux project has transitioned to "Hobby Mode" and this wiki is now read-only.

Difference between revisions of "Googleearth panaramio fix"

From Funtoo
Jump to navigation Jump to search
(original creation of googleearth panaramio fix)
 
m (fix panoramio misspellings-if you don't trash this page, can u fix title? thx)
 
Line 1: Line 1:
== Introduction ==
== Introduction ==
Since version 7.x of GoogleEarth the panaramio function has been broken.  This is not Funtoo specific, all Linux distributions suffer from it.  It is caused by the bundled qt-libs.  This can be repaired by forcing GoogleEarth to use the native Funtoo qt-libraries.
Since version 7.x of GoogleEarth the panoramio function has been broken.  This is not Funtoo specific, all Linux distributions suffer from it.  It is caused by the bundled qt-libs.  This can be repaired by forcing GoogleEarth to use the native Funtoo qt-libraries.


== Prerequisites ==
== Prerequisites ==
Line 83: Line 83:




  7.  At least at this location, panaramio and much of GoogleEarth works only with qtgraphicssystem=native.   
  7.  At least at this location, panoramio and much of GoogleEarth works only with qtgraphicssystem=native.   
     There are a few ways to do this.  One is to permanently choose it:
     There are a few ways to do this.  One is to permanently choose it:



Latest revision as of 02:10, April 8, 2014

Introduction

Since version 7.x of GoogleEarth the panoramio function has been broken. This is not Funtoo specific, all Linux distributions suffer from it. It is caused by the bundled qt-libs. This can be repaired by forcing GoogleEarth to use the native Funtoo qt-libraries.

Prerequisites

You need the following up to date packages installed on your system:

  • media-libs/freeimage
  • dev-qt/qtcore
  • dev-qt/qtgui
  • dev-qt/qtwebkit

Procedure

1.  If not already installed, install GoogleEarth:


root ##i##echo "=sci-geosciences/googleearth-7.(current version)">>/etc/portage/package.unmask
root ##i##echo "=sci-geosciences/googleearth-7.(current version)">>/etc/portage/package.accept_keywords
root ##i##echo ">=sci-geosciences/googleearth-7.(current version) googleearth">>/etc/portage/package.license
root ##i##emerge -av sci-geosciences/googleearth


2.  In GoogleEarth's running directory /opt/googleearth, remove the 4 original libQt* libraries and save them in a new directory:


root ##i##cd /opt/googleearth
root ##i##mkdir bundled-qtlib
root ##i##mv libQt* bundled-qtlib/


3.  If you invoke googleearth now, you will get the known error:
    ./googleearth-bin: symbol lookup error: ./libbase.so: undefined symbol: _Z34QBasicAtomicInt_fetchAndAddOrderedPVii
    The missing function can be generated by creating a file in /opt/googleearth (call it baifaao.cpp) with this content:


root ##i##/* /opt/googleearth/baifaao.cpp */
root ##i###include <QtCore/QAtomicInt>
root ##i##extern "C" {
root ##i##	int _Z34QBasicAtomicInt_fetchAndAddOrderedPVii(QAtomicInt* a, int b) {
root ##i##		return a->fetchAndAddOrdered(b);
root ##i##	}
root ##i##}


4.  Compile it and create the shim library with the following command line:


root ##i##gcc -I/usr/include/qt4 -O3 -fPIC --shared baifaao.cpp -o baifaao.so


5.  In the file googleearth (in the directory /opt/googleearth), add the following line, e.g. before the line starting with LD_LIBRARY_PATH:


root ##i##export LD_PRELOAD=/usr/lib64/libfreeimage.so.3:/opt/googleearth/baifaao.so


x86 32 bit users should use:


root ##i##export LD_PRELOAD=/usr/lib/libfreeimage.so.3:/opt/googleearth/baifaao.so


6.  If the locale bug in the QT libs is not patched it may cause a major coordinate shift if the locale is not en_US.UTF-8. 
    If it is still present with your locale, add also:


root ##i##export LC_NUMERIC=en_US.UTF-8


7.  At least at this location, panoramio and much of GoogleEarth works only with qtgraphicssystem=native.  
    There are a few ways to do this.  One is to permanently choose it:


root ##i##eselect qtgraphicssystem set native


Or if you choose to primarily run another setting with qtgraphicssystem you can use the following approach:


root ##i##cp /usr/share/applications/google-earth.desktop /home/<username>/.local/share/applications
root ##i##cd /home/<username>/.local/share/applications
root ##i##chown <username>: google-earth.desktop


Now edit google-earth.desktop with your favorite editor, changing the line beginning with "Exec" as follows:


root ##i### old line:
root ##i###Exec=/opt/googleearth/googleearth %f
root ##i### new line:
root ##i##Exec=env QT_GRAPHICSSYSTEM=native /opt/googleearth/googleearth %f


Or I find this works well on nvidia:


root ##i##Exec=env XLIB_SKIP_ARGB_VISUALS=1 QT_GRAPHICSSYSTEM=native /opt/googleearth/googleearth %f


Whew! Take a breather and enjoy some of those photos from exotic locales :)


   Much of the content of this page is a derivative of comments on a Gentoo bug on this specific subject.
   It can be found at: https://bugs.gentoo.org/show_bug.cgi?id=490066