It is time again. In the coming week, there will be the last lectures for some time. Although I like giving lectures, it is fun, and I believe I am good at it. Nevertheless, I am looking forward to get rid of this part of my work again. At least for a little while. So, I can focus again on all the other unfinished issues on my desk, and there are a lot. For example, the release of the next version of MegaMol should have happened two weeks ago. I have to work on my upcoming paper projects. And, of course, the development of MegaMol needs to go further for future projects.

Yesterday I tried to write yet another “nothing new” post, following my normal posting schedule. However, due to some reasons I completely don’t understand, I could not log into my admin dashboard. I tried everything on the login troubleshooting guide, until I reached “If everything else fails…” Luckily, it then was late, I was tired and I did not want to try anything else.

And today, everything works fine again. … WTF …

Why is software so unreliable, and why does software these days fails so silently and so elusively?

It is unbelievable nice to do nothing for some extended time. Obviously, I needed that.

And, in fact, I am looking forward to preparing the upcoming lecture term.

 

Updating WordPress is kind of pain. I can completely understand why many people do never update their (non-personal) sites. This is not a large WordPress installation. One site, roughly half a dozen plugins, one theme, and that is it. Nevertheless, today I made the effort to back up the data base and files and to update everything. Two plugins failed to work properly afterwards and it took me two hours to fix everything. However, don’t get me wrong. The heaviest problems I got did not originate from one of the plugins itself, but from the way I used it. Meaning, it was my own fault. Still, a pain.

A few weeks ago I wrote about my experience with VirtualBox and hardware-accelerated OpenGL using an Ubuntu guest OS. This post here is an errata.

The downgrade of the GuestAdditions only downgraded the driver of the virtualized graphics card that much, that OpenGL had to fall back to a pure software rasterizer. Thus, this is no solution at all.

With a current GuestAdditions OpenGL works somewhat. However, it does not work very well. You only have to do something in the grey area and everything crashes (including VirtualBox itself if you are lucky). For example, the Freegut usually available as installation packages in version 2.8 does not work at all. The current release candidate in version 3, however, does work.

Honestly, I have no idea if the whole thing works at all. The frame rates are not convincing. To conclude: this is not a solution and for sure not a replacement for a real computer with real hardware and a real installation. Sad.

Life is not easy as a multi-platform developer. This was the main reason for projects like VISlib and the now dead and buried TheLib. But times have changed. The new C++11 standard brought in some very nice and useful classes. Maybe the only thing I really miss right now is IPC, RPC and fundamentally sockets. However, the new threading classes are very nice, like, of course, std::thread.

Well, I am a Windows-software developer. And I continuously port my code to the other platforms, like Linux and sometimes OS X. Thus, there are always some issues when doing something for the first time. For example, when I tried to build my first test program for std::thread unter Ubuntu, I got the std::exception:

Operation not permitted

Well, of course, I linked against pthread. But something must have gone wrong. I asked the almighty Internet, and of course StackOverflow answered: http://stackoverflow.com/questions/9945391/stdthread-creation-throws-exception

In short words: It was an issue of the ordering of the arguments to Gcc, which in my opinion is one of the most annoying issues with the Gcc.

This does not work:

g++ -std=c++0x -lpthread -o test ./test.cpp

This does work:

g++ -std=c++0x -o test ./test.cpp -lpthread

User user405725 nicely summarized it in his comment:

You generally have to specify libraries AFTER object files or they are not pulled in.

Ok. So what about CMake: StackOverflow: http://stackoverflow.com/questions/1620918/cmake-and-libpthread

The different possibilities may also result in different parameter ordering. Following the formal way and using find_package:

cmake_minimum_required (VERSION 2.6)
find_package (Threads)
add_executable (myapp main.cpp ...)
target_link_libraries (myapp ${CMAKE_THREAD_LIBS_INIT})

everything works like it should be.

However, if I try to take the short way out, e.i. by specifying the arguments directly, like:

SET(CMAKE_CXX_FLAGS_DEBUG "... -lpthread")
SET(CMAKE_CXX_FLAGS_RELEASE "... -lpthread")

on my Ubuntu installation with my Gcc I ended up with the wrong ordering of arguments and my test program failed.

I like Cmake. I works. But you should not try to enforce your way of doing things if it is against the way of CMake used to do things. It will work up to some degree, but you will get problems going beyond that point. Just follow the way of CMake and, most of the time, everything will work.