The following Info file changes allow the current graphviz238-shlibs-2.38.0-8 to build on 10;.13...
Index: libgraphviz238-shlibs.info
===================================================================
RCS file: /cvsroot/fink/dists/10.9-libcxx/stable/main/finkinfo/graphics/libgraphviz238-shlibs.info,v
retrieving revision 1.5
diff -u -r1.5 libgraphviz238-shlibs.info
--- libgraphviz238-shlibs.info 12 Nov 2016 11:54:57 -0000 1.5
+++ libgraphviz238-shlibs.info 20 Sep 2017 01:05:46 -0000
@@ -35,6 +35,12 @@
sed -i.orig -e '/#include <CGGLContext\.h>/d' plugin/quartz/gvloadimage_quartz.c
# Patch configure to not link like Puma on Yosemite
perl -pi.bak -e 's|10\.\[012\]\*|10.[012][,.]*|g' configure
+
+ # No /usr/lib/tclConfig.sh or /usr/lib/tkConfig.sh on 10.13
+ test "$darwin_vers" -le 16 ||
+ perl -pi -e 's|\$\{TCLSH_EXEC_PREFIX\}/lib/tclConfig.sh|/System/Library/Frameworks/Tcl.framework/tclConfig.sh|g' configure
+ test "$darwin_vers" -le 16 ||
+ perl -pi -e 's|\$\{WISH_EXEC_PREFIX\}/lib/tkConfig.sh|/System/Library/Frameworks/Tk.framework/tkConfig.sh|g' configure
<<
GCC: 4.0
Depends: <<
@@ -139,6 +145,7 @@
(%type_raw[var] = -nox) --without-rsvg \
(%type_raw[var] = -nox) --without-libgd \
(%type_raw[var] = -nox) --without-gts \
+ --enable-php=no \
--disable-r \
--disable-perl \
--disable-python \
@@ -280,7 +287,6 @@
lib/graphviz-2.38/graphviz/*.la
lib/graphviz-2.38/graphviz/guile/*.la
lib/graphviz-2.38/graphviz/lua/*.la
- lib/graphviz-2.38/graphviz/php/*.la
lib/graphviz-2.38/graphviz/ruby/*.la
lib/graphviz-2.38/graphviz/tcl/*.la
lib/pkgconfig
The building of php support is disabled for the moment as I don't see a solution to the compiler errors...
gv_php.cpp:835:51: error: use of undeclared identifier 'rsrc'
static ZEND_RSRC_DTOR_FUNC(SWIG_landfill) { (void)rsrc; }
^
gv_php.cpp:858:7: error: use of undeclared identifier 'ZEND_REGISTER_RESOURCE'
ZEND_REGISTER_RESOURCE(z, value, *(int *)(type->clientdata));
^
gv_php.cpp:879:7: error: use of undeclared identifier 'MAKE_STD_ZVAL'
MAKE_STD_ZVAL(resource);
^
gv_php.cpp:880:7: error: use of undeclared identifier 'ZEND_REGISTER_RESOURCE'
ZEND_REGISTER_RESOURCE(resource, value, *(int *)(type->clientdata));
^
gv_php.cpp:885:18: error: no matching function for call to 'zend_lookup_class'
result = zend_lookup_class(classname, SWIG_PREFIX_LEN + type_name_len, &ce TSRMLS_CC);
^~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_execute.h:43:28: note: candidate function not viable: requires single argument 'name', but 3 arguments were provided
ZEND_API zend_class_entry *zend_lookup_class(zend_string *name);
^
gv_php.cpp:888:18: error: no matching function for call to 'zend_lookup_class'
result = zend_lookup_class((char *)type_name, type_name_len, &ce TSRMLS_CC);
^~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_execute.h:43:28: note: candidate function not viable: requires single argument 'name', but 3 arguments were provided
ZEND_API zend_class_entry *zend_lookup_class(zend_string *name);
^
gv_php.cpp:897:7: error: no member named 'is_ref' in '_zval_struct'
Z_SET_ISREF_P(z);
^~~~~~~~~~~~~~~~
gv_php.cpp:771:32: note: expanded from macro 'Z_SET_ISREF_P'
# define Z_SET_ISREF_P(z) (z)->is_ref = 1
~~~ ^
gv_php.cpp:898:69: error: too many arguments provided to function-like macro invocation
zend_hash_update(HASH_OF(z), (char*)"_cPtr", sizeof("_cPtr"), (void*)&resource, sizeof(zval*), NULL);
^
/usr/include/php/Zend/zend_hash.h:83:9: note: macro 'zend_hash_update' defined here
#define zend_hash_update(ht, key, pData) \
^
gv_php.cpp:898:7: error: use of undeclared identifier 'zend_hash_update'; did you mean '_zend_hash_update'?
zend_hash_update(HASH_OF(z), (char*)"_cPtr", sizeof("_cPtr"), (void*)&resource, sizeof(zval*), NULL);
^~~~~~~~~~~~~~~~
_zend_hash_update
/usr/include/php/Zend/zend_hash.h:78:30: note: '_zend_hash_update' declared here
ZEND_API zval* ZEND_FASTCALL _zend_hash_update(HashTable *ht, zend_string *key,zval *pData ZEND_FILE_LINE_DC);
^
gv_php.cpp:898:7: warning: expression result unused [-Wunused-value]
zend_hash_update(HASH_OF(z), (char*)"_cPtr", sizeof("_cPtr"), (void*)&resource, sizeof(zval*), NULL);
^~~~~~~~~~~~~~~~
gv_php.cpp:953:35: error: use of undeclared identifier 'zend_list_find'; did you mean 'zend_hash_find'?
value = (swig_object_wrapper *) zend_list_find(z->value.lval, &type);
^~~~~~~~~~~~~~
zend_hash_find
/usr/include/php/Zend/zend_hash.h:161:30: note: 'zend_hash_find' declared here
ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
gv_php.cpp:953:50: error: cannot initialize a parameter of type 'const HashTable *' (aka 'const _zend_array *') with an lvalue of type 'zend_long'
(aka 'long long')
value = (swig_object_wrapper *) zend_list_find(z->value.lval, &type);
^~~~~~~~~~~~~
/usr/include/php/Zend/zend_hash.h:161:62: note: passing argument to parameter 'ht' here
ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
gv_php.cpp:960:13: error: no matching function for call to 'zend_rsrc_list_get_rsrc_type'
type_name=zend_rsrc_list_get_rsrc_type(z->value.lval TSRMLS_CC);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_list.h:68:22: note: candidate function not viable: no known conversion from 'zend_long' (aka 'long long') to
'zend_resource *' (aka '_zend_resource *') for 1st argument
ZEND_API const char *zend_rsrc_list_get_rsrc_type(zend_resource *res);
^
gv_php.cpp:974:14: error: no member named 'type' in '_zval_struct'
switch (z->type) {
~ ^
gv_php.cpp:1002:3: error: use of undeclared identifier 'MAKE_STD_ZVAL'
MAKE_STD_ZVAL(pointer);
^
gv_php.cpp:1004:7: error: no matching function for call to 'zend_get_constant'
if (zend_get_constant(const_name, sizeof(const_name) - 1, pointer TSRMLS_CC)) {
^~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_constants.h:69:16: note: candidate function not viable: requires single argument 'name', but 3 arguments were provided
ZEND_API zval *zend_get_constant(zend_string *name);
^
gv_php.cpp:1005:18: error: no member named 'type' in '_zval_struct'
if (pointer->type == IS_LONG) {
~~~~~~~ ^
gv_php.cpp:1009:3: error: use of undeclared identifier 'FREE_ZVAL'
FREE_ZVAL(pointer);
^
gv_php.cpp:1073:30: error: no matching function for call to '_zend_get_parameters_array_ex'
if(ZEND_NUM_ARGS() != 2 || zend_get_parameters_array_ex(2, args) != SUCCESS) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_API.h:260:2: note: expanded from macro 'zend_get_parameters_array_ex'
_zend_get_parameters_array_ex(param_count, argument_array)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/php/Zend/zend_API.h:252:14: note: candidate function not viable: no known conversion from 'zval **[2]' to 'zval *' (aka '_zval_struct *')
for 2nd argument
ZEND_API int _zend_get_parameters_array_ex(int param_count, zval *argument_array);
^
gv_php.cpp:1077:35: error: use of undeclared identifier 'zend_list_find'; did you mean 'zend_hash_find'?
value = (swig_object_wrapper *) zend_list_find((*args[0])->value.lval, &type);
^~~~~~~~~~~~~~
zend_hash_find
/usr/include/php/Zend/zend_hash.h:161:30: note: 'zend_hash_find' declared here
ZEND_API zval* ZEND_FASTCALL zend_hash_find(const HashTable *ht, zend_string *key);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
1 warning and 20 errors generated.
make[4]: *** [libgv_php_la-gv_php.lo] Error 1
Tested on 10.13 with 'fink -m'.
Info file for libgraphviz238-shlibs-2.38.0-8 to build on 10.13
Note that updating the fink swig package to the current upstream 3.0.12 release doesn't solve the compile error in the swig generated php files when --enable-php=yes.
The php build issues may be related to the fact that PHP_MAJOR_VERSION has jumped from 5 in 10.12 to 7 in 10.13.
Does HS have /usr/bin/php7 or just /usr/bin/php? And what does
/usr/bin/php --versionsay?Here's graphviz's tracker for php7: http://www.graphviz.org/mantisbt/view.php?id=2584
Which references SWIG's current lack of support for php7: https://github.com/swig/swig/issues/571
Should we have separate %r for 10.{-12} with php and 10.13 without? 10.11 has /System/Library/Frameworks/Tcl.framework/tclConfig.sh and likewise tk. Can we unify this change for all platforms?
/System/Library/Frameworks/Tcl.framework/tclConfig.sh appears to exist back at least as far as 10.8, so we could apply that patchscript fragment for everyone (and there is no Tk at all now)
Attached files bump graphviz to latest 2.40.1. I think it's ABI compatible (one new library added) with 2.38. It comes with a php7 check (and builds fine on 10.11 with php5).
Last edit: Hanspeter Niederstrasser 2017-10-07
We still need to append my changes...
to the PatchScript to prevent the build failure of
under 10.13.
Last edit: Jack Howarth 2017-09-20
Diff to current info file for new libgraphviz238-shlibs_2.40.1-1
Removing a public Shlibs is a backwards-incompatible change. But it looks like a tcl module not a true dyld shared library for linking by others. That is, it's propagating tcl's own mis-use of the .dylib rather than .so extension and should be a private-shlibs not public. Removing a private shlibs is not a compatibility break because it's private. The loss-of-function on removal of that module is not a dyld fatal on launch.
Which packaging are you looking at? I am suggesting that we go with Hanspeter's libgraphviz238-shlibs-2.40.1-1 with the addition of the missing change required to handle Apple's deprecation of /usr/lib/tclConfig.sh or /usr/lib/tkConfig.sh on 10.13. Without that change, the build on 10.13 skips parts of the tcl components.
Last edit: Jack Howarth 2017-09-21
I noticed that libtkspline.0.dylib was axed in the 2.40 upgrade, but it didn't seem to be getting used anywhere. If it's a tcl module as you say badly built as a dylib, then I can move it to private dylib notiation (and axe the unversioned dylib).
According to the upstream commit messages and comparison with older versions, Tkspline is possibly internal-only, and is definitely a loadable-module rather than a public shared library. And it apparently has always been broken on OS X. So I don't think it's a problem to simply stop shipping that file.
Jack, could you re-post the patchfile? My mouse jumped a quarter inch when trying to click the download icon, and instead clicked the delete icon, which has no confirmation or undo available.
Daniel, I think we should be using Hanspeter's libgraphviz238-shlibs-2.40.1-1 packaging files which appear to be complete here.
2.40.1, as part of dropping Tkspline, appears to have dropped tk altogether. I don't see WISH, tkConfig.sh, or TK_XINCLUDES anywhere, so we can drop the patching of them.
However, 'make install' just failed for me. For some reason, it's recompiling plugin/gtk at that point, and failing because it can't find X11 headers. Working on it...
x11 looks like some sort of random fluke...non-reproducible. It would probably be more portable to use fink-buildenv for X11 path determination (or diagnose why the onboard detection is not sufficient), but that's up to packager.
Looks like the standard autoconf x11 fix fixes it:
so we wouldn't need the --x-includes and --x-libraries flags
There are a few other .dylib that are actually built-with-wrong-extension tcl modules, and so should be marked as private pending upstream fixing how they are built
https://gitlab.com/graphviz/graphviz/issues/1285
Runtime-loadable modules should have their .la in the same package as the binary library itself. That relocation will entail adding
to the -shlibs package.
The .la issue would hold for all the .so for other language bindings as well, right? (guile, lua, php, ruby...)
Updated with moving all language specific .la files to -shlibs to be alongside the <language>/libgv_<language>.so</language></language>
That fails at Files: in one of the subpackages because 10.13 no longer exposes some tcl files loose in /usr/bin, so some tcl support libs don't get built at all. Attached fixes it. Is it portable back to your 10.less-than-13?
Now continuing at https://github.com/fink/fink-distributions/pull/143
Now continuing at https://github.com/fink/fink-distributions/pull/143