You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucy.apache.org by "Logan Bell (JIRA)" <ji...@apache.org> on 2012/07/18 07:44:34 UTC

[lucy-issues] [jira] [Commented] (LUCY-240) Build Broken on clang

    [ https://issues.apache.org/jira/browse/LUCY-240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13416887#comment-13416887 ] 

Logan Bell commented on LUCY-240:
---------------------------------

Switched from Perl 5.12 (system) to Perl 5.16.x perlbrew. And received a more sane error stack:
./Build
Building Lucy
Building charmonize...

/Users/loganbell/perl5/perlbrew/perls/perl-5.16.0/bin/perl buildbin/meld.pl --probes= --files=../charmonizer/charmonize.c --out=/Users/loganbell/work/lucy/perl/charmonize.c
/Users/loganbell/work/lucy/perl/charmonize.c:1584:14: warning: implicit declaration of function 'isupper' is invalid in C99 [-Wimplicit-function-declaration]
        if (!isupper(sym[i])) {
             ^
/Users/loganbell/work/lucy/perl/charmonize.c:1585:17: warning: implicit declaration of function 'islower' is invalid in C99 [-Wimplicit-function-declaration]
            if (islower(sym[i])) {
                ^
In file included from /Users/loganbell/work/lucy/perl/charmonize.c:2915:
/usr/include/ctype.h:266:1: error: static declaration of 'islower' follows non-static declaration
islower(int _c)
^
/Users/loganbell/work/lucy/perl/charmonize.c:1585:17: note: previous implicit declaration is here
            if (islower(sym[i])) {
                ^
In file included from /Users/loganbell/work/lucy/perl/charmonize.c:2915:
/usr/include/ctype.h:290:1: error: static declaration of 'isupper' follows non-static declaration
isupper(int _c)
^
/Users/loganbell/work/lucy/perl/charmonize.c:1584:14: note: previous implicit declaration is here
        if (!isupper(sym[i])) {
             ^
2 warnings and 2 errors generated.
Failed to compile charmonize at buildlib/Lucy/Build.pm line 123.


Isolated the problem to charmonizer/src/Charmonizer/Core/ConfWriterC.c and its usage of isupper and islower. I modified these calls to use iswupper and iswlower as recommended from the islower/isupper man pages:

COMPATIBILITY
     The 4.4BSD extension of accepting arguments outside of the range of the unsigned char type in locales with large character sets is considered obsolete and may
     not be supported in future releases.  The iswupper() function should be used instead.

Build is now successful.

See attached iswupper_iswlower.patch
                
> Build Broken on clang
> ---------------------
>
>                 Key: LUCY-240
>                 URL: https://issues.apache.org/jira/browse/LUCY-240
>             Project: Lucy
>          Issue Type: Bug
>    Affects Versions: 0.4.0
>         Environment: Mac OS X (Lion)
> cc -v
> Apple clang version 3.1 (tags/Apple/clang-318.0.45) (based on LLVM 3.1svn)
> Target: x86_64-apple-darwin11.4.0
> Thread model: posix
>            Reporter: Logan Bell
>         Attachments: iswupper_iswlower.patch, output
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira