As of 2016-02-26, there will be no more posts for this blog. s/blog/pba/
Showing posts with label 64-bit. Show all posts

I couldn't believe that Adobe just released/resumed 64bit Flash player (2010-09-15).


And, the performance for video has improved significantly, I could watch 720p video in fullscreen mode on YouTube smoothly, though one core (1.833 Core 2 Duo) consumes at 100%.

And it's not only for Linux this time, but also available for Windows and Mac users.

Great job, Adobe!

(Ship pure/true 64-bit apps as Adobe does, you other companies!)

A few hours ago, Gmail announced a new video and chat plugin for Linux users. I am a 64-bit user, pure one, there is no 32-bit library on my system. I wasnt going to try because 1) I am not into online IM chatting not to mention this voice and video chatting and 2) I dont believe that Google would release a 64-bit stuff.

But you know curiosity killed the cat, so I went to download, just to file to find out if they are 64-bit build or just 32-bit as my expectation. I ran

ar -x google-talkplugin_current_amd64.deb
tar xf data.tar.gz
cd opt/google/talkplugin

Now, its about to see the truth:

% file * */*
GoogleTalkPlugin:         ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.8, stripped
cron:                     directory
lib:                      directory
libnpgoogletalk64.so:     ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
libnpgtpo3dautoplugin.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
cron/google-talkplugin:   POSIX shell script text executable
lib/libCg.so:             ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped
lib/libCgGL.so:           ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, stripped</pre>

(Side note: you can see there is a cron, Google installs a cron job to update .deb package, so this plugin would never get outdated. I really can not agree with this automatic method. (I assume that its automatic, I didnt read that script))

I was shocked, twice! First shock was there did have 64-bit shared library and the second shock was why the hell this GoogleTalkPlugin is a 32-bit build? I couldnt understand. As far as I know, the browser plugin uses shared library, so that 32-bit stuff shouldnt be a problem, it must be some kind of desktop manager for the plugin, its worth trying. (I was wrong. :()

So, I tried to install it:

chmod +x *.so lib/*.so
cp *.so ~/.mozilla/plugins/
sudo cp lib/* /usr/lib64/

I installed them in Mozillas (Firefoxs) plugin directory, so Chromium can also use it. After restarted browser, I got a good sign from Chromium and Firefox.

http://farm5.static.flickr.com/4078/4909533786_c24758bf5c_z.jpg
http://farm5.static.flickr.com/4075/4908936395_89c9ce9cef_z.jpg

So, I recompiled my kernel with required modules. Rebooted, got into Gmail in Chromium, went to setting. Nothing!? Switched to Firefox, still nothing.

Then, I ran Chromium from command-line, I got this log:

[000:017] Warning(clientchannel.cc:583): Unreadable or no port file.  Could not initiate GoogleTalkPlugin connection
[000:022] Warning(clientchannel.cc:439): Could not initiate GoogleTalkPlugin connection
[000:022] Warning(optionsfile.cc:22): Load: Could not open file
[000:022] Warning(clientchannel.cc:553): Failed to get GoogleTalkPlugin path. Trying default.
[000:025] Started GoogleTalkPlugin, path=/opt/google/talkplugin/GoogleTalkPlugin
[000:025] Waiting for GoogleTalkPlugin to start...
[001:098] Warning(clientchannel.cc:583): Unreadable or no port file.  Could not initiate GoogleTalkPlugin connection
[001:099] Warning(clientchannel.cc:439): Could not initiate GoogleTalkPlugin connection
[001:099] Waiting for GoogleTalkPlugin to start...
[002:190] Warning(clientchannel.cc:583): Unreadable or no port file.  Could not initiate GoogleTalkPlugin connection
[002:191] Warning(clientchannel.cc:439): Could not initiate GoogleTalkPlugin connection
[002:191] Waiting for GoogleTalkPlugin to start...

I could only say !#$%^, Google!

If your system is multilib, I think you have good chance to get it running, just move that 32-bit stuff to /opt/google/talkplugin/GoogleTalkPlugin.

Google, please re-build GoogleTalkPlugin for 64-bit! Pretty please?

I created a new blog on WordPress.com, then I felt the dashboard is really really slow. I hoped the Google Gears can improve speed a lot.

Checkout from repository
$ svn checkout http://gears.googlecode.com/svn/trunk/ gears-read-only
$ cd gears-read-only

Patching

There is an patch in this comment. However this patch would not work with more efforts, because it still use the Gecko comes with repository and that Gecko in subversion has 32-bit binary stuff, we need the 64-bit binary of Gecko (aka. XULRunner), you can install it on Fedora using yum install xulrunner-devel.x86_64.

My patch for r3234 (include exact same patch from that comment and comment out line 1195 of gears/tools/rules.mk) for Fedora 10 x86_64 can be downloaded in my comment on that issue.

You can patch by running
patch -p0 < r3234-64bit.patch

Copying 64-bit binary

Starting building process by running
cd gears
make BROWSER=FF3

The process will be stopped with the following error message:
/usr/bin/ld: skipping incompatible ../third_party/gecko_1.9/linux/gecko_sdk/lib/libxpcom.so when searching for -lxpcom
/usr/bin/ld: cannot find -lxpcom
collect2: ld returned 1 exit status
make[1]: *** [bin-opt/linux-x86_64/ff3/libgears.so] Error 1
make: *** [default] Error 2
 [ 2 ] livibetter@dfed ~/var/src/gea/gears > file ../third_party/gecko_1.9/linux/gecko_sdk/lib/libxpcom.so
../third_party/gecko_1.9/linux/gecko_sdk/lib/libxpcom.so: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, not stripped

Now we need to do the follows:
cp /usr/lib64/xulrunner-sdk-1.9/sdk/lib/libxpcom.so ../third_party/gecko_1.9/linux/gecko_sdk/lib/libxpcom.so
cp /usr/lib64/xulrunner-sdk-1.9/sdk/lib/libxpcomglue_s.a ../third_party/gecko_1.9/linux/gecko_sdk/lib/libxpcomglue_s.a
cp /usr/lib64/xulrunner-sdk-1.9/sdk/lib/libxul.so ../third_party/gecko_1.9/linux/gecko_sdk/lib/libxul.so
cp /usr/lib64/xulrunner-1.9/xpt_link ../third_party/gecko_1.9/linux/gecko_sdk/bin/xpt_link
chmod +x ../third_party/gecko_1.9/linux/gecko_sdk/bin/xpt_link

Build again, you should have no problem this time.

Packaging XPI installer

Packing can be done by running
make installers

The XPI should be generated under gears/bin-opt/installers.

You can download it here.

Testing

There are few demos that you can try out. I got no errors when ran them.

Firstly, I only took 9 days to get approved by Woopra, some posts on the forums say that may take weeks.



Installing Woopra on Linux is simple and it is a graphical process. Look at the screenshot below.

You can download the installer here and install it with sh woopra.sh. I installed it at my home pathes: /home/username/lib/Woopra for Woopra program, and /home/username/bin for symbolic link.



When I tried to run it, I got an error:

 
My JRE is from Sun and it's 64 Bit, you can check yours by running java -version, which outputs like:

java version "1.6.0_06"

Java(TM) SE Runtime Environment (build 1.6.0_06-b02)

Java HotSpot(TM) 64-Bit Server VM (build 10.0-b22, mixed mode)
The solutions are two, both are easy. First one is to remove sun-java6-bin package and install ia32-sun-java6-bin package.



Second one is easy, too, and better. Install ia32-sun-java6-bin package, first. Then test with this newly install 32 bit JRE with

INSTALL4J_JAVA_HOME_OVERRIDE=/usr/lib/jvm/ia32-java-6-sun/jre Woopra
This forces the startup script, /home/username/bin/Woopra in my case, to use specified Java JRE not the one that it can find on your system.



Once Woopra runs successfully and with no error, close it. Find the startup script, if you don't know where it is, you can run whereis Woopra or type Woopra (in Bash). If none of both get result, use find / -name Woopra.



Find it, and open it with editor, and put the following line at second line (an empty line):

INSTALL4J_JAVA_HOME_OVERRIDE=/usr/lib/jvm/ia32-java-6-sun/jre
Now, simply run Woopra in terminal or from main menu.



Here is a screenshot after logging in:

Skype provides Ubuntu or Debian 32bit package, but I have a small problem with it. The avatar doesn't show up, there must be a library missing. Skype didn't output any errors, therefore I have no clue to know. By installing the static, the problem is solved naturally. I installed in this way
mkdir -p ~/{lib,bin}
cd ~/lib
wget http://skype.com/go/getskype-linux-static
tar xf skype*
cd skype*
ln -sv ~/lib/skype*/skype ~/bin
I created an application launcher in GNOME with command like
skype --resource=/home/username/lib/skype_static-2.0.0.72
I know Ubuntu uses multilib, but not sure how to install a 32bit package via apt-get. On Fedora with Yum, you only need to append .i686 to package name, or any other arch.