* cmake error at … library not found

Posted on December 30th, 2011 by Alex. Filed under Linux.


If you use cmake and have a library whose header files cannot be found, since you compiled your own library and put it somewhere where you can find it again, cmake will most likely abort with an error message like:

– Current HG revision is cf9be9344356
– Assuming this is a tarball (release) build for 2011.4.0
– Found wxWidgets: TRUE
– Found TIFF: /usr/include
– Found JPEG: /usr/include
– Found PNG: /usr/include
– WARNING: you are using the obsolete ‘PKGCONFIG’ macro use FindPkgConfig
– Found OPENEXR: /usr/lib/libImath.so;/usr/lib/libIlmImf.so;/usr/lib/libIex.so;/usr/lib/libHalf.so;/usr/lib/libIlmThread.so
– GLUT Found
– Found Glew:
CMake Error at CMakeModules/FindPANO13.cmake:76 (MESSAGE):
libpano13 version: 2.9.18 required, 2.9.14 found
Call Stack (most recent call first):
CMakeLists.txt:235 (FIND_PACKAGE)

(This comes from the compilation of hugin.) So how to tell cmake, where to find it? Open CMakeModules/FindPANO13.cmake in an editor of your choice. Somewhere at the beginning you can find an code snippet looking similar to this one:

FIND_PATH(PANO13_INCLUDE_DIR pano13/panorama.h
/usr/local/include
/usr/include
${SOURCE_BASE_DIR}/libpano13/include
${SOURCE_BASE_DIR}/libpano
${SOURCE_BASE_DIR}
)
FIND_LIBRARY(PANO13_LIBRARIES
NAMES pano13
PATHS ${SYSTEM_LIB_DIRS}
“${PANO13_INCLUDE_DIR}/pano13/Release LIB CMD”
“${PANO13_INCLUDE_DIR}/pano13/Release CMD/Win32″
${PANO13_INCLUDE_DIR}/pano13/Release
${SOURCE_BASE_DIR}/libpano13/lib
${SOURCE_BASE_DIR}/pano13
)

As you can see, a few standard directories are searched for the panorama.h file. If for whatever reason the library cannot be found, remember the name of the include path (here: PANO13_INCLUDE_DIR) and invoke cmake like in the following example:

cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DPANO13_INCLUDE_DIR=/path/to/your/library/

This should work.

.



* innovative designs in newer hostel block in iisc

Posted on December 4th, 2011 by Alex. Filed under IISc.


The scarcity of hostel rooms in IISc seems to be over. Slowly the “newer hostel complex” whose name is not yet known, is becoming operational and the first students moved into it. That gave me a chance to wander around in the block and to find some interesting and innovative designs.

For instance the latch which is suppose to lock the cabinet doors.

Key lost? No problem, screwdriver will help and even without damaging the lock.

In case you loose your keys, any screwdriver will do without damaging the lock. The latch is mounted in a way that if it is latched, it does not cover the plate with the screws. That would usually not be a problem since I do not know anybody using that latch anyway. However students are asked not to look the doors, since the furniture such as cots and desks, are not built up yet. So all personal belongings are in the cabinet and the room door is left open. On the contrary the security asks students to lock the doors even in case of a mother nature calls due to thefts. 1000 rooms and 1000 times the latch wrongly mounted. Dear carpenter, is it so difficult to use the brain to think for a second?

Have a look at the two images below. Find the 10 mistakes. :)

These rooms are just opposite. However you might have noticed that the space above the cabinet in the second room is just a rock solid wall. The problem is here that the room is something like 30 to 40 cm to long. Means the wall with the room door does not fall in line with the girder supporting the structure. Instead the space between girder and door is used to built in a larger window towards the hallway. But due to the girder no additional light nor fresh air will find their way into the room.

Since the gap above the cabinet and the girder would be very small (around 15 to 20cm in height), the additional space that is in the first room has been conveniently walled sealing something like 1 cubic meter of air behind the wall. Was this the intention of the architect (then why differently designed rooms and not all the same?) or did the planner wrongly estimated the lengths? That brings me to another thought: For the structural integrity of the building, should not girders always fall in line with walls for support? Maybe someone who is familiar with the subject, can shed some light on it?

But in the end, no one will care as usual. At least a major issue that was bothering people for years, has been solved and students finally get rooms on campus.

.



* clock project

Posted on November 4th, 2011 by Alex. Filed under Projects.


I was always fascinated by QlockTwo, but my wallet is not thick enough to shell out only $1100 for the least expensive version. It is a simple wall clock doing nothing but telling the time by illuminating letters which seem to randomly arranged in a grid. The clock updates the time every 5 minutes. If the time is e.g. 11:58 till 12:02, it shows simple “It is twelve o’clock”. Commonly if somebody is asked for the time and it is in the mentioned range, the reply would be the same: It’s twelve.

For less money QlockTwo is also available for iPad and Android operated phones and tabs. The price for the app is $0.99 plus a tab for around $400 to $500 (there are also less expensive ones, but honestly, if you have a tab, will you only use it as a clock?) sums up to around $500, which is half the price of the wall clock.

However there is one more option: Recently I got hold of a digital photo frame for around $40. Apart from photos taken from digital cameras, the idea is to generate images showing the time instead and let them run in a never ending slide show loop. So I implemented a program, generating the required images. Unfortunately the slide show mode does not allow to show the next image every 5 minutes, the closest interval is 1 minute. Hence I needed to generate 720 images for 12 hours. However, the digital photo frame shows the image for almost exactly 1 minute and transits to the next one. After the transition is completed, the countdown timer of 1 minute is restarted. The transition itself does not count. So, every transition the time was slow by round about 1.5 seconds. The transition could not be switched off. After a long trial I managed to get a very accurate timing (loosing something like 17 seconds per month), by removing and inserting certain images to compensate for the time loss during the transitions. In the end I needed 2770 files for 2 days.

However compared to the inspiring QlockTwo design, I can change the colors and even the background of the clock. Basically the options are limitless and I might add new languages in the future. Till then, I have a nice wall clock.

.



* bangalore east

Posted on October 23rd, 2011 by Alex. Filed under Cycle Tours.


After a long time I went on a cycle tour again. This time the east of Bangalore was explored for the first and definitely not for the last time. We started at around 5:30AM in the morning. It was just about to dawn with very less traffic on the roads. An hour later we reached the outskirts of Bangalore east wondering how easy that went. Memories came up about tours towards the south of Bangalore involving the crossing of Sultanpet which is already very busy at that time with lots of traffic and pollution.

Smooth roads led to Devangonthi from which we went north. The roads are excellent. However nearby to that stretch are some terminals for gas and petrol, hence many tank lorries speed on the roads even in the morning. We had a little break at a shrine on top of a lonely hill. Based on chicken feathers that were lying around, a bloody stone and a cooking place, it seemed the shrine also functioned as a kitchen for some non-veg food many times in the past.

We had breakfast in a shack next to SH-17. The food was good and we watched the cow in front of the shack being cleaned with brush and even soap. We met with NH-4 in Hoskote to go back to Bangalore through the northern villages. On NH-4 we met a motorbike rider asking why we cycle. We explained that we do it just for fun causing him to shake his head in disbelieve. He wondered why we cycle without having a motto or a theme.

Recently many people ride through India (even from Kashmiri to Kanyakumari) having some motto in mind. Some want to create awareness for eye donations, some for the medical situation in some rural villages. Although I really appreciate the initiatives, too many and not related to cycling will cause more good than harm in the end. If everybody goes cycling to create awareness, the real cases drown in the sheer amount of cycling awareness programs.

Although most of the roads were in excellent condition there were a few bumpy stretches, but nothing spectacular nor impossible to go with a road bike.

The route can be easily altered regarding the personal fitness. For instance, if you go north on SH 35 towards Kadugodi instead all the way east to Devangonthi, the trip is cut short by about 20km totaling in 65km (from IISc). If you want to go a little bit further, the next option is going north in NH207, adding another 10km. But also extensions to more than the 85km that are described here are possible. However that will be reported another time.

Distance of the tour: 85km

GPX files

 

.



* alemannia aachen t-shirt bought in chennai

Posted on October 10th, 2011 by Alex. Filed under India.


The guy’s name in the photo wearing the green t-shirt is Snehal. He bought the shirt some years ago in Chennai and he has never been to Germany or even to my hometown, Aachen. So far there is nothing surprising or special about it. However the t-shirt bares the logo of the local soccer (football) club of Aachen called Alemannia Aachen. So, how did the logo of a soccer club which is more or less successful in the German second league, come around half to globe to India?

.



* sbi – inter city charges

Posted on October 3rd, 2011 by Alex. Filed under Experiences with Companies, India.


My friend paid cash into my bank account maintained at the State Bank of India (SBI) IISc branch from an SBI branch that is not even 500m away. For that transaction I paid Rs.25 inter city charges. As far as I know, Mathikere is still in Bangalore. I complained to the IISc branch, but the lady at the desk told me that this is the new fee structure that came into affect on September 1st.

So paying in cash that generates revenue for the bank is now also charged to create even more revenue for the same bank. That makes transferring money between branches of different banks across the continent is much cheaper (current cost Rs. 5, NEFT) than at the branch of the same bank just around the corner. Many people in various platforms and forums started to complain about this new fee structure giving all details about their transactions. What happens, if I pay let’s say Rs.1 into a more or less randomly selected bank account (e.g. one of the poor chaps in the forum). Will they also deduct Rs.25? For me it cost only Rs.1 which I have plenty of (just yesterday a neighbor gave me Rs.575 in coins which he collected over the year). But how many Rs.24 has the receiver? Does anybody have the bank account number of the SBI CEO?

.



* shutdown script

Posted on September 29th, 2011 by Alex. Filed under Linux.


If computers are not in use, I would like to shut dem down automatically to save power and also to extend the lifetime of the hardware (especially mechanical HDD). Many users forget or are too lazy to shut down their machines, when they e.g. leave their office. That is why I wrote this little script that can be executed as a cronjob as root.

It will not shut down the computer, if one of the following conditions are met:

  1. There exists is a file called dontShutdown in /tmp
  2. Users are logged in
  3. Any screen sockets exist.
  4. The load on the machine is more than 20% (of one core/CPU)

You can comment/decomment the if conditions in the script accordingly. The reason to include the last condition was to ensure, that the computer is shut down, if it is idle, since I have the habit of not terminating screen sessions. However, if you e.g. download a big file in a screen session, which does not require many CPU resources, then the computer is also shut down. Similar, if you decrease the load of the CPU to such a low level that e.g. service which come sporadically into life, cause a short necessity of CPU resources, the machine is never shut down. Adjust the parameters according to you needs. After that, ensure that the script is executed periodically by e.g. putting it into the cron of the root user (here every 30 minutes):

30 * * * * /root/shutDownIfUnused.sh > /dev/null 2>&1

License

The annoying legal part: Do whatever you want with the file.

Download

.



* welcome to the future (in india)

Posted on September 27th, 2011 by Alex. Filed under India.


The manufacturing date of these chips is in the future.

.



RSS Feeds:

Search:


Pages:

Categories:

Archives: