openJDK7 build fails on 64bit cblfs linux

luxInteg lux-integ at btconnect.com
Sat Apr 16 17:03:25 UTC 2011


On Saturday 16 April 2011 17:00:55 Kelly O'Hair wrote:
> The Linux 64bit system I have (Fedora 9) has no libiconv libraries, you
> just include iconv.h and use the iconv*() functions, no special linking

The   salient parts of my post  if I may  repeat them here are :-
For a fix I I tried the following to no avail:-
--A) Looked through the README.builds.html
 ( http://hg.openjdk.java.net/jdk7/build/raw-file/tip/README-builds.html )
and found no obvoious settings for  forcing the build program to see
 /usr/lib/libiconv.
 --B) set the envronmental variable  LDFLAGS="-L/usr/lib"
 --C) made a wild guess and set the environmental variable  LIBS="liconv"
 --D) tried setting LD_LIBRARY_PATH=/usr/lib:${LD_LIBRARY_PATH}   which
 resulted in  complaints   that it should be unset


Please note the sequence I reported,  I tried  builds with and without LDFLAGS 
set   (and with and without  a guess variable called LIBS="-liconv"
SO  libiconv  need NOT be called.  therefore the  presence of libiconv.so on 
the system   need not be called for any linking if it   NOT needed 

 
> options are needed, e.g. I have never had to use -liconv on the link line
> for the npt library we create in the jdk. (The jdk npt libtrary provises
> native platform transformations of characters for shared libraries loaded
> before JVM initialization, like debugger VM agents and things like hprof.)
> 


> What kind of Linux is this?

This is blfs linux built by compiling sources from scratch.  I use pue64-bit 
i.e. non-multilib builds.  I think you will find the Redhat/Fedora builds are 
multilib. So far   my experience of  {C}BLFS  thousands of source files have 
been compiled successfully using   make, cmake, ant,  jam, boost-jam, scons  
etc. 

here is a link to the building of  icedTea  for instance
( http://www.linuxfromscratch.org/blfs/view/svn/general/icedtea6.html )

Amd here is a link to the ageing cblfs build of openjdk
http://cblfs.cross-lfs.org/index.php/OpenJDK


 I think iconv is part of glibc 
( http://www.gnu.org/s/hello/manual/libc/glibc-iconv-Implementation.html ) 
but some programs  seem to require    the installation of separate 
installation of libiconv.




> What I suspect is that someone has corralled the iconv*() functions into
> it's own library and now you not only need to include iconv.h, but you
> need to link with -liconv on this system. You should check your man page
> on iconv or iconv_open.
> 
> If the -liconv needs to be added to the link line, we probably cannot add
> that for everyone because it does not exist everywhere.
> You might try
>    make OTHER_LDFLAGS=-liconv
> but that will add it to everyone's link, in the jdk/make/java/npt/Makefile,
> you will need a OTHER_LDFLAGS += -liconv
> after the include of Library.gmk.

the  instructions I am using to build openJDK are 
A) set the environmental variables I reported in   the previous posting   THEN  
execute :-

B)  make sanity [ARCH_DATA_MODEL=64] 

followed by

C) make [ARCH_DATA_MODEL=64] [ALT_OUTPUTDIR=/opt/openJDK]


QUESTION(s):
where would I add//execute   the suggested 
"make OTHER_LDFLAGS=-liconv"  ??
or do I need to use other instructions of if so what are these?


> you will need a OTHER_LDFLAGS += -liconv
> after the include of Library.gmk.
could you be more specific about  file  or files  to edit etc  please?


and thanks so far
> 
> -kto
> 




More information about the build-dev mailing list