lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] error building libxml using install_msw.sh


From: Greg Chicares
Subject: Re: [lmi] error building libxml using install_msw.sh
Date: Thu, 24 Mar 2011 16:49:40 +0000
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101207 Thunderbird/3.1.7

On 2011-03-24 14:51Z, Vadim Zeitlin wrote:
> 
>  I wanted to set up an "official" installation of LMI to try to reproduce
> some bugs which I can't see with MSVC, so I installed a fresh Windows 7
> virtual machine and decided to exactly follow instructions in the INSTALL
> file. Installation of Cygwin went exactly as described but installing LMI
> itself failed.

That's useful to know. I've been meaning to test the latest Cygwin version,
but my dedicated test machine has lost its connection to my network, and I
haven't had time to crawl up in the attic to inspect the cables yet.

> Looking at the log file, the root of the problem seems to be
> this error during the build of libxml:
> 
> /bin/sh ./libtool --tag=CC --mode=link /MinGW_/bin/gcc  -g -O2 -pedantic -W 
> -Wformat -Wunused -Wimplicit -Wreturn-type -Wswitch -Wcomment -Wtrigraphs 
> -Wformat -Wchar-subscripts -Wuninitialized -Wparentheses -Wshadow 
> -Wpointer-arith -Wcast-align -Wwrite-strings -Waggregate-return 
> -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Winline 
> -Wredundant-decls  -lws2_32 -o xmllint.exe  xmllint.o ./libxml2.la     
> -lws2_32 
> /MinGW_/bin/gcc -g -O2 -pedantic -W -Wformat -Wunused -Wimplicit 
> -Wreturn-type -Wswitch -Wcomment -Wtrigraphs -Wformat -Wchar-subscripts 
> -Wuninitialized -Wparentheses -Wshadow -Wpointer-arith -Wcast-align 
> -Wwrite-strings -Waggregate-return -Wstrict-prototypes -Wmissing-prototypes 
> -Wnested-externs -Winline -Wredundant-decls -o xmllint.exe xmllint.o  
> ./.libs/libxml2.a -lws2_32

Comparing your last line above to what I have in my latest log, everything
looks exactly the same until shortly before the end [some whitespace added]:

  yours: ... -Wredundant-decls -o       xmllint.exe xmllint.o  
./.libs/libxml2.a     -lws2_32
  mine:  ... -Wredundant-decls -o .libs/xmllint.exe xmllint.o  
./.libs/libxml2.dll.a -lws2_32 -L/opt/lmi/local/lib

except that here it succeeds, and indeed a few lines later mine reports:
  creating xmllint.exe
but yours reports an error:

> xmllint.o: In function `xmllintExternalEntityLoader':
> C:/opt/lmi/xml-scratch/libxml2-2.6.26/xmllint.c:306: undefined reference to 
> `_imp__xmlFree'
> C:/opt/lmi/xml-scratch/libxml2-2.6.26/xmllint.c:303: undefined reference to 
> `_imp__xmlFree'
[...]
> xmllint.o:C:/opt/lmi/xml-scratch/libxml2-2.6.26/xmllint.c:2415: more 
> undefined references to `_imp__xmlFree' follow
> collect2: ld returned 1 exit status
> make[3]: *** [xmllint.exe] Error 1
> make[3]: Leaving directory `/opt/lmi/xml-scratch/libxml2-2.6.26'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/opt/lmi/xml-scratch/libxml2-2.6.26'
> make[1]: *** [all] Error 2
> make[1]: Leaving directory `/opt/lmi/xml-scratch/libxml2-2.6.26'
> make: *** [libxml2/2.6/libxml2-2.6.26] Error 2
> 
>  Surprisingly, the build didn't stop after this but went ahead resulting in
> errors when building libxslt and then in link errors when linking all LMI
> executables because of the missing libexslt.
> 
>  So now I have the following questions:
> 
> 1. Should I try to understand why does linking xmllint fail

Yes, I think so. From above, and more aggressively snipped:
  yours: ... ./.libs/libxml2.a     -lws2_32
  mine:  ... ./.libs/libxml2.dll.a -lws2_32 -L/opt/lmi/local/lib
So I'm using a dll where you're linking a static library, and I have an
extra '-L' which points to $(prefix)/lib/ ; maybe those are both problems.
FWIW, here are the relevant libraries that I have in that directory:

/[0]$cd /opt/lmi/local/lib
/opt/lmi/local/lib[0]$ls *xml*
libxml2.dll.a  libxml2.la  xml2Conf.sh
/opt/lmi/local/lib[0]$ls -l *xml*
-rwxr-xr-x 1 Arktos None 1040376 2010-11-17 16:53 libxml2.dll.a
-rwxr-xr-x 1 Arktos None     778 2010-11-17 16:53 libxml2.la
-rw-r--r-- 1 Arktos None     213 2010-11-17 16:53 xml2Conf.sh

> or can we just
>    skip building it as we (probably) don't need it at all?

It's used by the 'check_concinnity' target in 'GNUmakefile'.

> 2. Shouldn't the build stop if any of dependencies fail to build?

The libxml2 makefile terminates as you'd expect, but the 'install_msw.sh'
script keeps going...for no good reason. (The machines in our office are
so slow that the script has to be run overnight anyway, so it doesn't
matter whether they stop as soon as a fatal error occurs.) I guess 'set -e'
isn't what we really want because it ignores commands that aren't "simple",
so should I make a change like
  -make $coefficiency -f install_libxml2_libxslt.make
  +make $coefficiency -f install_libxml2_libxslt.make || exit 3
for each line that calls for early termination on failure?



reply via email to

[Prev in Thread] Current Thread [Next in Thread]