Difference between pages "Googleearth panaramio fix" and "User:FabioBeneditto"

(Difference between pages)
m (fix panoramio misspellings-if you don't trash this page, can u fix title? thx)
 
(Anyone here?)
 
Line 1: Line 1:
== Introduction ==
+
{{Person
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.
+
|Full name=Fabio Beneditto
 +
|Email=kamikazenh@gmail.com
 +
|Nick=kamikazenh
 +
|Geoloc=-29.601221, -51.183811
 +
|Location name=Ivoti, Rio Grande do Sul, Brazil
 +
|Roles={{Role
 +
|Role type=User
 +
|Role desc=Intermediate Linux User
 +
|Start date=2014/04/08
 +
}}
 +
|Blogs=
 +
}}
 +
:wq!
  
== Prerequisites ==
+
Fabio Beneditto
You need the following up to date packages installed on your system:
+
"A vida é mais bela quando vista de cima de uma motocicleta"
* '''media-libs/freeimage'''
+
"A hacker does for love what anyone will do for money"
* '''dev-qt/qtcore'''
+
* '''dev-qt/qtgui'''
+
* '''dev-qt/qtwebkit'''
+
 
+
== Procedure ==
+
1.  If not already installed, install GoogleEarth:
+
 
+
 
+
<console>
+
##i##echo "=sci-geosciences/googleearth-7.(current version)">>/etc/portage/package.unmask
+
##i##echo "=sci-geosciences/googleearth-7.(current version)">>/etc/portage/package.accept_keywords
+
##i##echo ">=sci-geosciences/googleearth-7.(current version) googleearth">>/etc/portage/package.license
+
##i##emerge -av sci-geosciences/googleearth
+
</console>
+
 
+
 
+
2.  In GoogleEarth's running directory /opt/googleearth, remove the 4 original libQt* libraries and save them in a new directory:
+
 
+
 
+
<console>
+
##i##cd /opt/googleearth
+
##i##mkdir bundled-qtlib
+
##i##mv libQt* bundled-qtlib/
+
</console>
+
 
+
 
+
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:
+
 
+
 
+
<console>
+
##i##/* /opt/googleearth/baifaao.cpp */
+
##i###include <QtCore/QAtomicInt>
+
##i##extern "C" {
+
##i## int _Z34QBasicAtomicInt_fetchAndAddOrderedPVii(QAtomicInt* a, int b) {
+
##i## return a->fetchAndAddOrdered(b);
+
##i## }
+
##i##}
+
</console>
+
 
+
 
+
4.  Compile it and create the shim library with the following command line:
+
 
+
 
+
<console>
+
##i##gcc -I/usr/include/qt4 -O3 -fPIC --shared baifaao.cpp -o baifaao.so
+
</console>
+
 
+
 
+
5.  In the file googleearth (in the directory /opt/googleearth), add the following line, e.g. before the line starting with LD_LIBRARY_PATH:
+
 
+
 
+
<console>
+
##i##export LD_PRELOAD=/usr/lib64/libfreeimage.so.3:/opt/googleearth/baifaao.so
+
</console>
+
 
+
 
+
 
+
x86 32 bit users should use:
+
 
+
 
+
 
+
<console>
+
##i##export LD_PRELOAD=/usr/lib/libfreeimage.so.3:/opt/googleearth/baifaao.so
+
</console>
+
 
+
 
+
 
+
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:
+
 
+
 
+
<console>
+
##i##export LC_NUMERIC=en_US.UTF-8
+
</console>
+
 
+
 
+
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:
+
 
+
 
+
<console>
+
##i##eselect qtgraphicssystem set native
+
</console>
+
 
+
 
+
Or if you choose to primarily run another setting with qtgraphicssystem you can use the following approach:
+
 
+
 
+
 
+
<console>
+
##i##cp /usr/share/applications/google-earth.desktop /home/<username>/.local/share/applications
+
##i##cd /home/<username>/.local/share/applications
+
##i##chown <username>: google-earth.desktop
+
</console>
+
 
+
 
+
Now edit google-earth.desktop with your favorite editor, changing the line beginning with "Exec" as follows:
+
 
+
 
+
<console>
+
##i### old line:
+
##i###Exec=/opt/googleearth/googleearth %f
+
##i### new line:
+
##i##Exec=env QT_GRAPHICSSYSTEM=native /opt/googleearth/googleearth %f
+
</console>
+
 
+
 
+
Or I find this works well on nvidia:
+
 
+
 
+
<console>
+
##i##Exec=env XLIB_SKIP_ARGB_VISUALS=1 QT_GRAPHICSSYSTEM=native /opt/googleearth/googleearth %f
+
</console>
+
 
+
 
+
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
+

Revision as of 11:57, April 9, 2014

Fabio Beneditto

Contact

freenode: kamikazenh

Location

Loading map...
Ivoti, Rio Grande do Sul, Brazil (-29° 36' 4.3956", -51° 11' 1.7196")


wq!

Fabio Beneditto "A vida é mais bela quando vista de cima de uma motocicleta" "A hacker does for love what anyone will do for money"