Issue 14194 - external/icu does not compile/configure
Summary: external/icu does not compile/configure
Status: CLOSED FIXED
Alias: None
Product: Build Tools
Classification: Code
Component: code (show other issues)
Version: OOo 1.1 Beta2
Hardware: Sun Solaris
: P3 Trivial (vote)
Target Milestone: OOo 1.1 RC
Assignee: Martin Hollmichel
QA Contact: issues@framework
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-05-07 06:17 UTC by pavel
Modified: 2003-06-26 13:10 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
activate hack for hamburg only (627 bytes, patch)
2003-05-14 20:03 UTC, hjs
no flags Details | Diff
proposed new icu patch to fix ccache problem (30.59 KB, patch)
2003-05-26 10:38 UTC, hjs
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description pavel 2003-05-07 06:17:07 UTC
Hi,

oo@ultra:~/BuildDir/ooo_11beta2_src/icu> uname -a
SunOS ultra 5.8 Generic_108528-16 sun4u sparc SUNW,Ultra-5_10

configure in icu:

=============
Building project icu
=============
/oo/BuildDir/ooo_11beta2_src/icu
-------------
mkdir ./unxsols4.pro/misc/build/icu/source
mkdir: Failed to make directory "unxsols4.pro/misc/build/icu/source"; File exists
cd ./unxsols4.pro/misc/build/icu/source && sh -c 'CFLAGS=-O CXXFLAGS=-O
./configure --enable-layout --enable-static --enable-shared=yes
--enable-64bit-libs=no'  && touch so_configured_so_icu
loading cache ./config.cache
checking for ICU version numbers... release 2.2, library 22.0
checking for gcc... /oo//BuildDir/bin/cc
checking whether the C compiler (/oo//BuildDir/bin/cc -O ) works... no
configure: error: installation or configuration problem: C compiler cannot
create executables.
dmake:  Error code 1, while making './unxsols4.pro/misc/build/so_configured_so_icu'
---* TG_SLO.MK *---

ERROR: Error 65280 occurred while making /oo/BuildDir/ooo_11beta2_src/icu
oo@ultra:~/BuildDir/ooo_11beta2_src/icu> 

Everything to this point compiles.

Sun Forte C++ Update 1 compiler.
Comment 1 hjs 2003-05-07 13:06:17 UTC
see CC/CXX redefinition in "icu/makefile.mk". maybe there is something
wrong with your COMPATH variable.
Comment 2 thorsten.martens 2003-05-14 11:24:10 UTC
TM->MH: Looks more like a compiling problem than a framework issue to
me. Can you please have a look ? Thanks !
Comment 3 pavel 2003-05-14 17:16:58 UTC
I removed COMPATH handling from makefile.mk:

#.IF "$(COMNAME)"=="sunpro5"
#CC:=$(COMPATH)$/bin$/cc
#CXX:=$(COMPATH)$/bin$/CC
#.ENDIF          # "$(COMNAME)"=="sunpro5"

and it works now.

Here are my settings:

oo@ultra:~/BuildDir/ooo_11beta2_src> set|egrep "CC|CXX|COMPATH"
CC='/oo//BuildDir/ccache cc'
COMPATH=/oo//BuildDir
CXX=CC

This is probably something to Ken, I think.
Comment 4 hjs 2003-05-14 18:02:04 UTC
i think it's rather me who's to blame. it's some kind of hack needed
for hamburg environment only but i wasn't aware that it could break
elsewhere.
i'll try to find a way to activate it for haburg only.
Comment 5 hjs 2003-05-14 18:26:38 UTC
changed target and owner...
Comment 6 hjs 2003-05-14 18:36:22 UTC
still changing owner...
Comment 7 hjs 2003-05-14 20:03:22 UTC
Created attachment 6206 [details]
activate hack for hamburg only
Comment 8 hjs 2003-05-14 20:05:21 UTC
could you please check if this patch makes the hack less annoying?
Comment 9 pavel 2003-05-16 20:51:14 UTC
I try it and here is the result of running configure with sh -x in icu:

ac_err=
+ test -z  
+ rm -rf conftest.c conftest.out 
+ eval ac_cv_header_inttypes_h=yes 
ac_cv_header_inttypes_h=yes
+ rm -f conftest* 
+ echo $ac_cv_header_inttypes_h 
+ eval test "$ac_cv_header_inttypes_h" = yes 
+ test yes = yes 
+ echo yes 
yes
+ echo inttypes.h 
+ sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___% 
ac_tr_hdr=HAVE_INTTYPES_H
+ cat 
#define HAVE_INTTYPES_H 1
+ test yes = no 
U_HAVE_INTTYPES_H=1
+ test /oo//BuildDir/ccache cc = ccc 
./configure: test: unknown operator cc

Comment 10 hjs 2003-05-19 13:32:07 UTC
are you sure that this "test" works without any of the COMPATH/CC/CXX
handling in the makefile?
Comment 11 pavel 2003-05-23 08:39:05 UTC
I do not know, because I export CC and CXX before the whole build to
use ccahce for cc compiler.
Comment 12 hjs 2003-05-23 17:08:00 UTC
i think i got him! got nothing to do with the "makefile.mk" (except
that my previous changes disabled your ccache...).
in "icu/source/configure" look for the line where $CC is compared with
ccc (the failing test). this is the only test on $CC where it isn't
put in double quotes. fixing this works here with CC set to
"some_wrapper_script cc". please verify and i'll commit the modified
patch.
Comment 13 pavel 2003-05-25 07:50:04 UTC
Could you please attach the patch so I can test it?
Comment 14 hjs 2003-05-26 10:38:07 UTC
Created attachment 6425 [details]
proposed new icu patch to fix ccache problem
Comment 15 pavel 2003-05-26 21:28:46 UTC
I do not think it is the case. Here is the log of configure running
with -x:

PACKAGE=icu
+ echo checking for ICU version numbers... \c 
checking for ICU version numbers... + echo configure:566: checking for
ICU version numbers 
+ geticuversion ./common/unicode/uversion.h 
+ sed -n s/^[   ]*#[    ]*define[       ]*U_ICU_VERSION[       
]*"\([^"]*\)".*/\1/p ./common/unicode/uversion.h 
VERSION=2.2
+ test x2.2 = x 
+ echo 2.2 
+ sed -e s/\.// -e s/^\([^.]*\)$/\1.0/ 
LIB_VERSION=22.0
+ echo 22.0 
+ sed s/\..*// 
LIB_VERSION_MAJOR=22
+ echo release 2.2, library 22.0 
release 2.2, library 22.0
UNICODE_VERSION=3.2
+ set dummy gcc 
ac_word=gcc
+ echo checking for gcc... \c 
checking for gcc... + echo configure:593: checking for gcc 
+ echo ${ac_cv_prog_CC+set} 
+ eval test "${ac_cv_prog_CC+set}" = set 
+ test  = set 
+ test -n /oo//BuildDir/bin/cc 
ac_cv_prog_CC=/oo//BuildDir/bin/cc
CC=/oo//BuildDir/bin/cc
+ test -n /oo//BuildDir/bin/cc 
+ echo /oo//BuildDir/bin/cc 
/oo//BuildDir/bin/cc
+ test -z /oo//BuildDir/bin/cc 
+ echo checking whether the C compiler (/oo//BuildDir/bin/cc -O )
works... \c 
checking whether the C compiler (/oo//BuildDir/bin/cc -O ) works... +
echo configure:706: checking whether the C compiler
(/oo//BuildDir/bin/cc -O ) works 
ac_ext=c
ac_cpp=$CPP $CPPFLAGS
ac_compile=${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5
ac_link=${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS
conftest.$ac_ext $LIBS 1>&5
cross_compiling=
+ cat 

#line 717 "configure"
#include "confdefs.h"

main(){return(0);}
+ eval echo configure:722: "${CC-cc} -o conftest${ac_exeext} $CFLAGS
$CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5" 
+ echo configure:722: /oo//BuildDir/bin/cc -o conftest -O   conftest.c
 1>&5 
+ echo configure: failed program was: 
+ cat conftest.c 
ac_cv_prog_cc_works=no
+ rm -fr conftest.c 
ac_ext=c
ac_cpp=$CPP $CPPFLAGS
ac_compile=${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5
ac_link=${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS
conftest.$ac_ext $LIBS 1>&5
cross_compiling=
+ echo no 
no
+ test no = no 
+ echo configure: error: installation or configuration problem: C
compiler cannot create executables. 
configure: error: installation or configuration problem: C compiler
cannot create executables.
+ exit 1 
dmake:  Error code 1, while making
'./unxsols4.pro/misc/build/so_configured_so_icu'
---* TG_SLO.MK *---

ERROR: Error 65280 occurred while making /oo/BuildDir/ooo_11beta2_src/icu

Log without -x:

=============
Building project icu
=============
/oo/BuildDir/ooo_11beta2_src/icu
-------------
mkdir ./unxsols4.pro/misc/build/icu/source
mkdir: Failed to make directory "unxsols4.pro/misc/build/icu/source";
File exists
cd ./unxsols4.pro/misc/build/icu/source && sh -c 'CFLAGS=-O
CXXFLAGS=-O ./configure --enable-layout --enable-static
--enable-shared=yes --enable-64bit-libs=no'  && touch so_configured_so_icu
loading cache ./config.cache
checking for ICU version numbers... release 2.2, library 22.0
checking for gcc... /oo//BuildDir/bin/cc
checking whether the C compiler (/oo//BuildDir/bin/cc -O ) works... no
configure: error: installation or configuration problem: C compiler
cannot create executables.
dmake:  Error code 1, while making
'./unxsols4.pro/misc/build/so_configured_so_icu'
---* TG_SLO.MK *---

ERROR: Error 65280 occurred while making /oo/BuildDir/ooo_11beta2_src/icu


The problem is here:

checking for gcc... /oo//BuildDir/bin/cc

cc is standard cc:

oo@ultra:~/BuildDir/ooo_11beta2_src/icu> which cc
/opt/SUNWspro/bin/cc

Comment 16 hjs 2003-05-27 10:37:09 UTC
this again looks like the first problem...
did you use both, the new icu patch and the makefile change?
Comment 17 pavel 2003-05-27 18:50:09 UTC
I misunderstood your sentence about:

"... got nothing to do with the makefile.mk ..."

With both patches applied, everything compiles.

Thank you for your work!
Comment 18 hjs 2003-05-28 12:15:35 UTC
commited both changes
Comment 19 gregor.hartmann 2003-06-02 13:45:46 UTC
reviewed
Comment 20 hjs 2003-06-02 15:16:01 UTC
build environment issue.
Comment 21 hjs 2003-06-12 11:46:13 UTC
ooo11rc will contain the fixes
Comment 22 pavel 2003-06-21 16:50:32 UTC
It is not fixed in 11rc!

checking for mmap... yes
checking how to run the C preprocessor... /ultra/BuildDir/ccache cc -E
checking for inttypes.h... yes
./configure: test: unknown operator cc
dmake:  Error code 1, while making
'./unxsols4.pro/misc/build/so_configured_so_icu'
---* TG_SLO.MK *---

ERROR: Error 65280 occurred while making /ultra/BuildDir/ooo_11rc_src/icu
oo@ultra:/ultra/BuildDir/ooo_11rc_src/icu> 

CVS is up-to-date.
Comment 23 khendricks 2003-06-22 13:50:37 UTC
Hi, 
 
Adding myself to CC on this and adding the following build related subissue: 
 
 
icu no longer handles building the static libs with -fPIC as it once did in OOo 643. 
That part of the patch got lost somehow. 
 
We need to  force -fPIC even when building static libs if they will be compiled into 
shared libs later in the build. 
 
So I have used dmake create_patch to add this tidbit to the icu-2.2.patch 
  
*** misc/icu/source/config/mh-linux     2002-01-24 12:35:04.000000000 -0500 
--- misc/build/icu/source/config/mh-linux       2003-06-21 12:39:04.000000000  
-0400 
*************** 
*** 10,15 **** 
--- 10,18 ---- 
  GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS) 
 
  ## Flags for position independent code 
+ STATICCFLAGS = -fPIC 
+ STATICCXXFLAGS = -fPIC 
+ STATICCPPFLAGS = -DPIC 
  SHAREDLIBCFLAGS = -fPIC 
  SHAREDLIBCXXFLAGS = -fPIC 
  SHAREDLIBCPPFLAGS = -DPIC 
*************** 
 
This will not hurt linux x86 and is neede by linux sparc, linux s390, linux ppc, 
 linux x86-64, etc   
 
Okay for cws_srx645_ooo11rc ? 
 
Kevin 
 
Comment 24 hjs 2003-06-23 11:44:56 UTC
arg.. the fix got backed out again. i'll take care of this.

Comment 25 hjs 2003-06-23 16:35:32 UTC
please make sure the patch contains old and new changes
Comment 26 hjs 2003-06-23 17:28:07 UTC
a merger of rev. 1.13 and rev. 1.14 of icu-2.2.patch is now available
as rev. 1.15
Comment 27 pavel 2003-06-23 19:56:57 UTC
Why don't you do that on 11rc?
Comment 28 Martin Hollmichel 2003-06-26 12:54:06 UTC
joined to ooo11rc.
Comment 29 pavel 2003-06-26 13:10:51 UTC
Thanks, Martin.