qtcreator-collec2-ld-returned-1-exit-status

September 14th, 2009 Ali Abbas No comments

When facing this error…

manually cd into the project QT folder and run “make”… ld would return the library name it isn’t able to locate.

Example:

ali@laptop:~/Documents/Dev/QT-Progs/Test$ make
g++ -Wl,-rpath,/opt/qtsdk-2009.03/qt/lib -o Test main.o testhello.o moc_testhello.o    -L/opt/qtsdk-2009.03/qt/lib -lQtGui -L/opt/qtsdk-2009.03/qt/lib -L/usr/X11R6/lib -pthread -lfreetype -lgobject-2.0 -lSM -lICE -pthread -pthread -lXrender -lfontconfig -lXext -lX11 -lQtCore -lm -pthread -lgthread-2.0 -lrt -lglib-2.0 -ldl -lpthread
/usr/bin/ld: cannot find -lfreetype
collect2: ld returned 1 exit status
make: *** [Test] Error 1

Note the “cannot find -lfreetype”.. now note it can be any other library, depending on your current system configuration.

In most cases, install the devel package associated with this library.

Debian/Ubuntu “apt-get install libfreetype6-dev” for example.

Now, re-run the “make” and observe for further errors…

Categories: Unix / Linux

Cisco IOS hidden tools

August 26th, 2009 Ali Abbas No comments

Hello there,

Just a quick overview over a couple of cisco hidden command useful in certain circumstances

1. ttcp

ttcp is only available on routers/layer 3 switches (of course ;-) )

For those familiar with iperf, ttcp is a kinda”ish” iperf

Start ttcp on one router in point 2 point scenario and ttcp on the other endpoint. One router will be in receiving mode, while the other will be in sending mode… running the command is quite straight forward, thus I will not demonstrate it here.

2. test crash

Ok this used to be hidden, but isn’t in newer IOS version. Test crash allows to simulate a crash.. so you came to the office one morning and found your switch dead… not log, not knowing what happened. test crash can help you dig into the problem by simulating the crash

3. test transmit

This is a very cool feature :-D (ah I love cisco :) ). You can simulate traffic to interfaces, using specific encapsulations and protocols…

4. ip route profile and show ip route profile

Used in conjonction, this “debug” command enables you to see route fluctuation.

5. csim start “number”

This emulates a voice call to the specified number… practical for VoIP testing environment.

6. show controller switch

Need to get a quick overview on your switch traffic stats. Suspect a congestion network? show controller switch will give you the quick heads up on where you stand

7. debug ip osfp monitor

This command enables you to monitor the OSPF SPF process

8. ip-con 2 con

Available on cisco 7500… it enables you to enter the VIP console to execute VIP commands on VIP boards

9.  ip osfp interface retry <X>

Back to OSPF :) (the coolest routing protocol), by default OSPF pools retry on the interface 10 times… having too much fluctuation of states on the interface of your router? increase the pooling period.

10. show region

Displays how the memory is partitioned on the device


Categories: Cisco, Networking

Check your IP periodically with a small shell script

July 2nd, 2009 Ali Abbas No comments

For those who are subject to dynamically assigned DSL IP, you would probably be familiar with a site such as http://myip.dk

Here is a small script I use to fetch my public IP for other script processes

updated “due to changes on the site myip.dk, I rewrote the script”

#!/bin/bash

link=`lynx -dump -listonly ‘http://myip.dk’ | awk -F: ‘/myip.dk/ && $0 != “” { getline; print $0}’ | awk -F ” ” {‘print $2′}`
curl -s $link | grep ‘”Box”‘ | egrep -o ‘[0-9.]+’

curl -s en.myip.dk | grep ‘”Box”‘ | egrep -o ‘[0-9.]+’

You may run it in a cron and email you your IP whenever it changes from the last fetch one and update your firewall rules accordingly…

Cheers,

Categories: Bash, Programming

How to install Acrobat Reader on Centos

June 17th, 2009 Ali Abbas 2 comments

1. go to acrobat.com/reader

2. download the bin linux install file

3. chmod +x AdbeRdr9.1.1-1_i486linux_enu.bin

4. ./AdbeRdr9.1.1-1_i486linux_enu.bin

Extracting files, please wait. (This may take a while depending on the configuration of your machine)

This installation requires 144 MB of free disk space.

Enter installation directory for Adobe Reader 9.1.1 [/opt]

(press enter)

The installation will therefore go on

Installing platform independent files … Done
Installing platform dependent files … Done
Setting up libraries … Done
Setting up desktop and menu icons … Done
Setting up the browser plugin … Done

And that’s it

Categories: Redhat/Centos

The Good Life

June 12th, 2009 Ali Abbas 1 comment

A little cartoon video, to reflect a tiny bit on what a good life is

Categories: General