pcp
[Top] [All Lists]

Re: Solaris build notes

To: Nathan Scott <nathans@xxxxxxxxxx>
Subject: Re: Solaris build notes
From: Josef 'Jeff' Sipek <jeffpc@xxxxxxxxxxxxxx>
Date: Sun, 28 Jun 2015 10:41:58 -0400
Cc: pcp <pcp@xxxxxxxxxxx>
Delivered-to: pcp@xxxxxxxxxxx
In-reply-to: <1945955780.25644422.1435200191659.JavaMail.zimbra@xxxxxxxxxx>
References: <474160992.25596336.1435198655884.JavaMail.zimbra@xxxxxxxxxx> <1945955780.25644422.1435200191659.JavaMail.zimbra@xxxxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
FWIW, the following commit broke compilation of pcp on illumos-derived distros.
(I bet FreeBSD and ZFSonLinux are affected too since they collaborate with
the illumos ZFS folks.)  It'd seem that Oracle added an arg to
zpool_vdev_name() which obviously isn't available in the open source
versions of ZFS.  Oh, the joys of diverging code.

Jeff.

commit a1ebd0295bf26c55c918444629a51061106f28b5
Author: Nathan Scott <nathans@xxxxxxxxxx>
Date:   Thu Jun 25 12:38:21 2015 +1000

    build: get native Solaris builds up and running once more
    
    Series of changes to support Solaris builds -
    - no -q option to Solaris egrep, workaround
    - configure.ac and makefile fixes for when cc != gcc
    - configure.ac fix to detect pid 1 correctly (PCP_PS_PROG)
    - order of -L and -l options to the linker is important (QA
      programs only were affected by this)
    - zpool_vdev_name API has acquired another argument, ho-hum
    - oddball pmieconf GNUmakefile issue with grep return code


$ ./Makepkgs
...
/usr/bin/gcc -g -O2 -fPIC -fno-strict-aliasing -m64  -Wall -O2 -g -DPCP_DEBUG 
-DPCP_VERSION=\"3.10.6\" -I../../../src/include -I../../../src/include/pcp   -c 
-o zpool_perdisk.o zpool_perdisk.c
zpool_perdisk.c: In function âmake_vdev_nameâ:
zpool_perdisk.c:31:2: error: too many arguments to function âzpool_vdev_nameâ
  char *cname = zpool_vdev_name(zh, zp, child, B_FALSE, B_FALSE);
  ^
In file included from zpool_perdisk.c:15:0:
/usr/include/libzfs.h:386:14: note: declared here
 extern char *zpool_vdev_name(libzfs_handle_t *, zpool_handle_t *, nvlist_t *,
              ^
make[3]: *** [zpool_perdisk.o] Error 1
...
$ grep -A 1 zpool_vdev_name /usr/include/libzfs.h
extern char *zpool_vdev_name(libzfs_handle_t *, zpool_handle_t *, nvlist_t *,
    boolean_t verbose);



On Wed, Jun 24, 2015 at 10:43:11PM -0400, Nathan Scott wrote:
> Hi all,
> 
> Just setting up some build machines here, decided to have a crack
> at Solaris again since my old OpenIndiana VM image went to the big
> bit-bucket in the sky recently.
> 
> I went for a fully native build - Solaris and toolchain (compilers)
> from Oracle so that the PCP scripting language modules will function
> correctly with the default perl and python binaries.
> 
> Local setup uses x86_64 KVM virtualisation.  Download the Solaris OS
> SolarisStudio toolchain from Oracle (requires an Oracle account), and
> follow the installation instructions - no issues here for me.
> 
> Once a guest is fully installed and running you'll need to get a few
> extras like git, bison, and flex from the opencsw.org packaging site;
> again all straight forward.
> 
> Next, clone a pcp git repo.  Setup your environment to point to these
> tools:
> CC=/opt/solarisstudio12.3/bin/cc
> CXX=/opt/solarisstudio12.3/bin/CC
> YACC=/opt/csw/bin/bison
> LEX=/opt/csw/bin/flex
> 
> Run "./Makepkgs --without-infiniband --without-manager" (these make
> use of compiler/language features not supported by the native tools -
> the infiniband one looks fairly easy to fix, pmmgr needs configure.ac
> checks to auto-disable it I guess).
> 
> With latest git fixes (will all be in pcp-3.10.6), successful package
> generation results.  Light sanity testing performed - pmcd & pmlogger
> start up, and make data available (locally and remotely).
> 
> cheers.
> 
> --
> Nathan

-- 
Once you have their hardware. Never give it back.
(The First Rule of Hardware Acquisition)

<Prev in Thread] Current Thread [Next in Thread>