Home Home > Programming
Sign up | Login

Deprecation notice: openSUSE Lizards user blog platform is deprecated, and will remain read only for the time being. Learn more...

Archive for the ‘Programming’ Category

openSUSE and GCC part 7: autotools and how I do it

November 19th, 2013 by

Last time I was little bit too hard to autotools. Okay they are not easy but they work. I also let last time people to figure how to get a long with autotools. Now I show how I do it. (more…)

openSUSE and GCC part 6: Introduction to autotools

November 12th, 2013 by

Autotools, autotools and once again autotools. Years ago I started with autotools I thought, ‘Hey someone has really get into linking and compiling’. I was sold for a while and tried to learn it inside out. Then I understood that I will never be good at autotools (So I started to go to gym instead). M4 macro language it is not my thing.
It’s just something that should be put on one way Mars shuttle and send to gray ones to figure out. I think mr. Spock’s brains functioned with M4 but mine won’t. If there is some M4 specialist. Send me e-mail or post comment about it and tell why M4 is best macro language on earth. If nobody stands up for poor M4-macro language I’ll keep unloving it. I can start liking it because I was so wrong with Rexx. (more…)

openSUSE and GCC part 5: Make love me do

November 5th, 2013 by

In this point of time if you haven’t any idea what is pkg-config or GCC you should be reading this. Or if you still do please make sure you read about them from these blog posts. ‘Make‘ as a tool doesn’t do anything easier it just hides not-so-easy-part from eyes of public. ‘Make’-tool executes (in default) Makefile-script that should tell how to build your applications step by step. There is no guaranties that it’s easier to understand how it’s build or you to understand that after a while. (more…)

openSUSE and GCC part 4: Pkg-config and what one can do with it

October 28th, 2013 by

When I re-booted my blogging habits with very UN-sexy and technical topic ‘GNU C Compiler and how to make it with openSUSE’. I thought nobody bothers to read these because A) Everyone who reads openSUSE blogs are PRO B) everyone wants to do Javascript, Python or ‘Put your script language here not C. I can tell actually C ain’t that bad you just have to shoot yourself to leg and then learn how to walk again.
Last blog entry was about ‘openSUSE and GCC part 3: RPM devel packages‘ someone (thanks for pointing that out really!) noted that I should fix C-Code example I was stunned! There were someone that really readied blog entry. Okay he/she didn’t say did he/she like it but some one read it.
I have one real reason to this blog-stuff. I hope I have found something like this when I young and I was starting my journey in Linux land. Currently there is so many more people now in populating it and it’s coming up fast. So If you find errors or don’t understand something be welcome to ask or want to know about something specific let me know! Now we get on today’s topic that is ‘pkg-config and what one can do with it’. (more…)

openSUSE and GCC part 3: RPM devel packages

October 22nd, 2013 by

In last blog I explained how to compile application with Gnu C Compiler as knows as ‘gcc‘. In blog I try to explain what are RPM devel packages and how to use them in C-application with ‘gcc‘. (more…)

openSUSE and GCC part 2: compiling ‘Hello World’

October 15th, 2013 by

I really hope you readied last article ‘OpenSUSE and GCC part 1: getting started‘ or you understand basics and you have GCC (Only GNU C Compiler as GCC stands Gnu Compiler Collection) installed. This time we learn how to compile application called ‘Hello World’. It’s so popular application even wikipedia have article about it. (more…)

openSUSE and GCC part 1: getting started

October 7th, 2013 by

I try to explain in this series of blog entries how to install gcc (GNU C-Compiler) and what to do with it. I  also try to explain little make and CMake/Autotools. This is not very generic tutorial because I like to promote openSUSE as coding platform. Most of the tips goes just fine with every distro. For the first words I like to say one thing: openSUSE is excellent platform for C-coding. Though, you can choose your programming language  but this time I like to talk about GCC and specially C-Compiler. I’ll try to how to get there with these writings because I have noticed that this substance is getting less attention that it needs. Also noted that GCC anf GNU is 30 years and I have used it almost 15 so time to share some information. (more…)

GPIO on Raspberry Pi

March 31st, 2013 by

We have these working openSUSE Factory images for the Raspberry Pi, which is an ARM-based mini-computer, and since I want to encourage my kid to do more with computers than playing games (even if they are open-source), I looked into how GPIOs worked.
For that, you need to find the pin allocation – e.g.
in the elinux GPIO description or
http://www.raspberrypi.org/archives/1417
has a video which has it explained at 03:00

For my test, I wired together pin11 and pin12, which are GPIO17 and GPIO18.
I wanted GPIO17 to receive what is sent by GPIO18.
This is how this looked for me: foto of GPIO17 and 18 wired together

Using it directly from the shell is simple:
echo 17 > /sys/class/gpio/export
echo 18 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio18/direction
echo 1 > /sys/class/gpio/gpio18/value
watch -n 1 head /sys/class/gpio/gpio*/value

If the wiring and configuration was right, the “watch” will show gpio17/value to become 1 too.
You can then also pull the wire (or insert a physical switch) and see gpio17/value dropping to 0 again, when it is no more receiving the current from the other pin.

If you managed to get this working, you reached level one of hardware-hackery.

wxRuby is now on BuildService

March 22nd, 2013 by

I am happy to announce that i succeded in compiling wxRuby 2.0.1 on my Buildservice account and it is available to be installed in just one click for openSUSE 12.2 and 12.3.

wxRuby is an old but working library based on wxWidgets toolkit, till some day ago the dependency from SWIG 1.3.38 and some small errors raised during the manual compilation, made the use of this library the worst nightmare for beginners who was looking for a fast approach to GUI based programming in Ruby.

After some day spent to investigate about a possible upgrade of the SWIG dependency to the current 2.0 version, i produced some patches to fix this and the other annoying compiling errors, and finally, thanks to the Buildservice infrastructure, a wxRuby RPM compiled from sources with the relative patches are now availables for all openSUSE users!

As far i googled this should be the first distro to have a precompiled and working wxruby gem among its repositories (being compiled from sources the gem is generated for 32 and 64 bits architecture from Buildservice itself), so Rubyists take a look on software.opensuse.org, select the package coming from my home project account and enjoy!

CLI to upload image to openstack cloud

April 18th, 2012 by

I work on automatic testing of one of our products that creates other projects.
And because there is a lot of clouds everywhere I want to use them too. We
have internally an OpenStack cloud (still Diablo release). So I need to solve
automatic uploading of images built in the Build Service. Below I describe my working version.

(more…)