[xsd-users] Build & deployment

Boris Kolpackov boris at codesynthesis.com
Mon Mar 5 09:52:21 EST 2007


Hi Ray,

Ray Lischner <rlischner at proteus-technologies.com> writes:

> To build xsd from source requires building Xerces from source, too.
> Apparently, the makefile links the Xerces library by naming the full
> path on the command line. As a result, the xsd program points to that
> path. This makes deployment difficult. I want xsd to point to just the
> tail name, and let LD_LIBRARY_PATH or ld.so.conf name the directory
> that contains xerces-c.so. (Ditto for Boost.)

Actually, the -rpath option is used to embed all library paths
into the xsd executable. This is only done for library dependencies
that are configured in the "development" mode. The idea was that
when you build things for development, you don't want to mess
with LD_LIBRARY_PATH and -rpath is a good thing. When building a
version for deployment you would use installed dependencies that
don't get -rpath added to them. But this does not work well for
XSD since one needs to use development build of Xerces-C++.

I've added an option to build to disable the use of -rpath.
Unfortunately, it required some backwards-incompatible changes
so I had to bump the build interface version from 0.2 to 0.3.
This, in turn, required changes in libcult, libfrontend-elements,
libbackend-elements, libxsd-frontend, and xsd itself. We are
planning to release the first beta of xsd-2.4.0 some time soon
and these changes will be released then. If you would like to
have this fix sooner, I can bundle all the necessary stuff
into one archive and send it to you.

Thanks for reporting this problem!


> P.S. I find it mildly annoying that running make -n from the
> top-level xsd-2.3.1 directory ignores the -n option and runs
> make for real.

I can explain what's going on here. Build is a non-recursive
build system. The root level makefile includes makefiles for
everything that needs to be built, including examples and tests.
Examples and tests use the xsd translator to compile test schemas
to C++. Auto-dependency generation technique is used to extract
dependency information from those C++ files. So when you invoke
GNU make from the root it tries to reads in all the makefiles,
including dependency files which do not exist. Next make tries
to build those dependencies and since they are included makefiles,
make ignores the -n option while building them. But some of the
dependencies are for xsd-generated C++ files, so make tries
to build them (with -n ignored). But they, in turn, need
the xsd translator so GNU make has no choice but to go ahead
and build xsd for real.


hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20070305/49a2c636/attachment.pgp


More information about the xsd-users mailing list