Summary: | dev-libs/libzip: revdeps fail to compile with differing CC (was: dev-util/rizin-0.3.1-r2 fails to compile: zip.h:285:21: error: expected ‘:, ‘,, ‘;, ‘} or ‘__attribute__ before ‘str) | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Agostino Sarubbo <ago> |
Component: | Current packages | Assignee: | Gentoo KDE team <kde> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | ajak, ionen, sam, srcshelton, telans, waebbl-gentoo |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/nih-at/libzip/issues/253 https://bugs.gentoo.org/show_bug.cgi?id=944790 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 408963 | ||
Attachments: | build.log |
Description
Agostino Sarubbo
2021-12-29 13:50:11 UTC
Created attachment 760751 [details]
build.log
build log and emerge --info
Error(s) that match a know pattern in addition to what has been reported in the summary: Library util found: NO Program node found: NO Program tree-sitter found: NO Run-time dependency xxhash found: NO (tried pkgconfig and cmake) /usr/include/zip.h:285:21: error: expected ‘:’, ‘,’, ‘;’, ‘}’ or ‘__attribute__’ before ‘str’ The actual errors: ../rizin-v0.3.1/librz/io/p/io_zip.c:145:48: error: ‘struct zip_stat’ has no member named ‘size’ 145 | ut8 *buf = calloc(1, sb.size); | ^ ../rizin-v0.3.1/librz/io/p/io_zip.c:147:57: error: ‘struct zip_stat’ has no member named ‘size’ 147 | zip_fread(zFile, buf, sb.size); | ^ ../rizin-v0.3.1/librz/io/p/io_zip.c:148:65: error: ‘struct zip_stat’ has no member named ‘size’ 148 | rz_buf_set_bytes(zfo->b, buf, sb.size); | ^ ../rizin-v0.3.1/librz/io/p/io_zip.c: In function ‘rz_io_zip_get_files’: ../rizin-v0.3.1/librz/io/p/io_zip.c:180:38: error: ‘struct zip_stat’ has no member named ‘name’ 180 | if ((name = strdup(sb.name))) { | ^ ../rizin-v0.3.1/librz/io/p/io_zip.c: In function ‘rz_io_zip_flush_file’: ../rizin-v0.3.1/librz/io/p/io_zip.c:204:32: warning: implicit declaration of function ‘zip_source_buffer’; did you mean ‘zip_source_free’? [-Wimplicit-function-declaration] 204 | struct zip_source *s = zip_source_buffer(zipArch, tmp, tmpsz, 0); | ^~~~~~~~~~~~~~~~~ | zip_source_free ../rizin-v0.3.1/librz/io/p/io_zip.c:204:32: warning: initialization of ‘struct zip_source *’ from ‘int’ makes pointer from integer without a cast [-Wint-conversion] ../rizin-v0.3.1/librz/io/p/io_zip.c: In function ‘rz_io_zip_create_new_file’: ../rizin-v0.3.1/librz/io/p/io_zip.c:241:43: error: ‘struct zip_stat’ has no member named ‘name’ 241 | zfo->name = strdup(sb ? sb->name : filename); | ^~ ../rizin-v0.3.1/librz/io/p/io_zip.c:242:43: error: ‘struct zip_stat’ has no member named ‘index’ 242 | zfo->entry = !sb ? -1 : sb->index; | ^~ ../rizin-v0.3.1/librz/io/p/io_zip.c: In function ‘rz_io_zip_alloc_zipfileobj’: ../rizin-v0.3.1/librz/io/p/io_zip.c:265:23: error: ‘struct zip_stat’ has no member named ‘name’ 265 | if (sb.name != NULL) { | ^ ../rizin-v0.3.1/librz/io/p/io_zip.c:266:38: error: ‘struct zip_stat’ has no member named ‘name’ 266 | if (strcmp(sb.name, filename) == 0) { | ^ ../rizin-v0.3.1/librz/io/p/io_zip.c: In function ‘rz_io_zip_get_by_file_idx’: ../rizin-v0.3.1/librz/io/p/io_zip.c:368:45: error: ‘struct zip_stat’ has no member named ‘name’ 368 | filename = strdup(sb.name); | ^ (In reply to John Helmert III from comment #3) > The actual errors: > > ../rizin-v0.3.1/librz/io/p/io_zip.c:145:48: error: ‘struct zip_stat’ has no > member named ‘size’ > 145 | ut8 *buf = calloc(1, sb.size); > | ^ > ../rizin-v0.3.1/librz/io/p/io_zip.c:147:57: error: ‘struct zip_stat’ has no > member named ‘size’ > 147 | zip_fread(zFile, buf, sb.size); > | ^ > ../rizin-v0.3.1/librz/io/p/io_zip.c:148:65: error: ‘struct zip_stat’ has no > member named ‘size’ > 148 | rz_buf_set_bytes(zfo->b, buf, > sb.size); > | ^ > ../rizin-v0.3.1/librz/io/p/io_zip.c: In function ‘rz_io_zip_get_files’: > ../rizin-v0.3.1/librz/io/p/io_zip.c:180:38: error: ‘struct zip_stat’ has no > member named ‘name’ > 180 | if ((name = strdup(sb.name))) { > | ^ > ../rizin-v0.3.1/librz/io/p/io_zip.c: In function ‘rz_io_zip_flush_file’: > ../rizin-v0.3.1/librz/io/p/io_zip.c:204:32: warning: implicit declaration of > function ‘zip_source_buffer’; did you mean ‘zip_source_free’? > [-Wimplicit-function-declaration] > 204 | struct zip_source *s = zip_source_buffer(zipArch, tmp, > tmpsz, 0); > | ^~~~~~~~~~~~~~~~~ > | zip_source_free > ../rizin-v0.3.1/librz/io/p/io_zip.c:204:32: warning: initialization of > ‘struct zip_source *’ from ‘int’ makes pointer from integer without a cast > [-Wint-conversion] > ../rizin-v0.3.1/librz/io/p/io_zip.c: In function ‘rz_io_zip_create_new_file’: > ../rizin-v0.3.1/librz/io/p/io_zip.c:241:43: error: ‘struct zip_stat’ has no > member named ‘name’ > 241 | zfo->name = strdup(sb ? sb->name : filename); > | ^~ > ../rizin-v0.3.1/librz/io/p/io_zip.c:242:43: error: ‘struct zip_stat’ has no > member named ‘index’ > 242 | zfo->entry = !sb ? -1 : sb->index; > | ^~ > ../rizin-v0.3.1/librz/io/p/io_zip.c: In function > ‘rz_io_zip_alloc_zipfileobj’: > ../rizin-v0.3.1/librz/io/p/io_zip.c:265:23: error: ‘struct zip_stat’ has no > member named ‘name’ > 265 | if (sb.name != NULL) { > | ^ > ../rizin-v0.3.1/librz/io/p/io_zip.c:266:38: error: ‘struct zip_stat’ has no > member named ‘name’ > 266 | if (strcmp(sb.name, filename) == 0) { > | ^ > ../rizin-v0.3.1/librz/io/p/io_zip.c: In function ‘rz_io_zip_get_by_file_idx’: > ../rizin-v0.3.1/librz/io/p/io_zip.c:368:45: error: ‘struct zip_stat’ has no > member named ‘name’ > 368 | filename = strdup(sb.name); > | ^ Actually, this is just some of a wall of errors. (In reply to Agostino Sarubbo from comment #0) > https://blogs.gentoo.org/ago/2020/07/04/gentoo-tinderbox/ > > Issue: dev-util/rizin-0.3.1-r2 fails to compile. > Discovered on: amd64 (internal ref: tinderbox) > > NOTE: > This machine uses clang as a compiler and lld as a linker This build doesn't actually seem to be using Clang, so you seem to be setting it wrong. Unset: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LEX, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS C compiler for the host machine: x86_64-pc-linux-gnu-gcc (gcc 11.2.1 "x86_64-pc-linux-gnu-gcc (Gentoo 11.2.1_p20211127 p0) 11.2.1 20211127") C linker for the host machine: x86_64-pc-linux-gnu-gcc ld.bfd 2.37 I'm really not sure how to reproduce this. Thanks to sultan and ionen's sleuthing in #gentoo-dev, the problem is caused by libzip being compiled with Clang and Rizin being compiled with GCC (and this issue could probably be exposed by any revdep). It seems that libzip's declaration of _Nullable needs to be changed (sultan's suggestion): #if defined(__has_feature) #if !__has_feature(nullability) #define _Nullable #endif #else #define _Nullable #endif Reassigning to kde@ as it seems to be an issue in libzip and simply exposed by a consumer. Sure, whoever wants to fix clang issues, step up. *** Bug 830896 has been marked as a duplicate of this bug. *** The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2c6c6c8ef64fdc3dc45475c91190f4d231ed3052 commit 2c6c6c8ef64fdc3dc45475c91190f4d231ed3052 Author: Sam James <sam@gentoo.org> AuthorDate: 2024-11-23 14:46:24 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2024-11-23 14:50:30 +0000 dev-libs/libzip: add 1.11.2 Closes: https://bugs.gentoo.org/771789 Closes: https://bugs.gentoo.org/830231 Closes: https://bugs.gentoo.org/932816 Signed-off-by: Sam James <sam@gentoo.org> dev-libs/libzip/Manifest | 1 + .../libzip/files/libzip-1.11.2-nullability.patch | 96 ++++++++++++++++ dev-libs/libzip/libzip-1.11.2.ebuild | 123 +++++++++++++++++++++ 3 files changed, 220 insertions(+) |