jump to navigation

Perl 5.14.0 Solaris failing tests May 19, 2011

Posted by claudio in Uncategorized.
Tags: , , ,
2 comments

I’m preparing –together with the nice people from OpenCSW– a bug report for p5p with information about the failing tests for a Solaris10-Sparc-64-bit-threaded perl.

In case you wonder, most failing tests are related to threading. But even when building a non-treaded version there are some failing tests (Failed 10 tests out of 1961, 99.49% okay). The threaded 32-bit version passes all the tests. The Solaris9-Sparc-64-bit-threaded perl seems to build and test fine as well, but I need to verify it (e.g. that we are testing exactly the same thing).

Ping me here in case you have this combination working. Patches to p5p are always better than bugs rapports  :) . Mental note: “I will test the RC releases on other OSes than GNU/Linux next time”.

Install DBD::mysql for Mysql 5 on Solaris 10 October 25, 2010

Posted by claudio in Uncategorized.
Tags: , , ,
add a comment

Installing DBD::mysql can be a little complicated because the needed libraries and header files are often not installed on Solaris or found in weird places (Howto on installing DBD::mysql with Solaris supplied mysql 4.0.31 and perl 5.8.4). This post explains how to install the module linked with Mysql 5.

To install the module do this:

  1. Install Mysql5. The paths on this post are applicable to the Sun Webstack installation in /opt/webstack. When using an other package or when compiling mysql yourself, change the paths accordingly. Remember that both perl and mysql must coincide in the binary format (32- or 64-bit). Because I use a self compiled 64-bit perl installation, the mysql binaries must be 64-bit as well.
  2. Download the tar ball of the modules or, easier, go to your cpan build directory (set at cpan configure time), typically at ~/.cpan/build/DBD-mysql-<VERSION> (already there if you previously tried to install the module with cpan).
  3. Run the makefile with the following arguments (adapt to your own needs if necessary):
    $ cd ~/.cpan/build/DBD-mysql-<VERSION>
    $ perl Makefile.PL --libs '-R/opt/webstack/mysql/5.0/lib/sparcv9/mysql -L/opt/webstack/mysql/5.0/lib/sparcv9/mysql -lmysqlclient -lz' --cflags '-I/opt/webstack/mysql/5.0/include/mysql -m64' --with-mysql=/opt/webstack/mysql

    (After -lz you can add other options depending on your needs, like -lcrypt for ssl support.)
  4. Complete the normal installation (make, make test (if you have a test db running), make install).

That’s it.

Compile the latest version of Perl on Solaris 10 September 14, 2010

Posted by claudio in Uncategorized.
Tags: , , , ,
add a comment

Updated on Sept 09 2010.
Like on all UNIX operating systems, Solaris 10 supplies a Perl installation and it even adds its own modules in the Solaris namespace (yeah!). However, the version installed is 5.8.4, released on April 21, 2004 (boo!). Nowadays – in the Modern Perl’s times – you should use something as handy as App::perlbrew to install new versions of perl from source. As often in a corporate environment, however, it’s not always possible to directly reach the CPAN mirrors through perlbrew (proxy support is a work in progress). At the same time, it seems that a lot of people have trouble answering to the Configure questions to get the perl binary they need (at least 64-bit optimization and threads). This is how I compile perl on Solaris 10.

  1. Make sure you have the needed Solaris packages installed to compile C and C++ code. This is a good starting point. You can install the defaul Solaris compiler Sunstudio or gcc (provided as a SFW package in the installation media). Make sure the directories containing these binaries are in you PATH and /usr/ucb is not.
  2. Download the source, gunzip and untar it, cd to the directory.
  3. Run:
    ./Configure -ders -Dcc=cc -Dusethreads -Duseithreads -Ud_sigsetjmp -Uinstallusrbinperl -Ulocincpth= -Uloclibpth= -Duse64bitall -Ud_strerror_r -Ud_signbit -Duselargefiles -Dprefix=/opt/perl-5.12.2 -Dprivlib=/opt/perl-5.12.2/lib -Darchlib=/opt/perl-5.12.2/lib -Dsiteprefix=/opt/perl-5.12.2/site -Dsitelib=/opt/perl-5.12.2/site/lib -Dsitearch=/opt/perl-5.12.2/site/lib -Dman1dir=/opt/perl-5.12.2/share/man/man1 -Dman3dir=/opt/perl-5.12.2/share/man/man3 -Dsiteman1dir=/opt/perl-5.12.2/site/share/man/man1 -Dsiteman3dir=/opt/perl-5.12.2/site/share/man/man3 -Dsed=/usr/bin/sed -Duseshrplib -Dcf_by="<Your name here>" -Dcf_email=<Your e-mail here>
    (Change <…> with valid vales. Also, if you run Configure more than once, make sure to remove config.sh and not rename to something starting with config.sh. As an alternative you can remove the Perl source dir altogether and untar the source file again.)
  4. make
    In this step, when using the Sun Studio compiler, make can be replace by the faster (parallel) “dmake”.
  5. make test
    Update: there is a small bug concerning the following tests:

    Failed 5 tests out of 1747, 99.71% okay.
    ../cpan/Archive-Extract/t/01_Archive-Extract.t
    ../cpan/IO-Compress/t/010examples-bzip2.t
    ../cpan/IO-Compress/t/010examples-zlib.t
    ../cpan/IO-Compress/t/cz-05examples.t
    ../cpan/Test-Harness/t/regression.t

    When you run the test by hand they are OK, so they can be safely ignored (thanks people on #p5p).

  6. make install

NB: if you are creating a package instead of installing, you will need the switch -Dinstallprefix

Happy Recent Perl!

Install DBD::mysql for Solaris 10 system perl August 13, 2009

Posted by claudio in Uncategorized.
Tags: , , , , ,
10 comments

perlInstalling DBD::mysql on Solaris 10 seems to be less trivial than “cpan DBD::mysql” when you want to use the system-supplied perl (5.8.4) and mysql (4.0.31) installation. Google shows a lot of people asking how to proceed, but surprisingly no answers. Typically, one gets this error at make time:

[...]
"dbdimp.c", line 4468: improper member use: com
"dbdimp.c", line 4468: improper member use: com
"dbdimp.c", line 4468: improper member use: com
"dbdimp.c", line 4630: undefined struct/union member: pmysql
"dbdimp.c", line 4653: undefined struct/union member: pmysql
cc: acomp failed for dbdimp.c
make: *** [dbdimp.o] Error 1

To install the module do this:

  1. Install the following Solaris mysql packages (if not already installed): SUNWmysqlr, SUNWmysqlu, SUNWmysqlS, SUNWmysqlt.
  2. Type the following as root:
    cd /usr/sfw/share/src/mysql
    ./configure
  3. Download the tar ball of the modules or, easier, go to your cpan build directory (set at cpan configure time), typically at ~/.cpan/build/DBD-mysql-<VERSION> (already there if you previously tried to install the module with cpan).
  4. Run the makefile with the following arguments (adapt to your own needs if necessary):
    cd ~/.cpan/build/DBD-mysql-<VERSION>
    perl Makefile.PL --libs '-R/usr/sfw/lib -R/usr/sfw/lib/mysql -L/usr/sfw/lib -L/usr/sfw/lib/mysql -lmysqlclient -lz -lposix4 -lcrypt -lgen -lsocket -lnsl -lm' --cflags '-I/usr/sfw/include -I/usr/include -I/usr/sfw/share/src/mysql/include'
  5. Complete the normal installation (make, make test (if you have a test db running), make install).

That’s it.

Blastwave is dead, long live OpenCSW and … Blastwave! November 18, 2008

Posted by claudio in Uncategorized.
Tags: , , , , ,
3 comments

damnLet’s face it. GNU/Linux is miles ahead of Solaris when talking about an integrated package management. The combo dpkg/apt-get on Debian and derivatives and even rpms are killer features for many sys-admins and users. The huge well-maintained software repositories are amazing.

Solaris pkg-system (SVR4 packages) and patch-system (individual patches and patchclusters) feel like ancient history. On a fun day I’ll end up writing a perl wrapper for pkgadd and co. (pkgrm, pkginfo, patchadd, patchrm…) to accept parameters in latin…

If you don’t feel like compiling from source dozens (hundreds?) applications and libraries you can always count on kind-of-sponsored-by-SUN sunfreeware. However, dependencies are handled by looking in a web page which dependencies the package has. And which dependencies the dependencies have on an other page, and… You get the picture.

Blastwave to the rescue? The last months have been sad for the Solaris community.

(more…)

Reset the Solaris root password June 13, 2008

Posted by claudio in Uncategorized.
Tags: , ,
add a comment

Forgetting the root password (or being replaced without you knowing it). Pretty silly when it happens, but it does happen. Follow this steps if you need to reset the root password of a Solaris system. (more…)

Mount an iso file on Solaris and present it to a zone June 11, 2008

Posted by claudio in Uncategorized.
Tags: , , , , ,
3 comments

When installing software on servers, it is not practical to go the the serverroom (if possible at all), just to insert a cdrom in the machine. Just create an iso with your favorite cd burning software (brasero?), and follow these steps. (more…)

Non hexadecimal ifconfig (Solaris 8, 9 & 10) August 6, 2007

Posted by claudio in Uncategorized.
Tags: , ,
1 comment so far

Solaris is nice, but its ifconfig is pretty annoying. It gives you an hexadecimal netmask.This gives you two choices. One learn to decipher all those f’s or write a ridiculous small wrapper script. Guess what I did. (more…)

Follow

Get every new post delivered to your Inbox.

Join 135 other followers