Date: Thu, 1 Nov 2012 16:46:19 GMT From: "O. Hartmann" <ohartman@zedat.fu-berlin.de> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/173266: graphics/libfpx: /usr/include/c++/v1/cwchar:165:106: error: cannot initialize a parameter of type 'const WCHAR *' (aka 'const unsigned short *') with an lvalue of type 'const wchar_t *' Message-ID: <201211011646.qA1GkJ7N058070@red.freebsd.org> Resent-Message-ID: <201211011650.qA1Go1s0085814@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 173266 >Category: ports >Synopsis: graphics/libfpx: /usr/include/c++/v1/cwchar:165:106: error: cannot initialize a parameter of type 'const WCHAR *' (aka 'const unsigned short *') with an lvalue of type 'const wchar_t *' >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Nov 01 16:50:00 UTC 2012 >Closed-Date: >Last-Modified: >Originator: O. Hartmann >Release: FreeBSD 10.0-CURRENT #4 r242426M: Thu Nov 1 08:53:11 CET 2012 >Organization: FU Berlin >Environment: >Description: Compiling port graphics/libfpx on FreeBSD 10.0-CURRENT fails. It compiles well on FreeBSD 9.1-PRE (both amd64 and buildworld with CLANG). On FreeBSD 10 I receive the follwoing error while compiling with CLANG. Using gcc46 (setting USE_GCC=4.6+ in the Makefile) for this port fails with the error: ===> Building for libfpx-1.3.1.1 "/usr/share/mk/bsd.compiler.mk", line 17: Unable to determing compiler type for gcc46 *** [do-build] Error code 1 So, since FBSD 9 compiles well, I guess this is FBSD 10 specifica. And by the way: For building world, I use the flag CXXFLAGS+= -stdlib=libc++ -std=c++11 in /etc/src.conf (since several ports seem to react allergic to the new C++11 standard and reject building). -------- clang++ -O2 -pipe -fno-strict-aliasing -O3 -march=native -DHAVE_WCHAR_H -DHAVE_DLFCN_H -DHAVE_SYS_TIME_H -DHAVE_SYS_PARAM_H -DHAVE_SYS_MOUNT_H -Qunused-arguments -fstack-protector -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wpointer-arith -Wno-uninitialized -Wno-empty-body -Wno-string-plus-int -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-conversion -fno-rtti -fno-exceptions -fno-strict-aliasing -DHAVE_WCHAR_H -DHAVE_DLFCN_H -DHAVE_SYS_TIME_H -DHAVE_SYS_PARAM_H -DHAVE_SYS_MOUNT_H -I/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h -I/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/jpeg -I/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole -I/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/basics -I/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ri_image -I/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless -I/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/fpx -I/usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/. -I/usr/local/include -D_UNIX -stdlib=libc++ -std=c++11 -c /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/olestats.cpp -o olestats.o In file included from /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/olestats.cpp:40: In file included from /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/olestorg.h:25: In file included from /usr/include/c++/v1/fstream:169: In file included from /usr/include/c++/v1/ostream:130: In file included from /usr/include/c++/v1/ios:216: In file included from /usr/include/c++/v1/__locale:15: In file included from /usr/include/c++/v1/string:433: /usr/include/c++/v1/cwchar:165:106: error: cannot initialize a parameter of type 'const WCHAR *' (aka 'const unsigned short *') with an lvalue of type 'const wchar_t *' inline _LIBCPP_INLINE_VISIBILITY const wchar_t* wcschr(const wchar_t* __s, wchar_t __c) {return ::wcschr(__s, __c);} ^~~ /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h:75:42: note: passing argument to parameter 'string' here WCHAR * _CRTAPI1 wcschr ( const WCHAR * string, WCHAR ch ); ^ In file included from /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/olestats.cpp:40: In file included from /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/olestorg.h:25: In file included from /usr/include/c++/v1/fstream:169: In file included from /usr/include/c++/v1/ostream:130: In file included from /usr/include/c++/v1/ios:216: In file included from /usr/include/c++/v1/__locale:15: In file included from /usr/include/c++/v1/string:433: /usr/include/c++/v1/cwchar:166:106: error: cannot initialize a parameter of type 'const WCHAR *' (aka 'const unsigned short *') with an lvalue of type 'wchar_t *' inline _LIBCPP_INLINE_VISIBILITY wchar_t* wcschr( wchar_t* __s, wchar_t __c) {return ::wcschr(__s, __c);} ^~~ /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h:75:42: note: passing argument to parameter 'string' here WCHAR * _CRTAPI1 wcschr ( const WCHAR * string, WCHAR ch ); ^ In file included from /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/olestats.cpp:40: In file included from /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/olestorg.h:25: In file included from /usr/include/c++/v1/fstream:169: In file included from /usr/include/c++/v1/ostream:130: In file included from /usr/include/c++/v1/ios:216: In file included from /usr/include/c++/v1/__locale:15: In file included from /usr/include/c++/v1/string:433: /usr/include/c++/v1/cwchar:174:108: error: cannot initialize a parameter of type 'const WCHAR *' (aka 'const unsigned short *') with an lvalue of type 'const wchar_t *' inline _LIBCPP_INLINE_VISIBILITY const wchar_t* wcsrchr(const wchar_t* __s, wchar_t __c) {return ::wcsrchr(__s, __c);} ^~~ /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h:87:41: note: passing argument to parameter 'wcs' here WCHAR * _CRTAPI1 wcsrchr(const WCHAR * wcs, WCHAR wc); ^ In file included from /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/olestats.cpp:40: In file included from /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/olestorg.h:25: In file included from /usr/include/c++/v1/fstream:169: In file included from /usr/include/c++/v1/ostream:130: In file included from /usr/include/c++/v1/ios:216: In file included from /usr/include/c++/v1/__locale:15: In file included from /usr/include/c++/v1/string:433: /usr/include/c++/v1/cwchar:175:108: error: cannot initialize a parameter of type 'const WCHAR *' (aka 'const unsigned short *') with an lvalue of type 'wchar_t *' inline _LIBCPP_INLINE_VISIBILITY wchar_t* wcsrchr( wchar_t* __s, wchar_t __c) {return ::wcsrchr(__s, __c);} ^~~ /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h:87:41: note: passing argument to parameter 'wcs' here WCHAR * _CRTAPI1 wcsrchr(const WCHAR * wcs, WCHAR wc); ^ In file included from /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/olestats.cpp:40: In file included from /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/ole/olestorg.h:25: In file included from /usr/include/c++/v1/fstream:169: In file included from /usr/include/c++/v1/ostream:130: In file included from /usr/include/c++/v1/ios:216: In file included from /usr/include/c++/v1/__locale:15: /usr/include/c++/v1/string:701:17: error: no matching function for call to 'fpx_wcslen' {return wcslen(__s);} ^~~~~~ /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h:59:20: note: expanded from macro 'wcslen' # define wcslen fpx_wcslen ^~~~~~~~~~ /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h:81:19: note: candidate function not viable: no known conversion from 'const char_type *' (aka 'const wchar_t *') to 'const WCHAR *' (aka 'const unsigned short *') for 1st argument size_t _CRTAPI1 wcslen(WCHAR const *wsz); ^ /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1/oless/h/owchar.h:59:20: note: expanded from macro 'wcslen' # define wcslen fpx_wcslen ^ 5 errors generated. *** [olestats.o] Error code 1 Stop in /usr/ports/graphics/libfpx/work/libfpx-1.3.1-1. *** [do-build] Error code 1 Stop in /usr/ports/graphics/libfpx. ** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade20121101-24227-1uyy13h env UPGRADE_TOOL=portupgrade UPGRADE_PORT=libfpx-1.3.1.1 UPGRADE_PORT_VER=1.3.1.1 make ** Fix the problem and try again. ** Listing the failed packages (-:ignored / *:skipped / !:failed) ! graphics/libfpx (libfpx-1.3.1.1) (bad C++ code) >How-To-Repeat: Try to build port graphics/libfpx on most recent FreeBSD 10 >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201211011646.qA1GkJ7N058070>