Opened 4 years ago
Closed 4 years ago
#61111 closed defect (fixed)
stfl @ 0.24_2 : build failure: error: implicit declaration of function '...' is invalid in C99
Reported by: | herbygillot (Herby Gillot) | Owned by: | ryandesign (Ryan Carsten Schmidt) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.3 |
Keywords: | Cc: | ||
Port: | stfl |
Description
Environment:
macOS 10.15.6 19G2021 Xcode 11.6 11E708 ❯ clang --version Apple clang version 11.0.3 (clang-1103.0.32.62) Target: x86_64-apple-darwin19.6.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin ❯ which clang /usr/bin/clang
Build Results:
/usr/bin/clang -Os -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -arch x86_64 -I. -Wall -D_GNU_SOURCE -fPIC -pthread -I/opt/local/include -isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk -c -o example.o example.c widgets/wt_input.c:86:3: error: implicit declaration of function 'mvwaddwstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] mvwaddwstr(win, w->y, w->x+i, L" "); ^ widgets/wt_input.c:99:3: error: implicit declaration of function 'mvwaddnwstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] mvwaddnwstr(win, w->y, w->x, text_off, len); ^ widgets/wt_textview.c:110:4: error: implicit declaration of function 'mvwaddnwstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] mvwaddnwstr(win, w->y+i-offset, w->x, text, w->w); ^ widgets/wt_textview.c:110:4: note: did you mean 'mvwaddnstr'? /opt/local/include/curses.h:726:28: note: 'mvwaddnstr' declared here extern NCURSES_EXPORT(int) mvwaddnstr (WINDOW *, int, int, const char *, int); /* generated */ ^ widgets/wt_textview.c:116:3: error: implicit declaration of function 'mvwaddnwstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] mvwaddnwstr(win,w->y+i-offset,w->x,L"~",w->w); ^ 2 errors generated. 2 errors generated. widgets/wt_checkbox.c:63:2: error: implicit declaration of function 'mvwaddnwstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] mvwaddnwstr(win, w->y, w->x, fillup, wcswidth(fillup,wcslen(fillup))); ^ widgets/wt_checkbox.c:63:2: note: did you mean 'mvwaddnstr'? /opt/local/include/curses.h:726:28: note: 'mvwaddnstr' declared here extern NCURSES_EXPORT(int) mvwaddnstr (WINDOW *, int, int, const char *, int); /* generated */ ^ 1 error generated. base.c:537:11: error: implicit declaration of function 'wget_wch' is invalid in C99 [-Werror,-Wimplicit-function-declaration] int rc = wget_wch(stdscr, &wch); ^ widgets/wt_label.c:54:3: error: implicit declaration of function 'mvwaddnwstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] mvwaddnwstr(win, w->y, w->x, fillup, wcswidth(fillup,wcslen(fillup))); ^ base.c:537:11: note: did you mean 'wgetch'? /opt/local/include/curses.h:854:28: note: 'wgetch' declared here extern NCURSES_EXPORT(int) wgetch (WINDOW *); /* implemented */ ^ widgets/wt_label.c:54:3: note: did you mean 'mvwaddnstr'? /opt/local/include/curses.h:726:28: note: 'mvwaddnstr' declared here extern NCURSES_EXPORT(int) mvwaddnstr (WINDOW *, int, int, const char *, int); /* generated */ ^ widgets/wt_label.c:61:3: error: implicit declaration of function 'mvwaddnwstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] mvwaddnwstr(win, w->y, w->x, text, w->w); ^ make: *** [widgets/wt_input.o] Error 1 make: *** Waiting for unfinished jobs.... 2base.c:736:4: error: implicit declaration of function 'mvwaddnwstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] mvwaddnwstr(win, y, x, p, len); ^ errors generated. base.cwidgets/wt_list.c:201:4: error: implicit declaration of function 'mvwaddnwstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] mvwaddnwstr(win, w->y+i-offset, w->x, fillup, wcswidth(fillup,wcslen(fillup))); ^ make: *** [widgets/wt_checkbox.o] Error 1 :736:4: note: did you mean 'mvwaddnstr'? /opt/local/include/curses.h:726:28: note: 'mvwaddnstr' declared here extern NCURSES_EXPORT(int) mvwaddnstr (WINDOW *, int, int, const char *, int); /* generated */ ^ make: *** [widgets/wt_textview.o] Error 1 base.c:744:4: error: implicit declaration of function 'mvwaddnwstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] mvwaddnwstr(win, y, x, p, len); ^ widgets/wt_list.c:201:4: note: did you mean 'mvwaddnstr'? /opt/local/include/curses.h:726:28: note: 'mvwaddnstr' declared here extern NCURSES_EXPORT(int) mvwaddnstr (WINDOW *, int, int, const char *, int); /* generated */ ^ widgets/wt_list.c:208:4: error: implicit declaration of function 'mvwaddnwstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] mvwaddnwstr(win, w->y+i-offset, w->x, text, w->w); ^ 3 errors generated. 2 errors generated. make: *** [widgets/wt_label.o] Error 1 make: *** [base.o] Error 1 make: *** [widgets/wt_list.o] Error 1 widgets/wt_textedit.c:95:3: error: implicit declaration of function 'mvwaddnwstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] mvwaddnwstr(win, w->y + i - scroll_y, w->x, text, w->w); ^ widgets/wt_textedit.c:95:3: note: did you mean 'mvwaddnstr'? /opt/local/include/curses.h:726:28: note: 'mvwaddnstr' declared here extern NCURSES_EXPORT(int) mvwaddnstr (WINDOW *, int, int, const char *, int); /* generated */ ^ widgets/wt_textedit.c:100:3: error: implicit declaration of function 'mvwaddnwstr' is invalid in C99 [-Werror,-Wimplicit-function-declaration] mvwaddnwstr(win, w->y + i - scroll_y, w->x, L"~",w->w); ^ 2 errors generated. make: *** [widgets/wt_textedit.o] Error 1 make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_stfl/stfl/work/stfl-0.24' Command failed: cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_stfl/stfl/work/stfl-0.24" && /usr/bin/make -j16 -w all CC="/usr/bin/clang" CXX="/usr/bin/clang++" OBJC="/usr/bin/clang" OBJCXX="/usr/bin/clang++" INSTALL="/usr/bin/install -c" Exit code: 2 Error: Failed to build stfl: command execution failed DEBUG: Error code: CHILDSTATUS 64241 2 DEBUG: Backtrace: command execution failed while executing "system {*}$notty {*}$nice $fullcmdstring" invoked from within "command_exec build" (procedure "portbuild::build_main" line 8) invoked from within "$procedure $targetname" Error: See /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_devel_stfl/stfl/main.log for details. Error: Follow https://guide.macports.org/#project.tickets to report a bug. Error: Processing of port stfl failed
Change History (2)
comment:1 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | set to ryandesign |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Replying to herbygillot:
This shows information about Xcode.
This shows that the build is using the command line tools, not Xcode. If you have the Xcode 12 beta command line tools, that explains the problem, since implicit function declarations became an error in Xcode 12. We should fix implicit function declarations (and report the fixes to the developers), but until we do, you can avoid the problem by downgrading to the Xcode 11 command line tools.