wangp / bower

A curses terminal client for the Notmuch email system
Other
119 stars 11 forks source link

QA issues when building on Gentoo Linux #36

Open rseichter opened 5 years ago

rseichter commented 5 years ago

I'm currently in the process of creating an ebuild package for Gentoo Linux, and I've come across the following QA issues:

In file included from /usr/include/bits/libc-header-start.h:33,
                 from /usr/include/stdlib.h:25,
                 from /usr/lib/mercury/inc/mercury_std.h:23,
                 from /usr/lib/mercury/inc/mercury_goto.h:13,
                 from /usr/lib/mercury/inc/mercury_init.h:84,
                 from Mercury/cs/bower_init.c:89:
/usr/include/features.h:184:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE
are deprecated, use _DEFAULT_SOURCE" [-Wcpp]
QA Notice: Files built without respecting LDFLAGS have been detected
Please include the following list of files in your report:
/usr/bin/bower

QA Notice: Package triggers severe warnings which indicate that it
           may exhibit random runtime failures.
curs.m:771:10: warning: implicit declaration of function ‘get_wch’; did you mean
‘getwc’? [-Wimplicit-function-declaration]
wangp commented 5 years ago

/usr/include/features.h:184:3: warning: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Wcpp]

This has been "fixed" in a newer version of the Mercury compiler. (not a real bug)

QA Notice: Files built without respecting LDFLAGS have been detected

Does this refer to custom LDFLAGS in Gentoo build scripts?

curs.m:771:10: warning: implicit declaration of function ‘get_wch’

get_wch() should be declared by ncurses.h if we compile with -D_XOPEN_SOURCE_EXTENDED. That is done in src/Mercury.options so I'm not sure why that warning appears.

wangp commented 5 years ago

Regarding get_wch(): an alternative to defining _XOPEN_SOURCE_EXTENDED is to define NCURSES_WIDECHAR (and may be required for newer versions of ncurses). Yet in a Gentoo chroot, I needed to include <ncursesw/curses.h> instead of for the warning to go away. That's not a standard location AFAICT.

rseichter commented 5 years ago

This has been "fixed" in a newer version of the Mercury compiler. (not a real bug)

Are you referring to Mercury's issue 379? This was supposedly "fixed in commit b70619d" back in 2015. I am using the latest stable Mercury Compiler (14.01.1, configured for x86_64-pc-linux-gnu) which still has this problem.

Does this refer to custom LDFLAGS in Gentoo build scripts?

LDFLAGS passed to make by Portage are apparently ignored during the build, hence the QA notice.

in a Gentoo chroot, I needed to include <ncursesw/curses.h> instead of for the warning to go away. That's not a standard location AFAICT.

On my build system, sys-libs/ncurses-6.1-r2 includes the following header files:

$ equery f sys-libs/ncurses | grep ncurses.h
/usr/include/ncurses.h
/usr/include/ncursesw/ncurses.h

Do you not have both files?

wangp commented 5 years ago

Are you referring to Mercury's issue 379?

Yes. Unfortunately we (the Mercury project) haven't made a new "stable" release for a while. I suggest just ignoring the warning for now as it's not a real problem.

LDFLAGS passed to make by Portage are apparently ignored during the build, hence the QA notice.

CFLAGS and LDFLAGS from the environment should be picked up by mmc (I checked it) so I don't know.

Do you not have both files?

The directory /usr/include/ncursesw doesn't exist on all distributions (e.g. alpine, arch, void linux) but does on CentOS and Debian/Ubuntu. Perhaps we need to add -I/usr/include/ncursesw and let the C compiler figure it out.