Opened 6 years ago

Last modified 6 years ago

#57957 new defect

p5.26-encode @2.990.0 +universal: error: static declaration of 'S_is_utf8_overlong_given_start_byte_ok' follows non-static declaration

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by:
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: kencu (Ken)
Port: p5-encode

Description

Building p5.26-encode @2.990.0 universal fails:

/usr/bin/clang -c -I./Encode  -I../Encode -fno-common -DPERL_DARWIN -mmacosx-version-min=10.13 -pipe -Os -fno-strict-aliasing -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUTENV -arch x86_64 -arch i386 -O3   -DVERSION=\"2.18\" -DXS_VERSION=\"2.18\"  "-I/opt/local/lib/perl5/5.26/darwin-thread-multi-2level/CORE"   Unicode.c
In file included from Unicode.xs:11:
./../Encode/encode.h:267:16: warning: 'HIGHEST_REPRESENTABLE_UTF8' macro redefined [-Wmacro-redefined]
#       define HIGHEST_REPRESENTABLE_UTF8                                       \
               ^
/opt/local/lib/perl5/5.26/darwin-thread-multi-2level/CORE/utf8.h:240:12: note: previous definition is here
#   define HIGHEST_REPRESENTABLE_UTF8  "\xFF\x80\x8F\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF\xBF"
           ^
1 warning generated.
In file included from Unicode.xs:11:
./../Encode/encode.h:416:19: warning: implicit declaration of function 'S_is_utf8_overlong_given_start_byte_ok' is invalid in C99 [-Wimplicit-function-declaration]
    is_overlong = S_is_utf8_overlong_given_start_byte_ok(s, len);
                  ^
./../Encode/encode.h:488:1: error: static declaration of 'S_is_utf8_overlong_given_start_byte_ok' follows non-static declaration
S_is_utf8_overlong_given_start_byte_ok(const U8 * const s, const STRLEN len)
^
./../Encode/encode.h:416:19: note: previous implicit declaration is here
    is_overlong = S_is_utf8_overlong_given_start_byte_ok(s, len);
                  ^
1 warning and 1 error generated.

Building p5.26-encode @2.980.0 universal worked fine.

Building p5.26-encode @2.990.0 non-universal works.

Attachments (1)

main.log (53.9 KB) - added by ryandesign (Ryan Carsten Schmidt) 6 years ago.

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log added

comment:1 Changed 6 years ago by kencu (Ken)

so I fixed this, but is the universal variant still broken somehow?

comment:2 in reply to:  1 Changed 6 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: kencu added

Replying to kencu:

so I fixed this,

Ah yes, I see you committed [34d699f3eca21c1661f8b3099848aae382ab8e11/macports-ports].

but is the universal variant still broken somehow?

It builds now. I don't know if it is still broken in some other way.

I guess I need to report this problem to the developers. Or, if you have time to do so, that would be great.

comment:3 Changed 6 years ago by kencu (Ken)

I must admit, I don't understand this problem yet.

Why only on older systems? Even apparently with newer compilers? Or is it a 32bit thing?

Dave says it's not an issue on perl 5.28, as perl 5.28 "internally defines the function".

I feel like those perl devs would eat me alive and spit me out...

Last edited 6 years ago by kencu (Ken) (previous) (diff)

comment:4 Changed 6 years ago by kencu (Ken)

OK. It's an i386 thing only. This fails:

sudo port -v build p5.26-encode supported_archs="i386"

whereas the x86_64 build succeeds on the same system.

Forcing the build to use -std=c99 does not fix it. To do that, you edit Makefile.PL and add:

    $ccflags .= ' -std=c99';
Note: See TracTickets for help on using tickets.