Category Archives: Linux

Writing portable code Linux/Windows

One: never name a anything as ‘small‘. Why? This is defined under RpcNdr.h header file:
#define small char;

Two: never name a anything as ‘FindText‘. Why? This is defined under CommDlg.h header file:
#ifdef UNICODE
#define FindText FindTextW
#else
#define FindText FindTextA
#endif // !UNICODE

Three: if you use ‘__PRETTY_FUNCTION__‘ with GCC prepare that is not part of C++ standard! But you can use the following define:
#ifdef _MSC_VER
#define __PRETTY_FUNCTION__ __FUNCSIG__
#endif

http://msdn.microsoft.com/en-us/library/b0084kay%28v=vs.80%29.aspx

Four: Visual Studio does not like the use of ‘log10()‘ math function passing an int without explicitly casting it:
int foo;
int bar = 100;
foo = log10(bar);

needs to be something like:
int foo;
int bar = 100;
foo = log10((float)bar);

Five: again Visual Studio does not like the use of another math function like ‘pow()‘ passing (double, uint) without explicitly casting it:
double foo(10.0);
uint bar(2);
pow(foo, bar);

needs to be:
double foo(10.0);
uint bar(2);
pow(foo, (int)bar);

I hope this helped someone, do you have more? Drop a comment!

Amarok 2.5 leaks just a ‘bit’


Since Amarok 2.x I started to hate how they ruined the awesome user-interface that 1.4 had. But would be only for the interface… problem is buggy as hell too!
Amarok devs, please, hire some good UI interaction designer and with the saved time fix the *real* bugs that you’re so good at!

EDIT:
I am not alone: https://bugs.kde.org/show_bug.cgi?id=298627

EDIT2:
Happened again, here is the video!

A-Link USB WiFi adapter with RTL8192U 802.11n works with Linux

Thanks to “chili555” from the Ubuntu forum I can say that this chip worked on Ubuntu 11.10 – 32 bit kernel 3.0:
Bus 001 Device 003: ID 0bda:8192 Realtek Semiconductor Corp. RTL8192U 802.11n Wireless Adapter

To make it work you need to copy a firmware from another similar chip, here are the needed commands:
sudo mkdir /lib/firmware/RTL8192U
sudo cp /lib/firmware/RTL8192E/* /lib/firmware/RTL8192U
sudo modprobe -rfv r8192u_usb
sudo modprobe -v r8192u_usb

librmagick-ruby for Ubuntu Lucid (32 bit) with DestroyConstitute missing symbol fixed

If you suffer of this bug and you are tired to wait that Ubuntu’s package manager realize what a monster has packaged for an LTS release then grab this file:

librmagick-ruby_2.11.1-1ubuntu0.1.1_i386

See LP bug #539106

If you want a newer version you can use the 2.13.0 packaged here:
http://www.marcocimmino.net/2010/05/04/librmagick-ruby_2-13-0-2-for-ubuntu-lucid-10-04/

Krusader 2.2.0-beta1 “DeKade” for Ubuntu Lucid 10.04 32 bit


You like it… but nobody packaged it? Here we go. I took source code from krusader.org and debian rules from Debian Testing 2.1.0-beta1 package, changed one line under /debian/krusader.install and here we are!

USE IT AT YOUR OWN RISK!

krusader_2.2.0~beta1-1_i386.deb

krusader-dbg_2.2.0~beta1-1_i386.deb

libneon27-gnutls_0.28.6-1_i386 for Ubuntu Lucid 10.04

Few minutes after my first issue with the newest Ubuntu Lucid 10.04 and now already the second using subversion: Debian bug #548773

Certificate verification error: signed using insecure algorithm

The only workaround I found is to downgrade to libneon27-gnutls 0.28.6 that I have taken from Kubuntu Karmic and compiled for you. ENJOY!!!

WARNING: Use this at your own RISK, I’m not responsible for any damages!

libneon27-gnutls_0.29.0-1really0.28.6-1_i386.zip
for Ubuntu 10.04 32 bit

librmagick-ruby_2.13.0-2 for Ubuntu Lucid 10.04

I just upgraded to the newest Kubuntu Lucid 10.04 and here we go the first regression, I can’t compile anymore “my” software.
Here is the error:

This installation of RMagick was configured with ImageMagick 6.5.5 but ImageMagick 6.5.7-8 is in use.

So I immediately searched through Launchpad and found that there is already a bug report about that: Bug #518122
That refers to an already fixed bug on Debian bug tracker: Bug #557778

So I just grabbed the Debian testing sources for librmagick-ruby_2.13.0-2 lowered one dependencies and finally compiled under my Lucid aaaaaand here we go, the zip package containing all debs you need to fix this issue! ENJOY!!!

WARNING: Use this at your own RISK, I’m not responsible for any damages!

librmagick-ruby_2.13.0-2_i386.zip for Ubuntu 10.04 32 bit