Pivotal Greenplum: 4.3.4.x
OS: RHEL 6.x
Attempting to run madpack after installing madlib-ossv1.10.0_pv1.9.7_gpdb4.3-rhel5-x86_64.gppkg gives the following error on Greenplum:
[gpadmin@mdw tmp]$ $GPHOME/madlib/bin/madpack install -s madlib -p greenplum -c gpadmin@mdw:5432/gpadmin madpack.py : INFO : Detected Greenplum DB version 4.3. madpack.py : ERROR : This version is not among the Greenplum DB versions for which MADlib support files have been installed (4.3ORCA).
$GPHOME/madlib/Current/madpack/madpack.py file checks if the Greenplum version includes the ORCA optimizer. Any version 4.3.5 and above requires the MADlib ORCA gppkg installer. However, the madpack code is incorrectly checking for 4.3.4 which will cause the version mismatch error.
The current workaround is to change line 1195 in madpack.py from:
elif _is_rev_gte(_get_rev_num(dbver), _get_rev_num('4.3.4')):
elif _is_rev_gte(_get_rev_num(dbver), _get_rev_num('4.3.5')):
Re-running the madpack command should now complete successfully.
If you attempted to install madlib-ossv1.10.0_pv1.9.7_gpdb4.3orca-rhel5-x86_64.gppkg to get around the version checking rather than modifying the madpack.py file, you will get the following error when running madpack:
psql:/tmp/madlib.jJshyJ/array_ops/array_ops.sql_in.tmp:315: ERROR: incompatible library "/greenplum/greenplum-db/madlib/Versions/1.10.0/ports/greenplum/4.3ORCA/lib/libmadlib.so": magic block mismatch (dfmgr.c:430) DETAIL: Magic block has unexpected length or padding difference.
If you then uninstall the MADlib orca gppkg version, make sure to remove the folder $GPHOME/madlib/Current/ports/greenplum/4.3ORCA
Otherwise when attempting to install the non-ORCA version (assuming you haven't modified madpack.py), you will get the following errors when running madpack:
m4:/greenplum/greenplum-db/madlib/Versions/1.10.0/ports/greenplum/modules/array_ops/array_ops.sql_in:11: cannot open `SQLCommon.m4': No such file or directory psql:/tmp/madlib.EUg0AN/array_ops/array_ops.sql_in.tmp:241: ERROR: could not access file "/greenplum/greenplum-db/madlib/Versions/1.10.0/lib/libmadlib.so": No such file or directory