Slackware

Slackware
A true linux-distro

Saturday, September 28, 2013

Post 22: Wireshark Segmentation Fault.

A problem that you might encounter when you try running Wireshark on your Slackware 64 is that you might get a 'Segmentation Fault' error.

I was able to solve the problem thanks to the answer on this page to the same question.

Saturday, September 21, 2013

Post 21: Disabling CPU throttling in Slackware.

Certain installation (and possibly applications) need CPU throttling to be disabled.

On Slackware, you can make the change to switch CPU Throttling off by editing the file /etc/rc.d/rc.modules

Find the variable CPUFREQ.

You will notice that CPUFREQ is set to 'battery'. You need to change it to 'off', understandably.

CPUFREQ = off.

Save the file and restart the system.

Post 20: Installing LAPACK ( Linear Algebra PACKage) on Slackware (or any other Linux distro)

LAPACK is written in Fortran 90 and provides routines for solving systems of simultaneous linear equations, least-squares solutions of linear systems of equations, eigenvalue problems, and singular value problems. 

Much of IT++ functionality is dependent on the facilities it imports from LAPACK. So this post is a follow-up to my previous post regarding IT++. In my opinion, and also in the opinions of the designers of IT++, it is a very important software. (inv() in IT++ won't work without LAPACK!!).


  1. Download the latest version of LAPACK from here.
  2. untar it and cd into the directory that was created by untarring. 
    •  tar -xvf lapack-3.4.2
    • cd lapack-3.4.2
  3. You will notice a file called make.inc.example. Copy that into another file and call it make.inc.
    • cp make.inc.example make.inc 
  4. There is a file called librefblas.a in lapack-3.4.2/BLAS/SRC
  5. Copy the file to the current directory.
    • cp  lapack-3.4.2/BLAS/SRC .
  6. Open make.inc in the editor of choice (mine being vim) and edit the following line as shown:
    • BLASLIB = ../../librefblas.a  as
      BLASLIB = <absolute path to this file> (eg: /home/user/Documents/lapack-3.4.2/librefblas)
  7. Now enter make.
 
Your install should be successful.

Post 19: Getting IT++ running on Slackware

Building IT++ itself from source was an easy chore, but I had a brutal, brutal time this afternoon and for most part of the evening trying to negotiate with a linkage error that I was experiencing while trying to get a IT++ based program to run.

IT ++ is a C++ library that implements functions for digital signal processing and related areas. More on that here.


The problem with compiling IT++ programs is that you need special flags so that the program compiles and links without problems.

  • If you are experiencing what you think are linkage errors, read on.
  • I am only going to discuss static linking, since I have not implemented dynamic linking yet.
  • Static linking creates MBs and MBs worth object code, whereas dynamic linking reduces the size exponentially.
  • Follow the link here.
  • If that didn't work, do as follows.
locate itpp.pc

 Copy the path name upto the directory name that appears something like /usr/lib/pkgconfig/itpp.pc or /usr/local/lib/pkgconfig/itpp.pc.

Now, export the path name as follows:

export $PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/lib/pkgconfig/

Now, compile your program as follows:
  
g++ `pkg-config --cflags itpp` -o my_prog my_prog.cpp `pkg-config --libs itpp`




Tuesday, September 10, 2013

Post 18: Interesting C/C++ implementations of basic programs.

Post 17: Virtual box 'Kernel Driver Not Accessible' error.

NOTE : This should ideally work.  Keep a track of the modifications you make. If it doesn't solve your problem, then revert to the state it is in now.

You are likely running as a non-root user. Find the following file :

/lib/udev/rules.d/60-vboxdrv.rules

Open it as root and edit the OWNER field to your username.

You an verify your group name as follow:

groups <username>

Change

KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="vboxusers", MODE=0660"

to

KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="<username>", GROUP="<group>", MODE=0660"


Post 16: Virtual Box on Slackware. Vboxdrv error.

This message is accompanied by a suggestion run sudo /etc/init.d/vboxdrv setup. However, when you run this , you will get back a message telling you the the file wasn't found.

The correct path - and this is Slackware specific - is
sudo /etc/rc.d/rc.vboxdrv setup

Virtualbox should now run.