Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 903749 - dev-libs/link-grammar-5.12.3 - .../work/link-grammar-5.12.3/link-grammar/parse/extract-links.c:300:19: error: implicit declaration of function 'malloc_trim' [-Werror=implicit-function-declaration]
Summary: dev-libs/link-grammar-5.12.3 - .../work/link-grammar-5.12.3/link-grammar/pars...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: David Seifert
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: musl-porting
  Show dependency tree
 
Reported: 2023-04-03 22:01 UTC by ernsteiswuerfel
Modified: 2023-05-07 18:36 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (ppc, 5.12.3) (link-grammar-5.12.3:20230403-215244.log,204.49 KB, text/plain)
2023-04-03 22:01 UTC, ernsteiswuerfel
Details
emerge --info (file_903749.txt,6.89 KB, text/plain)
2023-04-03 22:01 UTC, ernsteiswuerfel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ernsteiswuerfel archtester 2023-04-03 22:01:19 UTC
Created attachment 859489 [details]
build.log (ppc, 5.12.3)

[...]
libtool: compile:  powerpc-gentoo-linux-musl-gcc "-DPACKAGE_NAME=\"link-grammar\"" "-DPACKAGE_TARNAME=\"link-grammar\"" "-DPACKAGE_VERSION=\"5.12.3\"" "-DPACKAGE_STRING=\"link-grammar 5.12.3\"" "-DPACKAGE_BUGREPORT=\"https://github.com/opencog/link-grammar\"" "-DPACKAGE_URL=\"https://www.abisource.com/projects/link-grammar\"" "-DPACKAGE=\"link-grammar\"" "-DVERSION=\"5.12.3\"" -DHAVE_STDIO_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STRINGS_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_UNISTD_H=1 -DHAVE_THREADS_H=1 -DSTDC_HEADERS=1 -DHAVE_DLFCN_H=1 "-DLT_OBJDIR=\".libs/\"" -DYYTEXT_POINTER=1 -DHAVE_STRNDUP=1 -DHAVE_STRTOK_R=1 -DHAVE_SIGACTION=1 -DHAVE_ALIGNED_ALLOC=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DHAVE_FORK=1 -DHAVE_VFORK=1 -DHAVE_WORKING_VFORK=1 -DHAVE_WORKING_FORK=1 -DHAVE_PRCTL=1 -D__STDC_FORMAT_MACROS=1 -D__STDC_LIMIT_MACROS=1 -DTLS=_Thread_local -DHAVE_PTHREAD_PRIO_INHERIT=1 -DHAVE_PTHREAD=1 -DHAVE_VISIBILITY=1 -DHAVE_LOCALE_T_IN_LOCALE_H=1 -DHAVE_STDATOMIC_H=1 -DUSE_WORDGRAPH_DISPLAY=1 -DHAVE_SQLITE3=1 -DHAVE_HUNSPELL=1 "-DHUNSPELL_DICT_DIR=\"/usr/share/myspell\"" -DHAVE_PCRE2_H=1 -DHAVE_MAYBE_UNINITIALIZED=1 -DHAVE_DECL_STRERROR_R=1 -DHAVE_STRERROR_R=1 "-DVERSION=\"5.12.3\"" "-DDICTIONARY_DIR=\"/usr/share/link-grammar\"" "-DCC=\"powerpc-gentoo-linux-musl-gcc\"" -I. -I/var/tmp/portage/dev-libs/link-grammar-5.12.3/work/link-grammar-5.12.3/link-grammar -I.. -I/var/tmp/portage/dev-libs/link-grammar-5.12.3/work/link-grammar-5.12.3 -Wstrict-prototypes -Wmissing-prototypes -Wformat-signedness -Wnested-externs -Wold-style-definition -Werror-implicit-function-declaration -Wall -Wextra -Wsign-compare -Wpointer-arith -Wwrite-strings -Wmissing-declarations -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wstrict-aliasing -Winit-self -Wshadow -Wno-missing-field-initializers -Wno-unused-parameter -Wno-attributes -Wno-long-long -Winline -I/usr/include/hunspell -pthread -D_DEFAULT_SOURCE -std=c11 -D_BSD_SOURCE -D_SVID_SOURCE -D_GNU_SOURCE -D_ISOC11_SOURCE -fvisibility=hidden -Os -mcpu=7450 -mtune=7450 -pipe -c /var/tmp/portage/dev-libs/link-grammar-5.12.3/work/link-grammar-5.12.3/link-grammar/parse/extract-links.c  -fPIC -DPIC -o parse/.libs/extract-links.o
/var/tmp/portage/dev-libs/link-grammar-5.12.3/work/link-grammar-5.12.3/link-grammar/parse/extract-links.c: In function 'free_extracto ':
/var/tmp/portage/dev-libs/link-grammar-5.12.3/work/link-grammar-5.12.3/link-grammar/parse/extract-links.c:300:19: error: implicit declaration of function 'malloc_trim' [-Werror=implicit-function-declaration]
  300 |         if (trim) malloc_trim(0);
      |                   ^~~~~~~~~~~
/var/tmp/portage/dev-libs/link-grammar-5.12.3/work/link-grammar-5.12.3/link-grammar/parse/extract-links.c:300:19: warning: nested extern declaration of 'malloc_trim' [-Wnested-externs]
In file included from /var/tmp/portage/dev-libs/link-grammar-5.12.3/work/link-grammar-5.12.3/link-grammar/parse/extract-links.c:18:
/var/tmp/portage/dev-libs/link-grammar-5.12.3/work/link-grammar-5.12.3/link-grammar/connectors.h: In function 'x_table_pointer':
/var/tmp/portage/dev-libs/link-grammar-5.12.3/work/link-grammar-5.12.3/link-grammar/connectors.h:315:22: warning: inlining failed in call to 'pair_hash': call is unlikely and code size would grow [-Winline]
  315 | static inline size_t pair_hash(int lw, int rw,
      |                      ^~~~~~~~~
/var/tmp/portage/dev-libs/link-grammar-5.12.3/work/link-grammar-5.12.3/link-grammar/parse/extract-links.c:332:29: note: called from here
  332 |         unsigned int hash = pair_hash(lw, rw, l_id, r_id, null_count);
      |                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/var/tmp/portage/dev-libs/link-grammar-5.12.3/work/link-grammar-5.12.3/link-grammar/connectors.h: In function 'x_table_store':
/var/tmp/portage/dev-libs/link-grammar-5.12.3/work/link-grammar-5.12.3/link-grammar/connectors.h:315:22: warning: inlining failed in call to 'pair_hash': call is unlikely and code size would grow [-Winline]
  315 | static inline size_t pair_hash(int lw, int rw,
      |                      ^~~~~~~~~
/var/tmp/portage/dev-libs/link-grammar-5.12.3/work/link-grammar-5.12.3/link-grammar/parse/extract-links.c:352:26: note: called from here
  352 |         unsigned int h = pair_hash(lw, rw, l_id, r_id, null_count);
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [Makefile:1122: parse/extract-links.lo] Error 1
Comment 1 ernsteiswuerfel archtester 2023-04-03 22:01:47 UTC
Created attachment 859490 [details]
emerge --info
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-04 00:39:44 UTC
This is a GNU extension which I don't think musl implements. Any use should be guarded with either a configure-test or just __GLIBC__ in this case tbh.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-04-04 00:40:32 UTC
(In reply to Sam James from comment #2)
> This is a GNU extension which I don't think musl implements. Any use should
> be guarded with either a configure-test or just __GLIBC__ in this case tbh.

They *do* check for it, but the check is wrong!

https://github.com/opencog/link-grammar/blob/6eb92347fe7874739761b5a5a58f22d7a57f9c19/link-grammar/parse/extract-links.c#L297
Comment 4 Larry the Git Cow gentoo-dev 2023-05-07 18:36:20 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e654b5e511fa528838ce055239a7a6f9f704b339

commit e654b5e511fa528838ce055239a7a6f9f704b339
Author:     David Seifert <soap@gentoo.org>
AuthorDate: 2023-05-07 18:35:20 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2023-05-07 18:35:20 +0000

    dev-libs/link-grammar: add upstreamed patch
    
    Closes: https://bugs.gentoo.org/903749
    Signed-off-by: David Seifert <soap@gentoo.org>

 ...mar-5.12.3-Wimplicit-function-declaration.patch | 35 ++++++++++++++++++++++
 dev-libs/link-grammar/link-grammar-5.12.3.ebuild   |  5 ++++
 2 files changed, 40 insertions(+)