Summary: | x11-libs/motif-2.3.8-r3 - /.../XpmCrBufFrI.c: error: call to undeclared library function strcpy with type char (char , const char | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Toralf Förster <toralf> |
Component: | Current packages | Assignee: | Ulrich Müller <ulm> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | sam |
Priority: | Normal | Keywords: | PATCH, UPSTREAM |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 870412 | ||
Attachments: |
emerge-info.txt
clang.tar.bz2 emerge-history.txt environment etc.portage.tar.bz2 logs.tar.bz2 temp.tar.bz2 x11-libs:motif-2.3.8-r3:20220917-144650.log motif-2.3.8-string_h.patch motif-2.3.8-acinclude.patch motif-2.3.8-acinclude.patch |
Description
Toralf Förster
2022-09-17 15:34:13 UTC
Created attachment 807790 [details]
emerge-info.txt
Created attachment 807793 [details]
clang.tar.bz2
Created attachment 807796 [details]
emerge-history.txt
Created attachment 807799 [details]
environment
Created attachment 807802 [details]
etc.portage.tar.bz2
Created attachment 807805 [details]
logs.tar.bz2
Created attachment 807808 [details]
temp.tar.bz2
Created attachment 807811 [details]
x11-libs:motif-2.3.8-r3:20220917-144650.log
Missing include for <string.h>? (In reply to Ulrich Müller from comment #9) > Missing include for <string.h>? Yeah, looks like it. I'd also fix the prototypes if possible, as that's a timebomb. Created attachment 808678 [details, diff]
motif-2.3.8-string_h.patch
Please test if attached patch fixes the problem.
(In reply to Sam James from comment #10) > I'd also fix the prototypes if possible, as that's a timebomb. That's something that should be reported and fixed upstream. (In reply to Ulrich Müller from comment #12) > (In reply to Sam James from comment #10) > > I'd also fix the prototypes if possible, as that's a timebomb. > > That's something that should be reported and fixed upstream. You are the maintainer, I'd expect you to do this then? (In reply to Ulrich Müller from comment #12) > (In reply to Sam James from comment #10) > > I'd also fix the prototypes if possible, as that's a timebomb. > > That's something that should be reported and fixed upstream. I'm really just giving a heads up that the log indicates other issues which _will_ become fatal when compilers inevitably change to C23. If you want to be pre-emptive, you can just get -std= if you want. I've got hundreds of these to handle, I can't report it myself. *** Bug 882181 has been marked as a duplicate of this bug. *** (In reply to Ulrich Müller from comment #11) > Created attachment 808678 [details, diff] [details, diff] > motif-2.3.8-string_h.patch > > Please test if attached patch fixes the problem. Fixes the reported problem for me, however, in config.log: ``` configure:14286: checking whether libXt was compiled with -DXTHREADS configure:14316: x86_64-pc-linux-gnu-gcc -o conftest -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -Wreturn-type -ggdb3 -fno-strict-aliasing -Werror=implicit-function-declaration - Werror=implicit-int -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-z,pack-relative-relocs conftest.c -lXt -lSM -lICE -lX11 >&5 conftest.c: In function 'main': conftest.c:29:3: error: implicit declaration of function 'exit' [-Werror=implicit-function-declaration] 29 | exit(0); | ^~~~ conftest.c:25:1: note: include '<stdlib.h>' or provide a declaration of 'exit' 24 | #include <X11/Intrinsic.h> +++ |+#include <stdlib.h> 25 | int main() { conftest.c:29:3: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 29 | exit(0); | ^~~~ conftest.c:29:3: note: include '<stdlib.h>' or provide a declaration of 'exit' conftest.c:31:3: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 31 | exit(1); | ^~~~ conftest.c:31:3: note: include '<stdlib.h>' or provide a declaration of 'exit' cc1: some warnings being treated as errors configure:14316: $? = 1 ``` and ``` configure:15796: checking whether sprintf returns void configure:15811: x86_64-pc-linux-gnu-gcc -o conftest -O2 -pipe -march=native -fdiagnostics-color=always -frecord-gcc-switches -Wreturn-type -ggdb3 -fno-strict-aliasing -Werror=implicit-function-declaration -W error=implicit-int -Wl,-O1 -Wl,--as-needed -Wl,--defsym=__gentoo_check_ldflags__=0 -Wl,-z,pack-relative-relocs conftest.c >&5 conftest.c:53:5: error: conflicting types for 'sprintf'; have 'int()' 53 | int sprintf(); main() { exit(sprintf(".")); } | ^~~~~~~ conftest.c:53:1: note: a parameter list with an ellipsis cannot match an empty parameter name list declaration 53 | int sprintf(); main() { exit(sprintf(".")); } | ^~~ In file included from /usr/include/features.h:490, from /usr/include/bits/libc-header-start.h:33, from /usr/include/stdio.h:27, from conftest.c:52: /usr/include/bits/stdio2.h:28:1: note: previous definition of 'sprintf' with type 'int(char *, const char *, ...)' 28 | __NTH (sprintf (char *__restrict __s, const char *__restrict __fmt, ...)) | ^~~~~ conftest.c:53:16: error: return type defaults to 'int' [-Werror=implicit-int] 53 | int sprintf(); main() { exit(sprintf(".")); } | ^~~~ conftest.c: In function 'main': conftest.c:53:25: error: implicit declaration of function 'exit' [-Werror=implicit-function-declaration] 53 | int sprintf(); main() { exit(sprintf(".")); } | ^~~~ conftest.c:53:1: note: include '<stdlib.h>' or provide a declaration of 'exit' 52 | #include <stdio.h> +++ |+#include <stdlib.h> 53 | int sprintf(); main() { exit(sprintf(".")); } conftest.c:53:25: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch] 53 | int sprintf(); main() { exit(sprintf(".")); } | ^~~~ conftest.c:53:25: note: include '<stdlib.h>' or provide a declaration of 'exit' cc1: some warnings being treated as errors ``` Created attachment 835861 [details, diff] motif-2.3.8-acinclude.patch (In reply to Sam James from comment #16) > Fixes the reported problem for me, however, in config.log: > ``` > [...] > ``` *sigh* Try attached patch (in addition to the previous patch). (In reply to Ulrich Müller from comment #12) > That's something that should be reported and fixed upstream. Their bug tracker at bugs.motifzone.net is down since several months, therefore I have now reported the issue per e-mail to <support@ics.com>. Created attachment 835867 [details, diff]
motif-2.3.8-acinclude.patch
(In reply to Ulrich Müller from comment #19) > Created attachment 835867 [details, diff] [details, diff] > motif-2.3.8-acinclude.patch WFM, thank you! I suggest changing to int main(void) while there to head off -Wstrict-prototypes (no need to do it everywhere right now, but if you're already on the line..) (In reply to Sam James from comment #21) > See also: https://sourceforge.net/p/motif/code/merge-requests/3/. and https://sourceforge.net/p/motif/code/merge-requests/2/ The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/dev/ulm.git/commit/?id=2e3d889da79e4e362129438fd699c2758e17fc36 commit 2e3d889da79e4e362129438fd699c2758e17fc36 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2022-11-23 09:04:48 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2022-11-23 09:04:48 +0000 motif: Fix some function declarations Bug: https://bugs.gentoo.org/870799 Signed-off-by: Ulrich Müller <ulm@gentoo.org> patchsets/motif/2.3.8/10_all_string_h.patch | 22 ++++++++++++++++++++++ patchsets/motif/2.3.8/11_all_acinclude.patch | 22 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=af0fe7b8933f09dbb41227b43c7d4d831b3c162d commit af0fe7b8933f09dbb41227b43c7d4d831b3c162d Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2022-11-23 09:23:02 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2022-11-23 09:24:12 +0000 x11-libs/motif: Fix some function declarations Closes: https://bugs.gentoo.org/864533 Closes: https://bugs.gentoo.org/870799 Signed-off-by: Ulrich Müller <ulm@gentoo.org> x11-libs/motif/Manifest | 1 + x11-libs/motif/motif-2.3.8-r4.ebuild | 112 +++++++++++++++++++++++++++++++++++ 2 files changed, 113 insertions(+) |