[sword-devel] Can't build on OS X (undefined reference to UnicodeString)

Greg Hellings greg.hellings at gmail.com
Wed Aug 20 13:16:46 MST 2014


ICU is largely (exclusively?) used for transliteration within Sword. Qt
offers the same functionality (it has both its own built-in functionality
for that or it can be built on top of ICU). Since Qt already comes with the
functionality built in, BibleTime distributes its OS X binary without the
extra size of ICU.

As for wanting to build without MacPorts, you'd have to either find or
install the development headers for both of those libraries if you want
that support (In the distant past ICU was available on Mac but not
development headers for it, so MacPorts just installed headers for the
system library back then. Not sure what the story is now). If you have the
headers and the link library, you'll need to specify the proper search
path. For ICU, you can add the standard search directories to your CMake
invocation using the standard mechanism for appending library and header
search paths. For CLucene you can use that method, or specify CLUCENE_HOME
in your environment variables before invocation.

Another option entirely is to run CMake until it fails to find them, then
edit your CMakeCache.txt file to manually specify the path for the
appropriate CLUCENE and ICU variables, then rerun CMake to generate the
build files with the modified options.

There are lots of paths to get you where you're going, and I'm willing to
accept patches or pull requests (http://github.com/greg-hellings/sword.git)
to improve detection on OS X. The relevant files are
cmake/Find{ICU,CLucene}.cmake in the Sword source tree.

--Greg


On Wed, Aug 20, 2014 at 2:57 PM, Manfred Bergmann <manfred.bergmann at me.com>
wrote:

> If possible I don't want to install libraries (Homebrew, MacPorts, etc)
> used for building Sword which are not part of the stock OS X.
>
> How can ICU be replaced with Qt?
>
>
>
> Manfred
>
> Am 19.08.2014 um 21:56 schrieb Greg Hellings <greg.hellings at gmail.com>:
>
> > On my own system I get:
> >
> > -- CLucene: yes /opt/local/lib/libclucene-core.dylib in
> /opt/local/include and /opt/local/include;/opt/local/include
> >
> > -- PkgConfig: yes
> >
> > -- ICU: yes /opt/local/lib/libicuuc.dylib and /opt/local/include
> >
> >
> >
> > I have installed them from MacPorts. I believe, however, that BibleTime
> builds without them as Qt is used in place of ICU and CLucene is linked
> directly into BibleTime for its custom search functionality. Obviously,
> feel free to edit your local .sh script. Those are only given there for
> examples of how to build with CMake for people who are not familiar with
> the system much as usrinst.sh is more of a guideline. For instance, I doubt
> you're looking to build the Python or Perl extensions.
> >
> >
> >
> > --Greg
> >
> >
> >
> > On Tue, Aug 19, 2014 at 12:28 PM, Manfred Bergmann <
> manfred.bergmann at me.com> wrote:
> > Hmm. Don't know this doesn't work.
> >
> > tried cmake, called cmake/build-release.sh, got the following:
> > ---
> > pacsaar:sword-trunk mbergmann$ cmake/build-release.sh
> > -- The CXX compiler identification is AppleClang 5.1.0.5030040
> > -- The C compiler identification is AppleClang 5.1.0.5030040
> > -- Check for working CXX compiler: /usr/bin/c++
> > -- Check for working CXX compiler: /usr/bin/c++ -- works
> > -- Detecting CXX compiler ABI info
> > -- Detecting CXX compiler ABI info - done
> > -- Check for working C compiler: /usr/bin/cc
> > -- Check for working C compiler: /usr/bin/cc -- works
> > -- Detecting C compiler ABI info
> > -- Detecting C compiler ABI info - done
> > -- Configuring your system to build libsword.
> > -- SWORD Version 1007003000
> > --
> > -- SEARCHING FOR SYTEM PACKAGES
> > -- System regex.h: Yes
> > --
> > -- CONFIGURING SOURCE LIST
> > -- ZLib: system /usr/lib/libz.dylib
> > -- bzip2: system /usr/lib/libbz2.dylib
> > -- xz: system /usr/lib/liblzma.dylib
> > -- cURL: system /usr/lib/libcurl.dylib and /usr/include
> > -- CLucene: no
> > -- PkgConfig: no
> > -- ICU: no
> > -- Regex.h: system /usr/include
> > -- Building Shared library.
> > -- Building Static library.
> > -- Setting SOVERSION to 1.7.3
> > -- cURL SFTP Support: No
> > -- Setting link libraries to
> /usr/lib/libz.dylib;/usr/lib/libbz2.dylib;/usr/lib/liblzma.dylib;/usr/lib/libcurl.dylib
> > --
> > -- CONFIGURING INSTALLATION DESTINATIONS
> > -- Destination: /opt/sword
> > --
> > -- CONFIGURING SWIG BINDINGS
> > -- Could NOT find SWIG (missing:  SWIG_EXECUTABLE SWIG_DIR)
> > CMake Error at bindings/swig/CMakeLists.txt:15 (MESSAGE):
> >   Swig: no
> >
> >
> > -- Configuring incomplete, errors occurred!
> > See also
> "/Users/mbergmann/Development/MySources/crosswire/sword-trunk/build/CMakeFiles/CMakeOutput.log".
> > make: *** No targets specified and no makefile found.  Stop.
> > ---
> >
> > No ICU seems to be found on the system. Though there is libicucore in
> /usr/lib/.
> >
> > Also a standard configure, make I get the following error:
> > libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../include -I../include
> -I/opt/sword/include -DUSE_AUTOTOOLS -DUNIX -Dunix -D__unix__
> -DSWICU_DATA=\"/opt/sword/lib/sword/1.6.1_icu_2.1\"
> -DGLOBCONFPATH=\"/opt/sword/etc/sword.conf\" -D_FTPLIB_NO_COMPAT -O3
> -D_ICU_ -ftemplate-depth-25 -DCURLAVAILABLE -DNO_VSNPRINTF -MT utilxml.lo
> -MD -MP -MF .deps/utilxml.Tpo -c ../src/utilfuns/utilxml.cpp -o utilxml.o
> >/dev/null 2>&1
> > mv -f .deps/utilxml.Tpo .deps/utilxml.Plo
> > make[1]: *** No rule to make target `../src/utilfuns/swunicod.cpp',
> needed by `swunicod.lo'.  Stop.
> > make: *** [all-recursive] Error 1
> >
> >
> > Now putting all that aside I can build the current trunk all right in
> Xcode when manually putting the stuff together. I'm doing that for a couple
> of years now in the objc binding.
> > But building with _ICU_ doesn't work anymore since I've done svn update
> (see error below).
> > I can run a version without ICU but I'm not exactly certain which other
> problems this might bring.
> >
> > What about the BibleTime guys. Did they build all right on Mac with ICU?
> >
> >
> >
> > Manfred
> >
> >
> > Am 19.08.2014 um 17:17 schrieb Manfred Bergmann <manfred.bergmann at me.com
> >:
> >
> > > Building Sword from within Xcode after svn update.
> > >
> > > But I'll try the following, initiate the configure procedure and see
> how the build goes, which defines are set, etc. Maybe I'm missing something.
> > >
> > >
> > > Manfred
> > >
> > >
> > > Am 19.08.2014 um 17:11 schrieb Greg Hellings <greg.hellings at gmail.com
> >:
> > >
> > >> Is this while building Sword or BibleTime?
> > >>
> > >> --Greg
> > >>
> > >>
> > >> On Mon, Aug 18, 2014 at 12:16 PM, Manfred Bergmann <
> manfred.bergmann at me.com> wrote:
> > >> Hmm, weird stuff.
> > >> UnicodeString seems to be in icucore. And I've got -licucore.
> > >> But it seems to be references not correctly:
> > >>
> > >> Undefined symbols for architecture x86_64:
> > >>  "icu::UnicodeString::UnicodeString()", referenced from:
> > >>      sword::UTF8NFC::processText(sword::SWBuf&, sword::SWKey const*,
> sword::SWModule const*) in utf8nfc.o
> > >>
> > >> Any ideas?
> > >>
> > >> Manfred
> > >>
> > >> Am 18.08.2014 um 17:34 schrieb Manfred Bergmann <
> manfred.bergmann at me.com>:
> > >>
> > >>> Hi.
> > >>>
> > >>> Anyone successfully built the current trunk on OS X (Mavericks)?
> > >>> I get the above error. "UnicodeString" doesn't seem to be part of
> libicucore?
> > >>>
> > >>>
> > >>>
> > >>> Manfred
> > >>>
> > >>> _______________________________________________
> > >>> sword-devel mailing list: sword-devel at crosswire.org
> > >>> http://www.crosswire.org/mailman/listinfo/sword-devel
> > >>> Instructions to unsubscribe/change your settings at above page
> > >>
> > >>
> > >> _______________________________________________
> > >> sword-devel mailing list: sword-devel at crosswire.org
> > >> http://www.crosswire.org/mailman/listinfo/sword-devel
> > >> Instructions to unsubscribe/change your settings at above page
> > >>
> > >> _______________________________________________
> > >> sword-devel mailing list: sword-devel at crosswire.org
> > >> http://www.crosswire.org/mailman/listinfo/sword-devel
> > >> Instructions to unsubscribe/change your settings at above page
> > >
> > >
> > > _______________________________________________
> > > sword-devel mailing list: sword-devel at crosswire.org
> > > http://www.crosswire.org/mailman/listinfo/sword-devel
> > > Instructions to unsubscribe/change your settings at above page
> >
> >
> > _______________________________________________
> > sword-devel mailing list: sword-devel at crosswire.org
> > http://www.crosswire.org/mailman/listinfo/sword-devel
> > Instructions to unsubscribe/change your settings at above page
> >
> > _______________________________________________
> > sword-devel mailing list: sword-devel at crosswire.org
> > http://www.crosswire.org/mailman/listinfo/sword-devel
> > Instructions to unsubscribe/change your settings at above page
>
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.crosswire.org/pipermail/sword-devel/attachments/20140820/633310bc/attachment-0001.html>


More information about the sword-devel mailing list