Extension dependencies in win32 build
| From: | Steph Fox | Date: | Fri, 14 Dec 2007 09:40:13 +0000 |
| Subject: | Extension dependencies in win32 build | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-34031@lists.php.net to get a copy of this message | ||
Hi all,
Having spent a few hours tussling with the load-order bogey, I found what I think is a bit of a gap in the win32 build process.
There are no configure warnings at all when there's a missing extension dependency... only a bailout if you try to build a dependency as shared for a static extension. The need to bail out would depend on how full-on the 'dependency' in question is, and I'd guess that can be variable.
Trivial patch attached, would've saved me a lot of brain-ache if it had been in CVS yesterday but see what you think.
- Steph
Index: win32/build/confutils.js =================================================================== RCS file: /repository/php-src/win32/build/confutils.js,v retrieving revision 1.60.2.1.2.8.2.1 diff -u -r1.60.2.1.2.8.2.1 confutils.js --- win32/build/confutils.js 14 Nov 2007 19:38:57 -0000 1.60.2.1.2.8.2.1 +++ win32/build/confutils.js 14 Dec 2007 09:22:54 -0000 @@ -1009,7 +1009,15 @@ ADD_FLAG("LDFLAGS_" + EXT, "/libpath:$(BUILD_DIR)"); ADD_FLAG("LIBS_" + EXT, "php_" + dependson + ".lib"); ADD_FLAG("DEPS_" + EXT, "$(BUILD_DIR)\\php_" + dependson + ".lib"); - } + } else { + if (dep_present == "no") { + if (ext_shared) { + WARNING(extname + " has a missing dependency: " + dependson); + } else { + ERROR("Cannot build " + extname + "; " + dependson + " not enabled"); + } + } + } // dependency is statically built-in to PHP } function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)
Index: win32/build/confutils.js =================================================================== RCS file: /repository/php-src/win32/build/confutils.js,v retrieving revision 1.60.2.1.2.8.2.1 diff -u -r1.60.2.1.2.8.2.1 confutils.js --- win32/build/confutils.js 14 Nov 2007 19:38:57 -0000 1.60.2.1.2.8.2.1 +++ win32/build/confutils.js 14 Dec 2007 09:22:54 -0000 @@ -1009,7 +1009,15 @@ ADD_FLAG("LDFLAGS_" + EXT, "/libpath:$(BUILD_DIR)"); ADD_FLAG("LIBS_" + EXT, "php_" + dependson + ".lib"); ADD_FLAG("DEPS_" + EXT, "$(BUILD_DIR)\\php_" + dependson + ".lib"); - } + } else { + if (dep_present == "no") { + if (ext_shared) { + WARNING(extname + " has a missing dependency: " + dependson); + } else { + ERROR("Cannot build " + extname + "; " + dependson + " not enabled"); + } + } + } // dependency is statically built-in to PHP } function EXTENSION(extname, file_list, shared, cflags, dllname, obj_dir)