[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-c-dev
Subject:    xerces-c 3.1.1 fails to reckognize ICU library during the configure
From:       "nikola radovanovic" <nikoladsp () gmx ! com>
Date:       2011-10-19 7:09:41
Message-ID: 20111019070941.276460 () gmx ! com
[Download RAW message or body]

hi,
 i've tried to build xerces-c 3.1.1 with icu support.

 first, i compiled icu 4.8.1 (OUT_DIR 'points' to /home/nikola/vincorex_development):

 ./runConfigureICU Linux --prefix=${OUT_DIR}
 make && make install

 ICU is built and installed in ${OUT_DIR}

 now i've tried to build xerces-3.1.1:
 ./configure --prefix=${OUT_DIR} --disable-rpath --enable-msgloader-inmemory \
--enable-transcoder-icu --with-icu=${OUT_DIR}  make && make install

 xerces is built and installed in ${OUT_DIR}; but ldd on resulting xerces-c.so does \
not show dependency on ICU located in ${OUT_DIR}. LD_LIBRARY_PATH is set to \
${OUT_DIR}/lib.  after few (re)tries, i tried on older compiler (4.5.2) and \
everything went fine.

 problematic part is as follows:

 (from config.log)
........................
 g++ -o conftest -g -O2 -I/home/nikola/vincorex_development/include -lpthread -ldl \
-lm -L/home/nikola/vincorex_development/lib -licui18n -licuuc -licudata -lpthread \
-ldl -lm  *conftest.cpp* -lnsl -lpthread  /tmp/ccxSIK6a.o: In function `main':
 /tmp/conftest.cpp:109: undefined reference to `ucnv_open_48'
 collect2: ld returned 1 exit status
........................

 reason for this check to fail lies is parameter ordering; for example this line runs \
fine:

g++ -o conftest -g -O2 -I/home/nikola/vincorex_development/include  *conftest.cpp* \
-lpthread -ldl -lm -L/home/nikola/vincorex_development/lib -licui18n -licuuc \
-licudata -lpthread -ldl -lm -lnsl -lpthread

this is because i've moved conftest.cpp before library search part (if i'm not \
mistaking, this conforms to GCC)

 i've found this on hard way, hope it will help to someone else. since i dont know \
autotools, i did not wanted to change autofiles, rather i created virtual machine \
hosting older Ubuntu with older GCC and build there

 best regards
 nikola


[Attachment #3 (text/html)]

<span style='font-family:Verdana'><span style='font-size:12px'><div> 
	<span style="font-family: Verdana;"><span style="font-size: 12px;">hi,<br /> 
	i've tried to build xerces-c 3.1.1 with icu support.<br /> 
	<br /> 
	first, i compiled icu 4.8.1 (</span></span><span style="font-family: Verdana;"><span \
style="font-size: 12px;">OUT_DIR 'points' to </span></span><span \
style="font-family:Verdana"><span \
style="font-size:12px">/home/nikola/vincorex_development</span></span><span \
style="font-family: Verdana;"><span style="font-size: 12px;">):<br />   <br /> 
	./runConfigureICU Linux --prefix=${OUT_DIR}<br /> 
	make &amp;&amp; make install<br /> 
	<br /> 
	ICU is built and installed in ${OUT_DIR}<br /> 
	<br /> 
	now i've tried to build xerces-3.1.1:<br /> 
	./configure --prefix=${OUT_DIR} --disable-rpath --enable-msgloader-inmemory \
--enable-transcoder-icu --with-icu=${OUT_DIR}<br />   make &amp;&amp; make install<br \
/>   <br /> 
	xerces is built and installed in ${OUT_DIR}; but ldd on resulting xerces-c.so does \
not show dependency on ICU located in ${OUT_DIR}. LD_LIBRARY_PATH is set to \
${OUT_DIR}/lib.<br />   after few (re)tries, i tried on older compiler (4.5.2) and \
everything went fine.<br />   <br /> 
	problematic part is as follows:<br /> 
	<br /> 
	(from config.log)</span></span><br /> 
	<span style="font-family: Verdana;"><span style="font-size: \
12px;">........................<br />   g++ -o conftest -g -O2&nbsp; \
-I/home/nikola/vincorex_development/include&nbsp;&nbsp;&nbsp; -lpthread -ldl \
-lm&nbsp;&nbsp; -L/home/nikola/vincorex_development/lib -licui18n -licuuc \
-licudata&nbsp; -lpthread -ldl -lm <strong>conftest.cpp</strong> -lnsl&nbsp; \
-lpthread<br />   /tmp/ccxSIK6a.o: In function `main':<br /> 
	/tmp/conftest.cpp:109: undefined reference to `ucnv_open_48'<br /> 
	collect2: ld returned 1 exit status</span></span><br /> 
	<span style="font-family:Verdana"><span \
style="font-size:12px">........................<br />   <br /> 
	reason for this check to fail lies is parameter ordering; for example this line runs \
fine:</span></span><br />   <br /> 
	<span style="font-family:Verdana"><span style="font-size:12px">g++ -o conftest -g \
-O2&nbsp; -I/home/nikola/vincorex_development/include \
<strong>conftest.cpp</strong>&nbsp;&nbsp; -lpthread -ldl -lm&nbsp;&nbsp; \
-L/home/nikola/vincorex_development/lib -licui18n -licuuc -licudata&nbsp; -lpthread \
-ldl -lm -lnsl&nbsp; -lpthread</span></span><br />   <br /> 
	<span style="font-family: Verdana;"><span style="font-size: 12px;">this is because \
i've moved </span></span><span style="font-family:Verdana"><span \
style="font-size:12px">conftest.cpp before library search part</span></span><span \
style="font-family:Verdana"><span style="font-size:12px"> (if i'm not mistaking, this \
conforms to GCC)<br />   <br /> 
	i've found this on hard way, hope it will help to someone else. since i dont know \
autotools, i did not wanted to change autofiles, rather i created virtual machine \
hosting older Ubuntu with older GCC and build there<br />   <br /> 
	best regards<br /> 
	&nbsp;nikola</span></span><br /> 
	<br /> 
	  </div> 
</span></span>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic