pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkg/51899: Fix for building qemu on Darwin



The following reply was made to PR pkg/51899; it has been noted by GNATS.

From: Yuji Yamano <yyamano%kt.rim.or.jp@localhost>
To: js-pkgsrc%heap.zone@localhost, gnats-bugs%NetBSD.org@localhost
Cc: dholland-pbugs%netbsd.org@localhost
Subject: Re: pkg/51899: Fix for building qemu on Darwin
Date: Thu, 26 Jan 2017 20:24:40 +0900 (JST)

 > qemu seems to use the system's curses.h, even when building NetBSD's
 > ncursesw. However, for wide support, -D_XOPEN_SOURCE_EXTENDED is
 > needed by Darwin's curses.h.
 
 qemu's configure script tests pkgsrc's ncursesw, but it fails because
 _XOPEN_SOURCE_EXTENDED is not defined. Unlike NetBSD's curses, pkgsrc's 
 ncurses and Darwin's curses (actually ncurses) require _XOPEN_SOURCE_EXTENDED
 to support wide-character.
 
 From emulators/qemu/work/qemu-2.8.0/config.log:
 
 clang -m64 -mcx16 -DOS_OBJECT_USE_OBJC=0 -arch x86_64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes
  -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wno-string-plus-in
 t -Wno-initializer-overrides -Wendif-labels -Wno-shift-negative-value -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wforma
 t-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/opt/pkg/
 include -v -o config-temp/qemu-conf.exe config-temp/qemu-conf.c -m64 -framework CoreFoundation -framework IOKit -arch x86_64 -g -L/opt/pkg/lib -L/usr/lib -L/opt/X11/lib -D_DARWIN_C_SOURCE -I/opt/pkg/include/ncursesw
 Apple LLVM version 7.3.0 (clang-703.0.31)
 Target: x86_64-apple-darwin15.3.0
 Thread model: posix
 InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
  "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang"
  -cc1 -triple x86_64-apple-macosx10.11.0 -Wdeprecated-objc-isa-usage
  -Werror=deprecated-objc-isa-usage -emit-obj -mrelax-all -disable-free
  -disable-llvm-verifier -main-file-name qemu-conf.c -mrelocation-model
  pic -pic-level 2 -mthread-model posix -mdisable-fp-elim
  -relaxed-aliasing -masm-verbose -munwind-tables -target-cpu core2
  -target-feature +cx16 -target-linker-version 264.3.102 -v
  -dwarf-column-info -debug-info-kind=standalone -dwarf-version=2
  -resource-dir
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0
  -D OS_OBJECT_USE_OBJC=0 -D _GNU_SOURCE -D _FILE_OFFSET_BITS=64 -D
  _LARGEFILE_SOURCE -I /pkgsrc/emulators/qemu/work/.buildlink/include
  -D _DARWIN_C_SOURCE -I
  /pkgsrc/emulators/qemu/work/.buildlink/include/ncursesw
  -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings
  -Wmissing-prototypes -Wno-string-plus-int -Wno-initializer-overrides
  -Wendif-labels -Wno-shift-negative-value -Wmissing-include-dirs
  -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k
  -Winit-self -Wignored-qualifiers -Wold-style-definition -Wtype-limits
  -fconst-strings -fdebug-compilation-dir
  /pkgsrc/emulators/qemu/work/qemu-2.8.0 -ferror-limit 19
  -fmessage-length 0 -fwrapv -stack-protector 2 -fblocks
  -fobjc-runtime=macosx-10.11.0 -fencode-extended-block-signature
  -fmax-type-align=16 -fno-common -fdiagnostics-show-option -o
  /var/folders/gc/b9cgjszn1v30w4w5rmq0jshr0000gn/T/qemu-conf-75e4b6.o
  -x c config-temp/qemu-conf.c
 clang -cc1 version 7.3.0 (clang-703.0.31) default target x86_64-apple-darwin15.3.0
 #include "..." search starts here:
 #include <...> search starts here:
  /pkgsrc/emulators/qemu/work/.buildlink/include
  /pkgsrc/emulators/qemu/work/.buildlink/include/ncursesw
  /usr/local/include
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.3.0/include
  /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include
  /usr/include
  /System/Library/Frameworks (framework directory)
  /Library/Frameworks (framework directory)
 End of search list.
 config-temp/qemu-conf.c:8:3: warning: implicit declaration of function 'addwstr' is invalid in C99 [-Wimplicit-function-declaration]
   addwstr(L"wide chars\n");
   ^
 config-temp/qemu-conf.c:9:3: warning: implicit declaration of function 'addnwstr' is invalid in C99 [-Wimplicit-function-declaration]
   addnwstr(&wch, 1);
   ^
 config-temp/qemu-conf.c:10:3: warning: implicit declaration of function 'add_wch' is invalid in C99 [-Wimplicit-function-declaration]
   add_wch(WACS_DEGREE);
   ^
 config-temp/qemu-conf.c:10:11: error: use of undeclared identifier 'WACS_DEGREE'
   add_wch(WACS_DEGREE);
 
 
 From /usr/pkg/include/ncursesw/curses.h:
 
 #ifndef NCURSES_WIDECHAR
 #if defined(_XOPEN_SOURCE_EXTENDED) || (defined(_XOPEN_SOURCE) && (_XOPEN_SOURCE - 0 >= 500))
 #define NCURSES_WIDECHAR 1
 #else
 #define NCURSES_WIDECHAR 0
 #endif
 #endif /* NCURSES_WIDECHAR */
 
 [snip]
 
 #if NCURSES_WIDECHAR
 
 [snip]
 
 #define WACS_DEGREE     NCURSES_WACS('f') /* degree symbol */
 
 
 From /usr/include/curses.h on NetBSD 7.0:
 
 #if !defined(HAVE_WCHAR) && !defined(DISABLE_WCHAR)
 #define HAVE_WCHAR 1
 #endif
 
 [snip]
 
 #ifdef HAVE_WCHAR
 
 [snip]
 
 #define WACS_DEGREE     (&_wacs_char[(unsigned char)'f'])
 


Home | Main Index | Thread Index | Old Index