Difference between pages "Googleearth panaramio fix" and "Package:Ntp"

(Difference between pages)
(original creation of googleearth panaramio fix)
 
m (hw clock info from gentoo)
 
Line 1: Line 1:
== Introduction ==
+
{{Ebuild
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.
+
|Summary=Network Time Protocol suite/programs
 +
|CatPkg=net-misc/ntp
 +
|Homepage=http://www.ntp.org/
 +
}}
  
== Prerequisites ==
+
=== Installation ===
You need the following up to date packages installed on your system:
+
{{console|body=
* '''media-libs/freeimage'''
+
###i## emerge net-misc/ntp
* '''dev-qt/qtcore'''
+
}}
* '''dev-qt/qtgui'''
+
* '''dev-qt/qtwebkit'''
+
  
== Procedure ==
+
=== Configuration ===
1.  If not already installed, install GoogleEarth:
+
==== Client ====
  
 +
===== Hardware Clock =====
 +
To write your NTP sync time to the hardware at shutdown, and read hw clock at start.
  
<console>
+
{{console|body=
##i##echo "=sci-geosciences/googleearth-7.(current version)">>/etc/portage/package.unmask
+
###i## echo 'clock_hctosys="YES"' >> /etc/conf.d/hwclock
##i##echo "=sci-geosciences/googleearth-7.(current version)">>/etc/portage/package.accept_keywords
+
###i## echo 'clock_hctosys="YES"' >> /etc/conf.d/hwclock
##i##echo ">=sci-geosciences/googleearth-7.(current version) googleearth">>/etc/portage/package.license
+
###i## rc-service hwclock restart
##i##emerge -av sci-geosciences/googleearth
+
###i## rc-update add hwclock boot
</console>
+
}}
  
 +
==== Server ====
  
2.  In GoogleEarth's running directory /opt/googleearth, remove the 4 original libQt* libraries and save them in a new directory:
+
=== Runtime ===
 +
{{console|body=
 +
###i## rc-update add ntpd
 +
###i## rc-update add ntp-client
 +
###i## rc
 +
}}
  
 
+
{{EbuildFooter}}
<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, panaramio 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 10:04, January 6, 2015

net-misc/ntp


Source Repository:Gentoo Portage Tree
Homepage

Summary: Network Time Protocol suite/programs

Use Flags

openntpd
Allow ntp to be installed alongside openntpd
parse-clocks
Add support for PARSE clocks
samba
Provide support for Samba's signing daemon (needed for Active Directory domain controllers)

News

Drobbins

How We're Keeping You At the Center of the Funtoo Universe

Read about recent developments that keep you, our users, at the forefront of our focus as Funtoo moves forward.
10 April 2015 by Drobbins
Mgorny

New OpenGL management in Funtoo

Funtoo is switching to an improved system for managing multiple OpenGL providers (Mesa/Xorg, AMD and NVIDIA). The update may involve blockers and file collisions.
30 March 2015 by Mgorny
Drobbins

Subarch Profiles are coming...

Subarch profiles are on their way! Learn more here.
29 March 2015 by Drobbins
View More News...

Ntp

Tip

This is a wiki page. To edit it, Create a Funtoo account. Then log in and then click here to edit this page. See our editing guidelines to becoming a wiki-editing pro.


Installation

# emerge net-misc/ntp


Configuration

Client

Hardware Clock

To write your NTP sync time to the hardware at shutdown, and read hw clock at start.

# echo 'clock_hctosys="YES"' >> /etc/conf.d/hwclock
# echo 'clock_hctosys="YES"' >> /etc/conf.d/hwclock
# rc-service hwclock restart
# rc-update add hwclock boot


Server

Runtime

# rc-update add ntpd
# rc-update add ntp-client
# rc