Opened 3 years ago

Last modified 3 years ago

#63951 assigned defect

libzzip @0.13.72_0: Build failure with GCC 4.2 (unrecognized command line option "-Warray-bounds")

Reported by: evanmiller (Evan Miller) Owned by: mojca (Mojca Miklavec)
Priority: Normal Milestone:
Component: ports Version: 2.7.1
Keywords: Cc: ballapete (Peter "Pete" Dyballa)
Port: libzzip

Description

:info:build [  0%] Building C object zzip/CMakeFiles/libzzipfseeko.dir/fseeko.c.o
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_libzzip/libzzip/work/build/zzip && /opt/local/bin/gcc-apple-4.2 -DHAVE_CONFIG_H -Dlibzzipfseeko_EXPORTS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_libzzip/libzzip/work/zziplib-0.13.72 -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_libzzip/libzzip/work/build -isystem /opt/local/include -pipe -Os -DNDEBUG -I/opt/local/include -arch ppc -mmacosx-version-min=10.4 -fPIC   -Wpointer-arith -Wsign-compare -Wmissing-declarations -Werror-implicit-function-declaration -Wstrict-aliasing -Warray-bounds -MD -MT zzip/CMakeFiles/libzzipfseeko.dir/fseeko.c.o -MF CMakeFiles/libzzipfseeko.dir/fseeko.c.o.d -o CMakeFiles/libzzipfseeko.dir/fseeko.c.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_archivers_libzzip/libzzip/work/zziplib-0.13.72/zzip/fseeko.c
:info:build cc1: error: unrecognized command line option "-Warray-bounds"

It looks like either zzip/CMakeLists.txt needs a patch or the Portfile needs to blacklist GCC 4.

Attachments (2)

libzzip-main.log (23.9 KB) - added by evanmiller (Evan Miller) 3 years ago.
remove-Warray-bounds.patch (348 bytes) - added by ballapete (Peter "Pete" Dyballa) 3 years ago.
Patch to remove the inadequate compiler option -Warray-bounds

Download all attachments as: .zip

Change History (10)

Changed 3 years ago by evanmiller (Evan Miller)

Attachment: libzzip-main.log added

comment:1 Changed 3 years ago by mojca (Mojca Miklavec)

comment:2 Changed 3 years ago by mojca (Mojca Miklavec)

I don't mind if we unconditionally remove that flag (for everyone) with a link to the relevant (upstream?) ticket until a better patch gets written. Unless I misunderstand, the flag is only used to emit more verbose compiler warnings.

comment:3 Changed 3 years ago by evanmiller (Evan Miller)

@mojca Sounds right to me.

comment:4 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Cc: ballapete added

comment:5 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

With my patch libzzip built – with Python 3.8. make check did not succeed:

INFO:test:ERR 
.ssssss.INFO:test:OUT 
INFO:test:ERR did not open tmp.test_65461/c005-bus-zzip_parse_root_directory: tmp.test_65461/c005-bus-zzip_parse_root_directory: Illegal byte sequence

.........sERROR:test:FIXME: unzip-mem test_65485 is not solved
sssssssssssssssssss.s
======================================================================
FAIL: test_65440 (__main__.ZZipTest)
info unzip -l $(CVE).zip
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/opt/local/var/macports/build/_opt_local_var_macports_sources_nue.de.rsync.macports.org_macports_release_tarballs_ports_archivers_libzzip/libzzip/work/zziplib-0.13.72/test/zziptests.py", line 3231, in test_65440
    self.assertLess(len(run.output), 500)
AssertionError: 651 not less than 500

----------------------------------------------------------------------
Ran 227 tests in 186.321s

FAILED (failures=1, skipped=27)

Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

Attachment: remove-Warray-bounds.patch added

Patch to remove the inadequate compiler option -Warray-bounds

comment:6 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

For me the build fails on PPC Tiger (Mac OS X 10.4.11) and Leopard (Mac OS X 10.5.8). Later today I'll try my patch on Leopard.

comment:7 Changed 3 years ago by ballapete (Peter "Pete" Dyballa)

It built with the patch on PPC Leopard, Mac OS X 10.5.8.

comment:8 in reply to:  6 Changed 3 years ago by barracuda156

Replying to ballapete:

For me the build fails on PPC Tiger (Mac OS X 10.4.11) and Leopard (Mac OS X 10.5.8). Later today I'll try my patch on Leopard.

It builds on Tiger without patches when using gcc7 instead of gcc-4.2.

Last edited 3 years ago by barracuda156 (previous) (diff)
Note: See TracTickets for help on using tickets.