Summary: | chinese/fcitx: Error while trying to update to 4.2.8.6 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Ports & Packages | Reporter: | Justin Yang <linuxjustin> | ||||||||
Component: | Individual Port(s) | Assignee: | Xin LI <delphij> | ||||||||
Status: | Closed FIXED | ||||||||||
Severity: | Affects Only Me | CC: | delphij, lichray | ||||||||
Priority: | --- | Flags: | bugzilla:
maintainer-feedback?
(lichray) |
||||||||
Version: | Latest | ||||||||||
Hardware: | amd64 | ||||||||||
OS: | Any | ||||||||||
Attachments: |
|
Description
Justin Yang
2015-04-02 11:37:45 UTC
(In reply to Justin Yang from comment #0) uname -a, ld --version, cc --version, pkg which /usr/local/bin/g-ir-scanner (In reply to lichray from comment #1) > uname -a FreeBSD darkgeek 10.1-RELEASE FreeBSD 10.1-RELEASE #0: Sun Nov 16 19:23:55 CST 2014 root@darkgeek:/usr/obj/usr/src/sys/GENERIC amd64 > ld --version GNU ld 2.17.50 [FreeBSD] 2007-07-03 Copyright 2007 Free Software Foundation, Inc. This program is free software; you may redistribute it under the terms of the GNU General Public License. This program has absolutely no warranty. > cc --version FreeBSD clang version 3.4.1 (tags/RELEASE_34/dot1-final 208032) 20140512 Target: x86_64-unknown-freebsd10.1 Thread model: posix > pkg which /usr/local/bin/g-ir-scanner /usr/local/bin/g-ir-scanner was installed by package gobject-introspection-1.42.0 The following command, cd /usr/ports/chinese/fcitx/work/fcitx-4.2.8.6/src/lib/fcitx-gclient && env LD_LIBRARY_PATH=/usr/ports/chinese/fcitx/work/fcitx-4.2.8.6/src/lib/fcitx-gclient /usr/local/bin/g-ir-scanner --warn-all --add-include-path=/usr/ports/chinese/fcitx/work/fcitx-4.2.8.6/src/lib/fcitx-gclient --namespace=Fcitx --nsversion=1.0 -I/usr/ports/chinese/fcitx/work/fcitx-4.2.8.6 -I/usr/ports/chinese/fcitx/work/fcitx-4.2.8.6/src -I/usr/ports/chinese/fcitx/work/fcitx-4.2.8.6/src -I/usr/ports/chinese/fcitx/work/fcitx-4.2.8.6/src/lib -I/usr/local/include -I/usr/local/include -I/usr/local/include -I/usr/include -I/usr/include -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/dbus-1.0 -I/usr/local/include/dbus-1.0/include -I/usr/ports/chinese/fcitx/work/fcitx-4.2.8.6/src/lib/fcitx-gclient --library=fcitx-gclient --quiet --symbol-prefix=fcitx --include=Gio-2.0 --include=GObject-2.0 --include=GLib-2.0 --no-libtool -L/usr/ports/chinese/fcitx/work/fcitx-4.2.8.6/src/lib/fcitx-gclient --output=/usr/ports/chinese/fcitx/work/fcitx-4.2.8.6/src/lib/fcitx-gclient/Fcitx-1.0.gir fcitx-gclient fcitxclient.c fcitxinputmethod.c fcitxkbd.c fcitxconnection.c fcitxclient.h fcitxinputmethod.h fcitxkbd.h fcitxconnection.h Does not work in staging environment, but works outside staging, also works by invoking `make` in the source directory as long as the `make` is not invoke by ports. I don't know why. (In reply to Justin Yang from comment #2) Lock down the cause: g-ir-scanner is trying to link to the old version of libfcitx-gclient installed on your system. Workaround: uninstall old version before compiling the new version. Keep looking at how to fix it. Created attachment 155133 [details]
proposed patch
fcitx's cmake script currently always finds iconv(3) in ports, and it indeed needs wchar_t conversion. It links to ports iconv without the LDFLAGS hack.
Drop the LDFLAGS hack to prevent g-ir-scanner to link to old fcitx libraries installed on the build system.nm
Created attachment 155134 [details]
proposed patch
fcitx's cmake script currently always finds iconv(3) in ports, and it indeed needs wchar_t conversion. It links to ports iconv without the LDFLAGS hack.
Drop the LDFLAGS hack to prevent g-ir-scanner to link to old fcitx libraries installed on the build system.
(In reply to lichray from comment #6) Hi, I applied your patch (attachment 155134 [details]) to Makefile and tried to update the port using portmaster, however, it failed with the following messages: ...Skip... [ 5%] Built target fcitx-addon-fcitx-keyboard--addon--desc-1 CMakeFiles/fcitx-utils.dir/log.c.o: In function `FcitxLogFuncV': /usr/ports/chinese/fcitx/work/fcitx-4.2.8.6/src/lib/fcitx-utils/log.c:(.text+0x191): undefined reference to `libiconv_open' /usr/ports/chinese/fcitx/work/fcitx-4.2.8.6/src/lib/fcitx-utils/log.c:(.text+0x1ef): undefined reference to `libiconv' cc: error: linker command failed with exit code 1 (use -v to see invocation) --- src/lib/fcitx-utils/libfcitx-utils.so.0.1 --- *** [src/lib/fcitx-utils/libfcitx-utils.so.0.1] Error code 1 make[5]: stopped in /usr/ports/chinese/fcitx/work/fcitx-4.2.8.6 1 error make[5]: stopped in /usr/ports/chinese/fcitx/work/fcitx-4.2.8.6 --- src/lib/fcitx-utils/CMakeFiles/fcitx-utils.dir/all --- *** [src/lib/fcitx-utils/CMakeFiles/fcitx-utils.dir/all] Error code 2 make[4]: stopped in /usr/ports/chinese/fcitx/work/fcitx-4.2.8.6 Scanning dependencies of target fcitx-addon-fcitx-table--headers-1 A failure has been detected in another branch of the parallel make make[5]: stopped in /usr/ports/chinese/fcitx/work/fcitx-4.2.8.6 --- src/im/table/CMakeFiles/fcitx-addon-fcitx-table--headers-1.dir/all --- *** [src/im/table/CMakeFiles/fcitx-addon-fcitx-table--headers-1.dir/all] Error code 2 make[4]: stopped in /usr/ports/chinese/fcitx/work/fcitx-4.2.8.6 Scanning dependencies of target fcitx-addon-fcitx-table--addon--desc-1 A failure has been detected in another branch of the parallel make make[5]: stopped in /usr/ports/chinese/fcitx/work/fcitx-4.2.8.6 --- src/im/table/CMakeFiles/fcitx-addon-fcitx-table--addon--desc-1.dir/all --- *** [src/im/table/CMakeFiles/fcitx-addon-fcitx-table--addon--desc-1.dir/all] Error code 2 make[4]: stopped in /usr/ports/chinese/fcitx/work/fcitx-4.2.8.6 A failure has been detected in another branch of the parallel make make[5]: stopped in /usr/ports/chinese/fcitx/work/fcitx-4.2.8.6 - src/im/pinyin/data/CMakeFiles/py-data-download.dir/all --- *** [src/im/pinyin/data/CMakeFiles/py-data-download.dir/all] Error code 2 make[4]: stopped in /usr/ports/chinese/fcitx/work/fcitx-4.2.8.6 4 errors make[4]: stopped in /usr/ports/chinese/fcitx/work/fcitx-4.2.8.6 *** [all] Error code 2 make[3]: stopped in /usr/ports/chinese/fcitx/work/fcitx-4.2.8.6 1 error make[3]: stopped in /usr/ports/chinese/fcitx/work/fcitx-4.2.8.6 I will uninstall the port before updating later, to see whether it'll be OK to compile the latest version. (In reply to lichray from comment #4) Hi, I can confirm it builds and installs chinese/fcitx 4.2.8.6 successfully after my uninstalling the port and rebuilding it again. Thanks. (In reply to Justin Yang from comment #7) After the port stops building, can you send me your `work/fcitx-4.2.8.6/CMakeCache.txt'? You can paste it in pastebin, or gist. Thanks. (In reply to lichray from comment #9) Hi, I paste the CMakeCache.txt file to gist (https://gist.github.com/darkgeek/cf6926a04a763cbd9e8d) and hope it'll be useful. Don't hesitate to let me know if you need more information. Thanks. P.S.: As my comment #8 points out, I have updated to 4.2.8.6 successfully, so this CMakeCache.txt is generated in a system where chinese/fcitx is the latest and Makefile is patched. Created attachment 155145 [details]
new patch
FreeBSD >= 10 has a real `iconv_open` symbol in libc (9 doesn't), and that is why fcitx's cmake script can find it.
Hack the script to let it not to use base iconv(3), so that it knows how to link to ports libiconv.
(In reply to Justin Yang from comment #10) This time I also reproduced the iconv issue caused by my old patch, and I created a new patch. You can try uninstall the new fcitx and use `pkg install zh-fcitx` to go back to the new one then recompile the patched, latest fcitx... Well, that's how I reproduced and tested it. (In reply to lichray from comment #12) Nice. I uninstalled chinese/fcitx (new) and installed the 4.2.6.1_5 version (old) via pkg, then applied your new patches, it updated the port successfully to the new one. Thanks. Committed, thanks! A commit references this bug: Author: delphij Date: Fri Apr 3 20:56:53 UTC 2015 New revision: 383178 URL: https://svnweb.freebsd.org/changeset/ports/383178 Log: Fix build when building in an environment with old version of fcitx present. PR: ports/199112 Submitted by: maintainer Changes: head/chinese/fcitx/Makefile head/chinese/fcitx/files/patch-cmake__FindLibiconv.cmake |