Centos openmp with gcc 4.1.2 - linux

I cant tell if openmp is installed in this fresh install of centos I just put on with the developer tools.
I tried to run ldconfig -p | grep openmp and I dont see it listed.
Is it available for centos with that version of gcc?
Thanks

/sbin/ldconfig -p | grep gomp
library is call libgomp

Try:
$ ldconfig -p | grep -i "gomp"
libgomp.so.1 (libc6,x86-64) => /usr/lib64/libgomp.so.1
Basically, it's called gomp... GCC's OpenMP.
The alternative is to compile a hello world openmp program; if it doesn't work, it isn't installed.

Search "yum search gomp" this way on a Red Hat distro. To find out what the groups are use "yum grouplist | less". This pages the output so you can see the complete list. You will notice which groups are installed and available. Of course you can always use "yum help".

Not familiar with CentOS or yum, but take a stab with this:
yum list installed | grep "penmp"
Good luck!

Related

Getting the new Squeak 5 to run on 64 bit Linux

In short: how do I get Squeak 5 to run on x64 Linux?
I dont care whether the executable is 32 or 64 bit as long as it runs and opens the Squeak 5 image.
Here is what I tried:
When I try to run the executables from the Squeak 5 package i get: Running 32-bit Squeak on a 64-bit System. install-libs32 may install them - tried that. Wasn't found.
Then I went looking for a 64 bit executable. There are some from Squeak 4 but they can't open Squeak 5 images.
Looking through the Squeak 5 package:
The shell scripts squeak.sh in both these directories:
Squeak-5.0-All-in-One/
Squeak-5.0-All-in-One/Squeak-5.0-All-in-One.app/Contents/LinuxAndWindows/
Both return this error:
/usr/bin/ldd didn't produce any output and the system is 64 bit. You may need to (re)install the 32-bit libraries.
There are also misleading files named squeak (no .sh) in these directories:
Squeak-5.0-All-in-One/Squeak-5.0-All-in-One.app/Contents/LinuxAndWindows/Linux-i686
Squeak-5.0-All-in-One/Squeak-5.0-All-in-One.app/Contents/LinuxAndWindows/Linux-i686/bin
They are not the executable, just more shell scripts.
There is another squeak file in:
Squeak-5.0-All-in-One/Squeak-5.0-All-in-One.app/Contents/LinuxAndWindows/Linux-i686/lib/squeak/5.0-3397
Running ./squeak misleadingly says No such file or directory. It is misleading because the file does exist, it is just a 32-bit exe.
file squeak tells me: ELF 32-bit LSB executable, Intel 80386.
So how do I get it to run on 64-bit Linux? I could compile it myself but haven't tried assuming there are a lot of dependencies. Or has anyone tried it?
You already got all information you need:
You may need to (re)install the 32-bit libraries.
Squeak 5 is currently 32bit only. Hence, you need 32bit libraries.
It cannot use your 64bit libraries.
You may need thes:e packages (I use Debian/Ubuntu names, CentOS/RH/SuSE should be similar):
libc6:i386
libuuid1:i386
libkrb5-3:i386
libk5crypto3:i386
zlib1g:i386
libcomerr2:i386
libkrb5support0:i386
libkeyutils1:i386
libx11-6:i386
libgl1-mesa-glx:i386
libsm6:i386
libssl1.0.0:i386
(note the :i386 in the names)
This works in 64 bit Ubuntu 16.04:
In the directory where you unzipped the
Squeak-5.0-All-in-One.zip
archive, and that contains the squeak.sh file,
put the following into a file named libs32.sh :
#!/bin/bash
objdump -p ./Squeak-5.0-All-in-One.app/Contents/LinuxAndWindows/Linux-i686/lib/squeak/5.0-3397/*|
grep NEEDED|
awk '{print $2}'|
sort -u|
xargs dpkg -S|
awk '{print $1}'|
sort -u|
sed 's/:amd64:/:i386:/'|
sort -u|
sed 's/:$//'
Make that file executable:
chmod +x ./libs32.sh
Run it:
./libs32.sh
You will get a list of libraries that need to be installed.
Run
./lib32.sh | xargs sudo apt install
to see what would be installed.
Run
./lib32.sh | xargs sudo apt install -y
to install it.

How to change gcc version linux

I have gcc-4.6 & gcc-4.7 both installed on my machine and I made gcc the default compiler. But still I could see 4.6 under "cat /proc/version" but I want 4.7 in place of 4.6.
cat /proc/version
Linux version 3.2.0-4-rt-686-pae (debian-kernel#lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP PREEMPT RT Debian 3.2.65-1+deb7u2
How can I change gcc version here from 4.6 to 4.7 ?
Any help would be really helpfull for me.
Many Thanks.
As the same problem is mentioned here https://askubuntu.com/questions/193539/having-2-versions-of-gcc
I suggest you to check the solution.
This is because you have both versions installed,and 4.6 being treated as the default.
The easiest way make gcc-4.7 the default gcc is to move the symlink of /usr/bin/gcc:
sudo rm /usr/bin/gcc
sudo ln -s /usr/bin/gcc-4.7 /usr/bin/gcc
Reference link here
Is there any way to use a module in 3.2 which is compiled with kernel
3.10 ?
You can try the option -f of modprobe.

which fuse version in my kernel?

I want to know which fuse version do I have, when attempting to execute:
locate -i -r /fuse
I get:
/lib/modules/3.0.0-12-generic/kernel/fs/fuse
/lib/modules/3.0.0-12-generic/kernel/fs/fuse/cuse.ko
/lib/modules/3.0.0-32-generic/kernel/fs/fuse
/lib/modules/3.0.0-32-generic/kernel/fs/fuse/cuse.ko
/usr/include/fuse
/usr/include/fuse.h
/usr/include/fuse/cuse_lowlevel.h
/usr/include/fuse/fuse.h
/usr/include/fuse/fuse_common.h
/usr/include/fuse/fuse_common_compat.h
/usr/include/fuse/fuse_compat.h
/usr/include/fuse/fuse_lowlevel.h
/usr/include/fuse/fuse_lowlevel_compat.h
/usr/include/fuse/fuse_opt.h
/usr/include/linux/fuse.h
/usr/lib/pkgconfig/fuse.pc
/usr/share/app-install/desktop/fuse-emulator-gtk:fuse-gtk.desktop
/usr/share/app-install/desktop/fuse-emulator-sdl:fuse-sdl.desktop
/usr/share/app-install/icons/fuse.png
/usr/share/doc/fuse-utils
/usr/share/doc/libfuse-dev/examples/fusexmp.c
/usr/share/doc/libfuse-dev/examples/fusexmp_fh.c
/usr/share/initramfs-tools/hooks/fuse_utils
/usr/share/lintian/overrides/fuse-utils
/usr/share/man/man1/fuser.1.gz
/usr/share/man/man1/fusermount.1.gz
/usr/src/linux-headers-3.0.0-12/fs/fuse
/usr/src/linux-headers-3.0.0-12/fs/fuse/Kconfig
/usr/src/linux-headers-3.0.0-12/fs/fuse/Makefile
/usr/src/linux-headers-3.0.0-12/include/linux/fuse.h
/usr/src/linux-headers-3.0.0-12-generic/include/config/fuse
/usr/src/linux-headers-3.0.0-12-generic/include/config/aufs/br/fuse.h
/usr/src/linux-headers-3.0.0-12-generic/include/config/fuse/fs.h
/usr/src/linux-headers-3.0.0-12-generic/include/linux/fuse.h
/usr/src/linux-headers-3.0.0-32/fs/fuse
/usr/src/linux-headers-3.0.0-32/fs/fuse/Kconfig
/usr/src/linux-headers-3.0.0-32/fs/fuse/Makefile
/usr/src/linux-headers-3.0.0-32/include/linux/fuse.h
/usr/src/linux-headers-3.0.0-32-generic/include/config/fuse
/usr/src/linux-headers-3.0.0-32-generic/include/config/aufs/br/fuse.h
/usr/src/linux-headers-3.0.0-32-generic/include/config/fuse/fs.h
/usr/src/linux-headers-3.0.0-32-generic/include/linux/fuse.h
/var/lib/dpkg/info/fuse-utils.conffiles
/var/lib/dpkg/info/fuse-utils.list
/var/lib/dpkg/info/fuse-utils.md5sums
/var/lib/dpkg/info/fuse-utils.postinst
/var/lib/dpkg/info/fuse-utils.postrm
/var/lib/dpkg/info/fuse-utils.preinst
Any idea where the information I need is located ?
You can get the version of the fusermount utility like this:
fusermount -V
The selected answer should be jdlourenco's one.
Boh's anwser isn't bad, but not clear enough for newbies and the shell line is too specific (in my case, Ubuntu 16.04, no results)
On Debian / Ubuntu, check using dpkg
dpkg --get-selections | grep fuse
In addition to fusermount -V, as presented by #jdlourenco, you can also run sshfs -V. It shows the fusermount -V output as the last line.
Example runs and output on my Ubuntu 20.04 machine:
$ fusermount -V
fusermount3 version: 3.9.0
and:
$ sshfs -V
SSHFS version 3.7.1
FUSE library version 3.9.0
using FUSE kernel interface version 7.31
fusermount3 version: 3.9.0
Other References:
My answer here: Ask Ubuntu: How to prevent SSHFS mount freeze after changing connection after suspend?

Compiling erlang with systemtap but require dtrace

I'm compiling erlang otp from source like following:
./configure --with-dynamic-trace=systemtap
But it reports error:
checking for dtrace... no
configure: error: No dtrace utility found.
I think systemtap is for linux usage and it is different from dtrace, am I right?
After installed dtrace Now the error is:
dtrace: failed to compile script emulator/beam/erlang_dtrace.d: Preprocessor not found
configure: error: Could not precompile erlang_dtrace.d: dtrace -h failed
configure: error: /root/otp/erts/configure failed for erts
Which distro are you using? I'd forget using DTRACE, it will be a bit harder to make it to work than Systemtap (at least it was for me). I'm using Systemtap and it works perfectly.
If you are not using Fedora/RH you should patch your kernel with UTRACE or use a kernel >= 3.5 with UPBOBES enabled.
To verify if your kernel has UTRACE/UPROBE enabled run this:
grep UTRACE /boot/config-$(uname -r)
or
grep PROBES /boot/config-$(uname -r)
For example, in my machine (Ubuntu 12.04 with Mainline kernel 3.5):
$ grep UTRACE /boot/config-$(uname -r)
$
$ grep UPROBES /boot/config-$(uname -r)
CONFIG_ARCH_SUPPORTS_UPROBES=y
CONFIG_UPROBES=y
You should also have systemtap installed. The version shipped with Ubuntu (my case) is quite old, so I compiled it from source (traditional configure/make/make install). You can get it here:
http://sourceware.org/systemtap/ftp/releases/
I'm using version 1.8.
Then try to recompile it again. It should work.
Regards
After installing systemtap(sudo apt-get install systemtap), exiting or logging out from the current shell session then logging in may help.
Also, you may try using kerl.

How do you find out which version of GTK+ is installed on Ubuntu?

I need to determine which version of GTK+ is installed on Ubuntu
Man does not seem to help
This suggestion will tell you which minor version of 2.0 is installed. Different major versions will have different package names because they can co-exist on the system (in order to support applications built with older versions).
Even for development files, which normally would only let you have one version on the system, you can have a version of gtk 1.x and a version of gtk 2.0 on the same system (the include files are in directories called gtk-1.2 or gtk-2.0).
So in short there isn't a simple answer to "what version of GTK is on the system". But...
Try something like:
dpkg -l libgtk* | grep -e '^i' | grep -e 'libgtk-*[0-9]'
to list all the libgtk packages, including -dev ones, that are on your system. dpkg -l will list all the packages that dpkg knows about, including ones that aren't currently installed, so I've used grep to list only ones that are installed (line starts with i).
Alternatively, and probably better if it's the version of the headers etc that you're interested in, use pkg-config:
pkg-config --modversion gtk+
will tell you what version of GTK 1.x development files are installed, and
pkg-config --modversion gtk+-2.0
will tell you what version of GTK 2.0. The old 1.x version also has its own gtk-config program that does the same thing. Similarly, for GTK+ 3:
pkg-config --modversion gtk+-3.0
This isn't so difficult.
Just check your gtk+ toolkit utilities version from terminal:
gtk-launch --version
get GTK3 version:
dpkg -s libgtk-3-0|grep '^Version'
or just version number
dpkg -s libgtk-3-0|grep '^Version' | cut -d' ' -f2-
You can use this command:
$ dpkg -s libgtk2.0-0|grep '^Version'
You could also just compile the following program and run it on your machine.
#include <gtk/gtk.h>
#include <glib/gprintf.h>
int main(int argc, char *argv[])
{
/* Initialize GTK */
gtk_init (&argc, &argv);
g_printf("%d.%d.%d\n", gtk_major_version, gtk_minor_version, gtk_micro_version);
return(0);
}
compile with ( assuming above source file is named version.c):
gcc version.c -o version `pkg-config --cflags --libs gtk+-2.0`
When you run this you will get some output. On my old embedded device I get the following:
[root#n00E04B3730DF n2]# ./version
2.10.4
[root#n00E04B3730DF n2]#
Try,
apt-cache policy libgtk2.0-0 libgtk-3-0
or,
dpkg -l libgtk2.0-0 libgtk-3-0
I think a distribution-independent way is:
gtk-config --version
You can also just open synaptic and search for libgtk, it will show you exactly which lib is installed.
Try:
dpkg-query -W libgtk-3-bin
Because apt-cache policy will list all the matches available, even if not installed, I would suggest using this command for a more manageable shortlist of GTK-related packages installed on your system:
apt list --installed libgtk*
This will get the version of the GTK libraries for GTK 2, 3, and 4.
dpkg -l | egrep "libgtk(2.0-0|-3-0|-4)"
As major versions are parallel installable, you may have several of them on your system, which is my case, so the above command returns this on my Ubuntu Trusty system:
ii libgtk-3-0:amd64 3.10.8-0ubuntu1.6 amd64 GTK+ graphical user interface library
ii libgtk2.0-0:amd64 2.24.23-0ubuntu1.4 amd64 GTK+ graphical user interface library
This means I have GTK+ 2.24.23 and 3.10.8 installed.
If what you want is the version of the development files, use:
pkg-config --modversion gtk+-2.0 for GTK 2
pkg-config --modversion gtk+-3.0 for GTK 3
pkg-config --modversion gtk4 for GTK 4
(This changed because the + from GTK+ was dropped a while ago.)
To make the answer more general than Ubuntu (I have Redhat):
gtk is usually installed under /usr, but possibly in other locations. This should be visible in environment variables. Check with
env | grep gtk
Then try to find where your gtk files are stored. For example, use locate and grep.
locate gtk | grep /usr/lib
In this way, I found /usr/lib64/gtk-2.0, which contains the subdirectory 2.10.0, which contains many .so library files. My conclusion is that I have gtk+ version 2.10. This is rather consistent with the rpm command on Redhat: rpm -qa | grep gtk2, so I think my conclusion is right.
To compile and link a GTK program with pkg-config, we need the library name instead of the actual version number. For example, the following command compiles and links a GTK program that uses the GTK4 library:
gcc -o program program.c `pkg-config --cflags --libs gtk`
To obtain the library name for GTK, use the following command:
pkg-config --list-all | grep gtk

Resources