ports/178250: Fix build failures of japanese/{mozc-server, mozc-tool, ibus-mozc, mozc-el}
Tadaaki Nagao
abtk at shitamachi.org
Tue Apr 30 06:50:02 UTC 2013
>Number: 178250
>Category: ports
>Synopsis: Fix build failures of japanese/{mozc-server,mozc-tool,ibus-mozc,mozc-el}
>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: Tue Apr 30 06:50:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator: Tadaaki Nagao
>Release: 9.1-STABLE
>Organization:
>Environment:
FreeBSD salt.shitamachi.org 9.1-STABLE FreeBSD 9.1-STABLE #10: Mon Feb 25 19:15:16 JST 2013 root at salt.shitamachi.org:/usr/obj/usr/src/sys/SALT amd64
>Description:
japanese/mozc-server, japanese/mozc-tool, japanese/ibus-mozc and
japanese/mozc-el don't build after the upgrade to 1.10.1390.102.
In japanese/mozc-server/Makefile, BUILD_DEPENDS on libraries are
specified in a wrong way and USE_QT is misplaced after bsd.port.pre.mk.
On i386, ldflags setting in common.gyp seems to need -fstack-protector,
or the build fails with the following link error:
--------8<--------cut here--------8<--------
LINK(host) out_linux/Release/gen_oss_segmenter_bitarray_main
out_linux/Release/obj.host/converter/libgen_segmenter_bitarray.a(gen_segmenter_b)(.text+0x19b4): In function `mozc::SegmenterBitarrayGenerator::GenerateBitarray(int, int, bool (*)(unsigned short, unsigned short), std::string const&)':
: undefined reference to `__stack_chk_fail_local'
out_linux/Release/obj.host/base/libbase_core.a(logging.o)(.text+0x428): In function `mozc::Logging::GetLogMessageHeader()':
: undefined reference to `__stack_chk_fail_local'
out_linux/Release/obj.host/base/libbase_core.a(system_util.o)(.text+0x603): In function `mozc::SystemUtil::GetUserNameAsString()':
: undefined reference to `__stack_chk_fail_local'
out_linux/Release/obj.host/base/libbase_core.a(system_util.o)(.text+0x1331): In function `mozc::Singleton<mozc::(anonymous namespace)::UserProfileDirectoryImpl>::Init()':
: undefined reference to `__stack_chk_fail_local'
out_linux/Release/obj.host/base/libbase_core.a(util.o)(.text+0x28ac): In function `(anonymous namespace)::StringAppendV(std::string*, char const*, char*)':
: undefined reference to `__stack_chk_fail_local'
out_linux/Release/obj.host/base/libbase_core.a(util.o)(.text+0x3011): more undefined references to `__stack_chk_fail_local' follow
gmake: *** [out_linux/Release/gen_oss_segmenter_bitarray_main] Error 1
gmake: *** Waiting for unfinished jobs....
Traceback (most recent call last):
File "build_mozc.py", line 1462, in <module>
main()
File "build_mozc.py", line 1447, in main
BuildToolsMain(cmd_opts, cmd_args, original_directory_name)
File "build_mozc.py", line 982, in BuildToolsMain
BuildMain(options, [build_tools_target], original_directory_name)
File "build_mozc.py", line 1075, in BuildMain
BuildOnLinux(options, targets, original_directory_name)
File "build_mozc.py", line 1028, in BuildOnLinux
RunOrDie([make_command] + build_args + target_names)
File "/usr/ports/japanese/mozc-server/work/mozc-1.10.1390.102/build_tools/util.py", line 97, in RunOrDie
'==========']))
build_tools.util.RunOrDieError:
==========
ERROR: /usr/ports/japanese/mozc-server/work/mozc-1.10.1390.102/mozcmake -j2 MAKE_JOBS=2 BUILDTYPE=Release builddir_name=out_linux build_tools
==========
*** Error code 1
Stop in /usr/ports/japanese/mozc-server.
*** Error code 1
Stop in /usr/ports/japanese/mozc-server.
--------8<--------cut here--------8<--------
>How-To-Repeat:
It's really straightforward but, for example,
cd /usr/ports/japanese/mozc-server
make
and so on.
>Fix:
The following patch is against the port tree as of svn r316662.
Tested on 9.1-RELEASE-p3 (both amd64 and i386) and 8.3-RELEASE-p8 (both
amd64 and i386).
Patch attached with submission follows:
diff -ruN /usr/ports/japanese/mozc-server.orig/Makefile /usr/ports/japanese/mozc-server/Makefile
--- /usr/ports/japanese/mozc-server.orig/Makefile 2013-04-28 18:13:49.550888000 +0900
+++ /usr/ports/japanese/mozc-server/Makefile 2013-04-29 22:38:13.063887261 +0900
@@ -25,12 +25,14 @@
BUILD_MOZC_LIST?= mozc_server
-GYP_OPTIONS=
+GYP_OPTIONS=
.if ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server" || \
${BUILD_MOZC_LIST:Mibus_mozc} == "ibus_mozc" || \
${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc" || \
${BUILD_MOZC_LIST:Mmozc_el} == "mozc_el"
GYP_OPTIONS= --noqt
+.elif ${BUILD_MOZC_LIST:Mmozc_tool} == "mozc_tool"
+USE_QT4+= corelib gui
.endif
.include <bsd.port.pre.mk>
@@ -60,7 +62,7 @@
.endfor
LOCALBASE_PTN= ${LOCALBASE:S/\\/\\\\/g:S/"/\"/g:S/\$/\\$/g:S/,/\,/g}
-BUILD_MODE= Release
+BUILD_MODE= Release
BUILD_CMD= ${SETENV} ${MAKE_ENV} ${GMAKE}
BUILD_MOZC_CMD= cd ${BUILD_WRKSRC} && \
${SETENV} BUILD_COMMAND="${WRKSRC}/mozcmake" \
@@ -74,8 +76,8 @@
${LOCALBASE_REPLACE_FILES}
cd ${WRKSRC} && \
${REINPLACE_CMD} ${SSL_REINPLACE_STR} base/base.gyp
- ${MKDIR} -p ${WRKSRC}/mozc_build_tools/linux
- ${LN} -sf ${LOCALBASE}/bin/protoc ${WRKSRC}/mozc_build_tools/linux/
+ ${MKDIR} ${WRKSRC}/mozc_build_tools/linux
+ ${LN} -sf ${LOCALBASE}/bin/protoc ${WRKSRC}/mozc_build_tools/linux/
.if ${BUILD_MOZC_LIST:Mfcitx_mozc} == "fcitx_mozc"
cd ${WRKSRC} && \
${REINPLACE_CMD} 's,/po/mo},%po}mo,g' \
@@ -99,8 +101,9 @@
# mozc_server
.if ${BUILD_MOZC_LIST:Mmozc_server} == "mozc_server"
-BUILD_DEPENDS+= glib:${PORTSDIR}/devel/glib20 \
- gtk:${PORTSDIR}/x11-toolkits/gtk20
+BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/glib-2.0.pc:${PORTSDIR}/devel/glib20 \
+ ${LOCALBASE}/libdata/pkgconfig/gtk+-x11-2.0.pc:${PORTSDIR}/x11-toolkits/gtk20 \
+ ${LOCALBASE}/libdata/pkgconfig/zinnia.pc:${PORTSDIR}/japanese/zinnia
PLIST_FILES+= bin/mozc_server
do-build-mozc_server:
@@ -116,8 +119,7 @@
# mozc_tool
.if ${BUILD_MOZC_LIST:Mmozc_tool} == "mozc_tool"
LIB_DEPENDS+= zinnia.0:${PORTSDIR}/japanese/zinnia
-BUILD_DEPENDS+= gtk:${PORTSDIR}/x11-toolkits/gtk20
-USE_QT4+= corelib gui
+BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/gtk+-x11-2.0.pc:${PORTSDIR}/x11-toolkits/gtk20
RUN_DEPENDS+= ${LOCALBASE}/share/tegaki/models/zinnia/handwriting-ja.model:${PORTSDIR}/japanese/tegaki-zinnia-japanese
PLIST_FILES+= bin/mozc_tool \
@@ -164,7 +166,7 @@
${DATADIR_REL}/icons/product_logo.png \
${DATADIR_REL}/icons/properties.png \
${DATADIR_REL}/icons/tool.png \
- share/ibus/component/mozc.xml
+ share/ibus/component/mozc.xml
PLIST_DIRS+= ${DATADIR_REL}/icons ${DATADIR_REL}
do-build-ibus_mozc:
@@ -202,7 +204,7 @@
LIB_DEPENDS+= fcitx-config.4:${PORTSDIR}/chinese/fcitx \
zinnia.0:${PORTSDIR}/japanese/zinnia
-BUILD_DEPENDS+= glib:${PORTSDIR}/devel/glib20
+BUILD_DEPENDS+= ${LOCALBASE}/libdata/pkgconfig/glib-2.0.pc:${PORTSDIR}/devel/glib20
RUN_DEPENDS+= mozc_server:${PORTSDIR}/japanese/mozc-server \
mozc_tool:${PORTSDIR}/japanese/mozc-tool \
mozc_server_start:${PORTSDIR}/japanese/mozc-additions
@@ -264,8 +266,8 @@
.if ${BUILD_MOZC_LIST:Mmozc_el} == "mozc_el"
LIB_DEPENDS+= zinnia.0:${PORTSDIR}/japanese/zinnia
BUILD_DEPENDS+= emacs:${PORTSDIR}/editors/emacs \
- glib:${PORTSDIR}/devel/glib20 \
- gtk:${PORTSDIR}/x11-toolkits/gtk20
+ ${LOCALBASE}/libdata/pkgconfig/glib-2.0.pc:${PORTSDIR}/devel/glib20 \
+ ${LOCALBASE}/libdata/pkgconfig/gtk+-x11-2.0.pc:${PORTSDIR}/x11-toolkits/gtk20
RUN_DEPENDS+= mozc_server:${PORTSDIR}/japanese/mozc-server \
mozc_server_start:${PORTSDIR}/japanese/mozc-additions
diff -ruN /usr/ports/japanese/mozc-server.orig/files/patch-gyp_common.gypi /usr/ports/japanese/mozc-server/files/patch-gyp_common.gypi
--- /usr/ports/japanese/mozc-server.orig/files/patch-gyp_common.gypi 2013-04-24 06:09:19.525367000 +0900
+++ /usr/ports/japanese/mozc-server/files/patch-gyp_common.gypi 2013-04-29 22:36:45.226889706 +0900
@@ -1,5 +1,5 @@
---- gyp/common.gypi.orig 2013-04-21 03:48:45.395416165 +0900
-+++ gyp/common.gypi 2013-04-21 08:31:10.191270448 +0900
+--- gyp/common.gypi.orig 2013-03-29 13:33:42.000000000 +0900
++++ gyp/common.gypi 2013-04-29 22:28:19.000000000 +0900
@@ -58,7 +58,7 @@
# warning_cflags will be shared with Mac and Linux.
'warning_cflags': [
@@ -9,7 +9,15 @@
'-Wno-char-subscripts',
'-Wno-sign-compare',
'-Wno-deprecated-declarations',
-@@ -194,7 +194,7 @@
+@@ -90,6 +90,7 @@
+ # Libraries for GNU/Linux environment.
+ 'linux_ldflags': [
+ '-pthread',
++ '-fstack-protector',
+ ],
+
+ # 'conditions' is put inside of 'variables' so that we can use
+@@ -194,7 +195,7 @@
# - http://code.google.com/p/protobuf/issues/detail?id=128
# - http://code.google.com/p/protobuf/issues/detail?id=370
# for the background information.
@@ -18,7 +26,7 @@
# use_libzinnia represents if zinnia library is used or not.
# This option is only for Linux.
-@@ -735,6 +735,12 @@
+@@ -735,6 +736,12 @@
# <unordered_map> and <unordered_set>.
'-Wno-deprecated',
],
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list