After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 124539 - fixes when build != source dir
fixes when build != source dir
Status: VERIFIED FIXED
Product: libxslt
Classification: Platform
Component: general
1.0.32
Other All
: Normal minor
: ---
Assigned To: Daniel Veillard
Daniel Veillard
Depends on: 125614 125670
Blocks:
 
 
Reported: 2003-10-14 07:42 UTC by Roumen Petrov
Modified: 2009-08-15 18:40 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (6.92 KB, patch)
2003-10-14 07:43 UTC, Roumen Petrov
none Details | Review
updated to CVS from 20031020 (2.14 KB, patch)
2003-10-20 09:49 UTC, Roumen Petrov
none Details | Review
more against CVS from 20031106 (4.78 KB, patch)
2003-11-06 09:48 UTC, Roumen Petrov
none Details | Review

Description Roumen Petrov 2003-10-14 07:42:07 UTC
configure should preserve "source dir" when we try to build outside source tree
Comment 1 Roumen Petrov 2003-10-14 07:43:34 UTC
Created attachment 20685 [details] [review]
proposed patch
Comment 2 Daniel Veillard 2003-10-14 07:52:03 UTC
You must explain your patches, for example the following sounds
just wrong: 

-libexslt_la_LIBADD = $(INSTALLED_XSLT_LIB) $(EXTRA_LIBS)
+libexslt_la_LIBADD = $(top_builddir)/libxslt/libxslt.la
$(LIBXML_LIBS) $(EXTRA_LIBS)

  Why do you do this ? In what environments did you test ?
It's very easy to change the configure.in to adapt to a new
process. But it's very hard to do so without breaking the build
in all the others configurations. Since your patch seems to take
no caution about the existing standard processing I don't feel
I can safely apply it. So 
  1/ explain what this patch is doing in detail and why
  2/ if changing some of processing for a specific option
     then make 100% sure that the change you introduce will
     not break the processing if that option is not enabled

  Sorry I can't apply this in the current state,

Daniel
Comment 3 Roumen Petrov 2003-10-14 08:02:17 UTC
Proposed patch try to fix build/check/install problems when libxml2
and libxslt are build outside source tree.

1.) configure options "--with-libxml-src" is replaced with
"--with-libxml-source" and "--with-libxml-build"
2.) COPYING should be in source dir
3.) install doc/*png files and target for html doc is
$(DESTDIR)$(TARGET_DIR)/html
4.) use $(source) in python dirs
5.) use "libxml build dir." for python tests
Comment 4 Roumen Petrov 2003-10-14 08:08:29 UTC
P.S.:
installed: libxml2-2.4.30 and libxslt-1.0.20 in /usr/{include|lib}
tests with: libxml2-2.5.10 and libxslt-1.0.32 - without installation

In this environment I cannot use INSTALLED_XSLT_LIB ;-)
Comment 5 Daniel Veillard 2003-10-14 08:17:22 UTC
I understand the reason for the patch. I do not understand and
actually disagree with some of the changes. What I ask you is
to provide explanation for the actual changes, in detail. Then
it will help avoiding breakage in other environments.
I pasted one of the change which I'm nearly 100% sure will completely
break nearly all other builds. And I cannot afford to break all
other builds because one person has a specific need and patched
the configure.in file without care, sorry !

Daniel
Comment 6 Roumen Petrov 2003-10-17 08:30:41 UTC
first lets see changes in ./doc/Makefile.am (outside subject of bug):

Without patch, after install, go to .../usr/share/doc/libxslt-1.0.32/html
and run 'grep html/libxslt API*.html' - output show that we should
install $(srcdir)/html/*.html into $(DESTDIR)$(TARGET_DIR)/html
Look into libxslt*html show that we should install
$(srcdir)/html/*.png files too.

I cannot config that my patch fix all broken links in html docs, only
most of them.

Can you agree with this changes ?
Comment 7 Daniel Veillard 2003-10-17 09:03:15 UTC
To me the API*.html are installed in /usr/share/doc/libxslt-1.0.33
not in /usr/share/doc/libxslt-1.0.33/html , I get
APIchunk7.html:<a
href="html/libxslt-xsltutils.html#XSLTSETGENERICERRORFUNC">xsltSetGenericErrorFunc</a>
and 
paphio:/usr/share/doc/libxslt-1.0.33 -> ls html/libxslt-xsltutils.html
html/libxslt-xsltutils.html

That mean in my setup, generated by installing on /usr, the links
are okay. So your patch would even break those as far as I can tell.
So no it seems I even disagree with that part of the patch, I prefer
to have a correct installation for the 99% of the people who get
the preinstalled package than tweak and break it for them in order
to fix some problem for the unfortunate people like you who don't
use the default installation.

Daniel

Daniel
Comment 8 Roumen Petrov 2003-10-17 09:25:54 UTC
:-/ very strange
doc/Makefile.am from current:
==================================================================
...
HTML_DIR=$(datadir)/doc
...
TARGET_DIR=$(HTML_DIR)/$(DOC_MODULE)/html
...
install-data-local: 
...
  -@INSTALL@ -m 0644 $(srcdir)/*.html $(DESTDIR)$(TARGET_DIR)
...
  -@INSTALL@ -m 0644 $(srcdir)/html/*.html $(DESTDIR)$(TARGET_DIR)
...
==================================================================
All *.html and html/*.html go in one folder, i.e. API*.html and
libxslt-*.html are installed in same folder.
Comment 9 Roumen Petrov 2003-10-17 09:32:51 UTC
CFLAGS="-O2 -Wall" ./configure --prefix=/usr --build=XXXX
make
make install DESTDIR=/tmp/checks/libxslt
Comment 10 Daniel Veillard 2003-10-17 10:37:56 UTC
Hum, okay, in that specific case this might be the RPM build
which moves things in the right place in my setup. I applied
that part of the patch, it makes sense . Did the same for libxml2.

  thanks,

Daniel
Comment 11 Roumen Petrov 2003-10-20 09:49:55 UTC
Created attachment 20809 [details] [review]
updated to CVS from 20031020
Comment 12 Roumen Petrov 2003-10-20 09:55:08 UTC
Env.:
- libxml2 (CVS-20031020) is build in source tree.
- libxslt (CVS-20031020):
  .../configure ... --with-libxml-src=<from_above>

attachment with id=20809 solve these problems when libxslt SOURCE !=
libxslt BUILD directory:

1.)
$ cd <BUILD>
$ <SOURCE>/configure ...
$ cd <SOURCE>
$ automake
...
Makefile.am: required file `./COPYING' not found

2.) AC_SUBST(LIBXML_SRC) and LIBXML_SRC in ./python/tests/Makefile.am:
ImportError: ..../libxslt/.libs/libxslt.so.1: undefined symbol:
xmlIsBaseCharGroup
make[2]: [tests] Error 1 (ignored)
make[2]: Leaving directory `.../python/tests'

3.) might is better python tests to be performed in <SOURCE>
-- basic.py
I/O warning : failed to load external entity "test.xsl"
-- exslt.py
Comment 13 Daniel Veillard 2003-10-28 14:29:25 UTC
Okay, I have applied the patch in attachment 20809 [details] [review], this make sense
overall,

  thanks,

Daniel
Comment 14 Daniel Veillard 2003-10-28 14:33:37 UTC
Commited to CVS,

Daniel
Comment 15 Roumen Petrov 2003-11-06 09:48:56 UTC
Created attachment 21235 [details] [review]
more against CVS from 20031106
Comment 16 Roumen Petrov 2003-11-06 10:09:57 UTC
About attachment with id=21235:
- exit code of xslproc for some test is non zero and execution of test
shell script break at this point on some system (tested on OpenBSD, on
linux we can found problem with command "make check SHELL="/bin/sh
-e") => Makefile must contain -(minus) before command
- use -path for "stand" test from tests/REC
- run tests from "tests/general" "tests/reports" in srcdir
- AC_ARG_PROGRAM is commented to suppress warning

Now I have only one difference:
=============
make[2]: Entering directory `XXXX/tests/documents'
1,2c1,2
< warning: failed to load external entity "foofile.xml"
< warning: failed to load external entity "foo_file.xml"
---
> warning: failed to load external entity
"XXXX/tests/documents/foofile.xml"
> warning: failed to load external entity
"XXXX/tests/documents/foo_file.xml"
make[2]: Leaving directory `XXXX/tests/documents'
=============
whose fix depend from warning message output(see #125670)


libxslt is tested with libxml2-2.6.2(that print line numbers) and
files tests/reports/*.err are fine.

All tests succeed on OpenBSD 3.1


Comment 17 Daniel Veillard 2004-03-25 11:46:02 UTC
This should be closed by release of libxslt-1.1.5,
                                                                                
  thanks,
                                                                                
Daniel
Comment 18 Daniel Veillard 2004-03-25 11:49:58 UTC
This should be closed by release of libxslt-1.1.5,
                                                                                
  thanks,
                                                                                
Daniel