Created attachment 725890 [details] emerge --info net-im/toxic-0.10.1::gentoo Fails with the following error: var/tmp/portage/net-im/toxic-0.10.1/work/toxic-0.10.1/src/autocomplete.c:358:60: error: 'NAME_MAX' undeclared (first use in this function) 358 | char **dirnames = (char **) malloc_ptr_array(MAX_DIRS, NAME_MAX + 1); | ^~~~~~~~ /var/tmp/portage/net-im/toxic-0.10.1/work/toxic-0.10.1/src/autocomplete.c:358:60: note: each undeclared identifier is reported only once for each function it appears in make: *** [Makefile:83: /var/tmp/portage/net-im/toxic-0.10.1/work/toxic-0.10.1/build/autocomplete.o] Error 1 make: *** Waiting for unfinished jobs.... In file included from /var/tmp/portage/net-im/toxic-0.10.1/work/toxic-0.10.1/src/avatars.h:26, from /var/tmp/portage/net-im/toxic-0.10.1/work/toxic-0.10.1/src/avatars.c:27: /var/tmp/portage/net-im/toxic-0.10.1/work/toxic-0.10.1/src/file_transfers.h:56:20: error: 'PATH_MAX' undeclared here (not in a function) 56 | char file_path[PATH_MAX + 1]; /* Not used by senders */ Attached the emerge --info and full build log.
Created attachment 725893 [details] build log
Created attachment 725896 [details] emerge -pqv Output
Created attachment 729878 [details, diff] patch for toxic-0.10.1
Created attachment 729880 [details] Ebuild to use the patch
Good Morning. I apologize for my delay in responding. The problem that you found seems to be caused by the upstream including the wrong header file. It seems that GCC automatically includes the correct header and clang doesn't. Since it seems that clang would take a long time for me to set up, I hope that you would be willing to test my theory. This can be done in one of two ways. First, you could add the patch that I have attached to ${YOUR_GENTOO_REPO}/net-im/toxic/files/ and the updated ebuild to ${YOUR_GENTOO_REPO}/net-im/toxic/ and let me know if that fixes the error. BTW, you may need to run "#repoman manifest" in the ${YOUR_GENTOO_REPO}/net-im/toxic/ directory before portage will use the new ebuild. Also, this change should be overwritten by your next sync. Alternatively, you could download toxic directly, extract it and try to build it with clang. If the build fails, then add "#include <linux/limits.h>" to the following files: src/autocomplete.c, src/file_transfers.h and src/settings.h. Then try the build again. Let me know the results of whichever method you elect to try. Thanks for your assistance.
Thanks for the reply. I tried both of the solutions. the first one you said with the custom repository worked. toxic-0.10.1 is installed. I will attach the build log in case you find anything interesting. The second solution didnt seem to work with the git repository. I will attach the output. Let me know for anything else I can help with. MSavoritias
Created attachment 730104 [details] Build output from the custom repository test.
Created attachment 730106 [details] Error from the Git repository test.
Thank you for your assistance. The patches are currently awaiting being pulled into the main tree.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4ca7fb9be00c1d64e8d963012bca7fb0e64fb575 commit 4ca7fb9be00c1d64e8d963012bca7fb0e64fb575 Author: Josiah Mullins <JoMull01@protonmail.com> AuthorDate: 2021-08-11 22:10:35 +0000 Commit: Joonas Niilola <juippis@gentoo.org> CommitDate: 2021-08-24 08:50:26 +0000 net-im/toxic: Fix incorrect header file inclusion It seems that the upstream developer believes that the macros NAME_MAX and PATH_MAX are defined in <limits.h> when they are really defined in <linux/limits.h>. More interestingly, it seems that GCC automatically corrects for this while clang does not. This commit adds patches necessary to fix this as well as some minor fixes. Signed-off-by: Josiah Mullins <JoMull01@protonmail.com> Closes: https://bugs.gentoo.org/803404 Signed-off-by: Joonas Niilola <juippis@gentoo.org> .../files/toxic-0.10.1-NAME_MAX-and-PATH_MAX.patch | 49 ++++++++++++++++++++++ .../files/toxic-0.8.3-NAME_MAX-and-PATH_MAX.patch | 49 ++++++++++++++++++++++ ...{toxic-0.10.1.ebuild => toxic-0.10.1-r1.ebuild} | 14 +++++-- ...toxic-0.8.3-r2.ebuild => toxic-0.8.3-r3.ebuild} | 11 +++-- 4 files changed, 115 insertions(+), 8 deletions(-)