Trouble installing compiled Perl module on OmniOS / Illumos - types.h is missing [duplicate] - perl

The Ubuntu equivalent would be libc6-dev, but I can't seem to find it for Solaris?
How can I get types.h and related files for building packages on Solaris or Illumos?

You need the system/header package.
I found this via http://pkg.oracle.com/solaris/release/en/search.shtml?token=types.h&action=Search

Assuming you use IPS 'pkg search 'types.h''
The Oracle Solaris 11 Cheat Sheet for Image Packaging System could be useful, too.

Related

"Cloning" a program from a CentOS 7 machine to another

I am in need of working with a specific version of the text editor Lyx, the 1.3.3, on a CentOS 7 environment. I found the .rpm package and some sort of source code, but as it's a very old software, many library are obsolete and cannot be found when installing from the rpm file and for some reasons no c++ compiler I used seems to be good to compile the source code.
Now my question: I do have a CentOS virtual machine with this specific version of Lyx installed properly. Is there a way to "clone" or somehow copy it into my CentOS main partition? Or, if this is too barbaric, how can I extract/install from the VM CentOS the libraries I need?
I apologize if my question doesn't make much sense, I am by no means an expert of Linux distros and I might have some misconceptions brought over from Windows.

Using rdiff in Windows

I recently found rdiff utility : http://beerpla.net/2008/05/12/a-better-diff-or-what-to-do-when-gnu-diff-runs-out-of-memory-diff-memory-exhausted/ that find differences between 2 huge files.
How can I use it in Windows? I am using PHP file to execute diff. Is rdiff the same way?
I want to implement the steps in the above link. Can I wrote it in PHP? and from where can execute rdiff? from Windows cmd? or cygwin cmd?
Here is another prepared windows binary for rdiff since other link in #H47 answer is not working - rdiff-2.0.2-win64.zip (mega.nz)
Compiled from librsync-2.0.2 using msys2 mingw64 gcc compiler.
You will need to compile rdiff for Windows yourself as it's not readily available. It's not that difficult, you need to:
- download the librsync source from github.com/librsync/librsync/releases
- install Cygwin
- compile following these instructions librsync.sourcefrog.net/page_install.html
- profit :-)
If you'd like, you can use my MinGW x64 build from here - www.filedropper.com/rdiff-win-200

Installing Go on CentOS 5.x

I want to install Go on CentOS 5.x, but Go website here http://golang.org/doc/install mentions that it is not supported.
Is there still some way to install Go Language on CentOS since CentOS is just a different flavour of Linux?
When I installed the same and ran the sample program hello.go mentioned at above website
I got the error
hello.go:3:8: import "fmt": cannot find package
package runtime: import "runtime": cannot find package
% export GOROOT=~/
% go run test.go
test.go:3:8: import "fmt": cannot find package
package runtime: import "runtime": cannot find package
Not finding the "runtime" package tells you that the $GOROOT enviroment variable isn't set to golang root directory.
You need to set $GOROOT. Also you should set the $GOPATH variable if you use external packages (go help gopath for more information).
A typical setup (not specific to CentOS) would be:
export GOROOT="/usr/local/go"
export PATH="$GOROOT/bin:$PATH"
export GOPATH=/Users/rodowi/gocode
At least for some programs it works fine. I have a production program that I compile on RHEL 6.x and deploy on 5.x and 6.x and it is working without any problems.
Edit: I used to use it under 1.0.3, but a few months ago I upgraded to "tip go" (the soon to be 1.1 version). Under 1.x it'd crash on 5.9 when accepting a tcp connection but that was fixed a few days after I reported it on the mailing list.
http://dave.cheney.net/2013/06/18/how-to-install-go-1-1-on-centos-5
This page explains rather well what kernel primitives are missing from the CentOS-5 kernel, their impact, and possible fixes.
I'm affraid you're out of luck because of the bit too much aged kernel version of CentOS 5.x. If the go runtime uses features simply not present in that kernel, then I see no easy way how it could work.
you could download the rpm package and begin installing locally, check below and download according to your OS:
http://pkgs.org/download/golang
or you could alternatively compile and build from source:
http://dave.cheney.net/2013/06/18/how-to-install-go-1-1-on-centos-5

How can I use Solaris::Kstat on Solaris 5.10?

I am looking to find the SunOS system details using Kstat. I have found Solaris::Kstat module in CPAN but this only supports Solaris 2.5.1, 2.6 & 2.7. The Sun developer's site mentions a Sun::Solaris::Kstat which I have not found in CPAN. Can anyone please help me with the Perl scripting to find details from kstat on Solaris 5.10.
According to Brendan Gregg who actually develops Perl tools to work with Solaris systems:
The KStat perl library is shipped with
Solaris.
However, in one of his modules he includes the following note:
# - If you have upgraded /usr/bin/perl, this program may be unable to
# find the Sun::Solaris::Kstat library (which is under /usr/perl5).
# Before the "use strict;" line, you may need to add,
# use lib "/usr/perl5/5.6.1/lib";
# to point to your location of Sun/Solaris/Kstat.pm.
If that doesn't work, you may want to run a find command for Kstat.pm, to be certain of whether or not this file exists anywhere on your system.

How can I package my Perl script to run on a machine without Perl?

People also often ask "How can I compile Perl?" while what they really want is to create an executable that can run on machines even if they don't have Perl installed.
There are several solutions, I know of:
perl2exe of IndigoStar
It is commercial. I never tried. Its web site says it can cross compile Win32, Linux, and Solaris.
Perl Dev Kit from ActiveState.
It is commercial. I used it several years ago on Windows and it worked well for my needs. According to its web site it works on Windows, Mac OS X, Linux, Solaris, AIX and HP-UX.
PAR or rather PAR::Packer that is free and open source. Based on the test reports it works on the Windows, Mac OS X, Linux, NetBSD and Solaris but theoretically it should work on other UNIX systems as well.
Recently I have started to use PAR for packaging on Linux and will use it on Windows as well.
Other recommended solutions?
In addition to the three tools listed in the question, there's another one called Cava Packager written by Mark Dootson, who has also contributed to PAR in the past. It only runs under Windows, has a nice Wx GUI and works differently from the typical three contenders in that it assembles all Perl dependencies in a source / lib directory instead of creating a single archive containing everything. There's a free version, but it's not Open Source. I haven't used this except for testing.
As for PAR, it's really a toolkit. It comes with a packaging tool which does the dependency scanning and assembly of stand-alone executables, but it can also be used to generate and use so-called .par files, in analogy to Java's JARs. It also comes with client and server for automatically loading missing packages over the network, etc. The slides of my PAR talk at YAPC::EU 2008 go into more details on this.
There's also an active mailing list: par at perl dot org.
It is some time since this question was first asked, but Cava Packager can currently produce executable packages for Windows, Linux and Mac OS X. It is no longer Windows only.
Note: As indicated by my name, I am affiliated with Cava Packager.
I'm a Perl newbie and I just downloaded Cava Packager and that's the only one I found working. I've tried ActiveState 5.10.1005 and Strawberry Perl with PAR-Packager on Windows XP.
pp just hangs in mid-stream and no executables created.
Cava provides the only solution to creating exe on Windows so far. Thks.
You could use the perlcc tool that's shipped with most distributions of Perl. I've also found both perl2exe and Active State's Perl Dev kit useful for shipping Perl applications.