cc misc/src/sqlcli.c -static -pthread -lsqlite3 -L/usr/local/lib -I/usr/local/include -o misc/sqlcli && "/usr/bin/strip" misc/sqlcli /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuRegexpFunc': (.text+0x1a0c5): undefined reference to `uregex_open' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuRegexpFunc': (.text+0x1a112): undefined reference to `uregex_setText' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuRegexpFunc': (.text+0x1a137): undefined reference to `uregex_matches' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuRegexpFunc': (.text+0x1a174): undefined reference to `uregex_setText' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuCaseFunc16': (.text+0x1a272): undefined reference to `u_strToUpper' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuCaseFunc16': (.text+0x1a299): undefined reference to `u_strToLower' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuLikeFunc': (.text+0x1a498): undefined reference to `utf8_nextCharSafeBody' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuLoadCollation': (.text+0x1a572): undefined reference to `ucol_open' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuLoadCollation': (.text+0x1a5c1): undefined reference to `ucol_close' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuFunctionError': (.text+0x1a61d): undefined reference to `u_errorName' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuCollationColl': (.text+0x1a6cd): undefined reference to `ucol_strcoll' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuCollationDel': (.text+0x1a6e8): undefined reference to `ucol_close' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuLikeCompare': (.text+0x1a7c5): undefined reference to `u_foldCase' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuLikeCompare': (.text+0x1a7d8): undefined reference to `u_foldCase' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuRegexpDelete': (.text+0x1a873): undefined reference to `uregex_close' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuOpen': (.text+0x30f03): undefined reference to `utf8_nextCharSafeBody' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuOpen': (.text+0x30f22): undefined reference to `u_foldCase' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuOpen': (.text+0x31058): undefined reference to `utf8_nextCharSafeBody' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuOpen': (.text+0x3108e): undefined reference to `ubrk_open' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuOpen': (.text+0x310b1): undefined reference to `ubrk_first' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuClose': (.text+0x310d3): undefined reference to `ubrk_close' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuNext': (.text+0x3110c): undefined reference to `ubrk_current' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuNext': (.text+0x31119): undefined reference to `ubrk_next' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuNext': (.text+0x31179): undefined reference to `u_isspace' /usr/local/lib/libsqlite3.a(sqlite3.o): In function `icuNext': (.text+0x311f2): undefined reference to `u_strToUTF8' cc: error: linker command failed with exit code 1 (use -v to see invocation) *** Error code 1 http://package23.nyi.freebsd.org/data/103i386-default-PR214384/2016-11-14_20h14m36s/logs/errors/cbsd-11.0.4_1.log
One way to fix is via `pkg-config sqlite3 --libs --static` as long as sqlite3.pc specifies dependencies Requires.private: icu-i18n which it doesn't currently. Otherwise, the build can fail early similar to devel/subversion-static.
Ok, got it. I need a time for investigation now
(In reply to Jan Beich (mail not working) from comment #1) Good point. Fixed, see: (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214569)
Created attachment 177075 [details] Dynamic linking Maybe build sqlcli dynamically? (sysutils/cbsd/files/patch-Makefile)
Any advance here. Problem exists still.
(In reply to Pavel Volkov from comment #4) Unfortunately, this is a bad idea for me - in this place a static key is used for stability reasons - if the sqlite3 is upgraded unsuccessfully, it can break the management of virtual environments. I tried to find solutions to fix this problem, but it's still unfortunate. The only option is not to use the ICU option upon databases/sqlite3 build. As far as I can see, devel/subversion is also affected to this problem
Only a warning like "sqlite3 have to compiled without ICU option" for sysutils/cbsd for the moment?
(In reply to w.schwarzenfeld from comment #7) Yes, most likely I will do the same as devel/subversion: -- .if ${PORT_OPTIONS:MSTATIC} @if ${GREP} -q ucol_close ${LOCALBASE}/lib/libsqlite3.a ; then \ ${ECHO_MSG} "" ; \ ${ECHO_MSG} "You can not build static subversion if your SQLite3 is built with ICU enabled."; \ ${ECHO_MSG} "Please, reinstall 'devel/sqlite3' port with disabled ICU support."; \ ${ECHO_MSG} "" ; \ ${FALSE} ; \ fi .endif -- On the other hand, I think it would be a good compromise to add an dialog option for CBSD port ( or FLAVOR ): [x] Static (by default). But those users who have an ICU can choose dynamic linking
Created attachment 189682 [details] patch for static linking with dependencies from ICU Hello. Or you may used command pkg-config for check libraries required for libsqlite3.a. When compiling sqlite with ICU support, the correct sqlite3.pc file is also created. You must use the command `pkg-config sqlite3 --libs --static` to get dependent libraries. This patch do it. Thanks.
(In reply to Pavel Volkov from comment #9) This patch works fine for me. I added it to the next CBSD release. Thanks for the help!
A commit references this bug: Author: novel Date: Fri Jan 19 16:32:25 UTC 2018 New revision: 459436 URL: https://svnweb.freebsd.org/changeset/ports/459436 Log: sysutils/cbsd: update to 11.1.12 - Update to 11.1.12 [1]; - Add 'pkgconfig' to USES as it's now uses it to check sqlite libs. This release also fixes build when databases/sqlite3 was built with ICU=on [2]. PR: 225319 [1], 214551 [2] Submitted by: maintainer [1], Pavel Volkov [2] Reported by: jbeich [2] Changes: head/sysutils/cbsd/Makefile head/sysutils/cbsd/distinfo
This bug should be fixed now as sysutils/cbsd was updated to 11.1.12. Please let me know if you still have problems with that.
I think this PR can be closed. If the problem persists, than reopen. Thanks!
Thanks, builds without problems. So I close here.