Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

icu detection broken on debian testing #1014

Closed
rurban opened this issue Oct 8, 2013 · 6 comments
Closed

icu detection broken on debian testing #1014

rurban opened this issue Oct 8, 2013 · 6 comments

Comments

@rurban
Copy link
Member

rurban commented Oct 8, 2013

error: ICU header '/usr/include/unicode/ucnv.h' not found
error: ICU header '/usr/include/unicode/utypes.h' not found
error: ICU header '/usr/include/unicode/uchar.h' not found

They moved to archspecific /usr/include/x86_64-linux-gnu/unicode/ucnv.h on amd64.
Providing the new incdir to --icuheaders=/usr/include/x86_64-linux-gnu doesn't help,
/usr/bin/icu-config looks good.

libicu-dev 4.8.1.1-13 :amd64: /usr/include/x86_64-linux-gnu/unicode/ucnv.h

Haven't investigated further, should be easy to fix by using icu-config properly

@rurban
Copy link
Member Author

rurban commented Apr 29, 2014

According to https://bugs.launchpad.net/ubuntu/+source/icu/+bug/1247024 icu-config is not the problem. One should first use pkg-config to handle those multiarch problems, and only as fallback icu-config.

Please stop using icu-config, instead use provided pkg-config files.
Icu has transitioned to be multiarch, and thus one can have i686, amd64, 
armhf etc libicu-dev's co-installed and icu-config is not flexible enough to tell 
one which one should be used.
pkg-config on the other hand can resolve it.
Furthermore, one doesn't need to add /usr/include/$(tripplet) cflags / 
search directories as they are default in the compiler.
icu-config cannot encode any single architecture.

@pmichaud
Copy link
Member

Bump. This error means that Parrot doesn't build for me on Kubuntu 14.04.

Pm

@pmichaud
Copy link
Member

Here's the error I'm receiving when attempting to build a fresh clone of Parrot onto Kubuntu 14.04:

pmichaud@kiwi:~/p6$ git clone git@github.com:parrot/parrot
Cloning into 'parrot'...
Warning: Permanently added the RSA host key for IP address '192.30.252.129' to the list of known hosts.
remote: Reusing existing pack: 412653, done.
remote: Counting objects: 79, done.
remote: Compressing objects: 100% (43/43), done.
remote: Total 412732 (delta 30), reused 48 (delta 22)
Receiving objects: 100% (412732/412732), 103.20 MiB | 6.87 MiB/s, done.
Resolving deltas: 100% (307904/307904), done.
Checking connectivity... done.
pmichaud@kiwi:~/p6$ cd parrot
pmichaud@kiwi:~/p6/parrot$ perl Configure.pl
Parrot Version 6.4.0 Configure 2.0
Copyright (C) 2001-2014, Parrot Foundation.

Hello, I'm Configure. My job is to poke and prod your system to figure out
how to build Parrot. The process is completely automated, unless you passed in
the `--ask' flag on the command line, in which case I'll prompt you for a few
pieces of info.

Since you're running this program, you obviously have Perl 5--I'll be pulling
some defaults from its configuration.

init::manifest -      Check MANIFEST.....................................done.
init::defaults -      Set Configure's default values.....................done.
init::install -       Set up installation paths..........................done.
init::hints -         Load platform and local hints files................done.
inter::progs -        Determine what C compiler and linker to use........done.
inter::make -         Is make installed...................................yes.
inter::lex -          Is lex installed................................skipped.
inter::yacc -         Is yacc installed...............................skipped.
auto::gcc -           Is your C compiler actually gcc................yes, 4.8.
auto::glibc -         Is GNU libc installed...............................yes.
auto::backtrace -     Does libc have the backtrace* functions.............yes.
auto::msvc -          Is your C compiler actually Visual C++..........skipped.
auto::attributes -    Detect compiler attributes.........................done.
auto::warnings -      Detect supported compiler warnings.................done.
auto::arch -          Determine CPU architecture and type, and OS........done.
auto::cpu -           Generate CPU specific stuff........................done.
init::optimize -      Enable optimization..................................no.
inter::shlibs -       Determine flags for building shared libraries.....-fPIC.
inter::libparrot -    Should parrot link against a shared library.........yes.
inter::types -        What types should Parrot use.......................done.
auto::ops -           Which opcode files should be compiled in...........done.
auto::pmc -           Which pmc files should be compiled in..............done.
auto::headers -       Probe for C headers................................done.
auto::sizes -         Determine some sizes...............................done.
auto::byteorder -     Compute native byteorder for wordsize.....little-endian.
auto::va_ptr -        Test the type of va_ptr........................register.
auto::format -        What formats should be used for sprintf............done.
auto::isreg -         Does your C library have a working S_ISREG..........yes.
auto::llvm -          Is minimum version of LLVM installed............skipped.
auto::inline -        Does your compiler support inline...................yes.
auto::gc -            Determine allocator to use..........................gms.
auto::memalign -      Does your C library support memalign................yes.
auto::signal -        Determine some signal stuff........................done.
auto::socklen_t -     Determine whether there is socklen_t................yes.
auto::stat -          Detect stat type....................................bsd.
auto::neg_0 -         Determine whether negative zero can be printed......yes.
auto::env -           Does your C library have setenv / unsetenv.........both.
auto::timespec -      Does your system has timespec.......................yes.
auto::infnan -        Is standard C Inf/NaN handling present..............yes.
auto::thread -        Does your system have threads.......................yes.
auto::gmp -           Does your platform support GMP.......................no.
auto::readline -      Does your platform support readline.................yes.
auto::pcre -          Does your platform support pcre.................skipped.
auto::opengl -        Does your platform support OpenGL....................no.
auto::zlib -          Does your platform support zlib......................no.
auto::gettext -       Does your configuration include gettext.............yes.
auto::snprintf -      Test snprintf......................................done.
auto::perldoc -       Is perldoc installed................................yes.
auto::coverage -      Are coverage analysis tools installed...lacking gcov2perl cover.
auto::pod2man -       Is pod2man installed................................yes.
auto::ctags -         Is (exuberant) ctags installed.......................no.
auto::icu -           Is ICU installed...error: ICU header '/usr/include/unicode/ucnv.h' not found
error: ICU header '/usr/include/unicode/utypes.h' not found
error: ICU header '/usr/include/unicode/uchar.h' not found
Something is wrong with your ICU installation!

   If you do not have a full ICU installation:

   --without-icu        Build parrot without ICU support
   --icu-config=(file)  Location of icu-config
   --icuheaders=(path)  Location of ICU headers without /unicode
   --icushared=(flags)  Full linker command to create shared libraries

step auto::icu failed: no result returned at Configure.pl line 93.

auto::libffi -        Is libffi installed.....................lack pkg-config.
auto::ipv6 -          Determine IPV6 capabilities.........................yes.
auto::platform -      Generate a list of platform object files...........done.
auto::alignof -       Determine offsetof values for our types.........skipped.
auto::expect -        Does your compiler support __builtin_expect.........yes.
gen::config_h -       Generate C headers...value for '@has_icu@' in config/gen/config_h/config_h.in is undef at lib/Parrot/Configure/Compiler.pm line 611, <$in> line 149.
..............................done.
gen::core_pmcs -      Generate core pmc list.............................done.
gen::opengl -         Generating OpenGL bindings......................skipped.
gen::makefiles -      Generate makefiles and other build files...value for '@icu_shared@' in config/gen/makefiles/root.in is undef at lib/Parrot/Configure/Compiler.pm line 611, <$in> line 135.
........done.
gen::config_pm -      Record configuration data for later retrieval...Use of uninitialized value in join or string at config/gen/config_pm.pm line 71.
...done.
During configuration the following steps failed:
    52:  auto::icu
You should diagnose and fix these errors before calling 'make'
pmichaud@kiwi:~/p6/parrot$ 

@rurban
Copy link
Member Author

rurban commented May 21, 2014

Fixed in branch rurban/icuheaders-gh1014

We must not die when perl does not find the icuheaders.
cc needs to find it, and it does it in the probe, if they are in the proper cc searchdir.

debian multi-arch:

auto::icu -           Is ICU installed...
Discovered icu-config --exists returns 0
icu-config found... good!
Trying icu-config with '--ldflags-searchpath --ldflags-libsonly'
icushared:  captured -L/usr/lib/x86_64-linux-gnu -licui18n -licuuc -licudata 
For icushared, found -L/usr/lib/x86_64-linux-gnu  -licuuc -licudata  and 0
Trying icu-config with '--prefix'
icuheaders:  captured /usr

For icuheaders, found /usr/include and 0
icuconfig: icu-config
icushared='-L/usr/lib/x86_64-linux-gnu  -licuuc -licudata '
headers='/usr/include'
g++  -D_GNU_SOURCE -DHASATTRIBUTE_CONST  -DHASATTRIBUTE_DEPRECATED  -DHASATTRIBUTE_MALLOC  -DHASATTRIBUTE_NONNULL  -DHASATTRIBUTE_NORETURN  -DHASATTRIBUTE_PURE  -DHASATTRIBUTE_UNUSED  -DHASATTRIBUTE_WARN_UNUSED_RESULT  -DHASATTRIBUTE_HOT  -DHASATTRIBUTE_COLD  -DHAS_GETTEXT  -I./include -c test_23972.c
g++  -fstack-protector -L/usr/local/lib -Wl,-E test_23972.o  -o test_23972  -lnsl -ldl -lm -lcrypt -lutil -lpthread -lrt -lgmp -lreadline 
./test_23972
unicode/ucnv.h OK
Your compiler found the icu headers... good!

Setting Configuration Data:
(
    verbose => undef,
);

                      Is ICU installed....................................yes.

rurban pushed a commit that referenced this issue May 21, 2014
We must not die when perl does not find the icuheaders.
cc needs to find it, and it does it in the probe if they are
in the proper cc searchdir.

icu-config does not store the full headerpath, only pkg-config.
Fixes [GH #1014] on debian/ubuntu
@pmichaud
Copy link
Member

I can confirm that the branch is working for me on Kubuntu 14.04.

Pm

@rurban rurban self-assigned this May 21, 2014
rurban pushed a commit that referenced this issue May 21, 2014
We must not die when perl does not find the icuheaders.
cc needs to find it, and it does it in the probe if they are
in the proper cc searchdir.

icu-config does not store the full headerpath, only pkg-config.
Fixes [GH #1014] on debian/ubuntu
@rurban
Copy link
Member Author

rurban commented May 21, 2014

Thanks. Also worked fine on solaris. Merged into master

@rurban rurban closed this as completed May 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants