From: Konrad H. <hof...@sb...> - 2007-03-28 20:43:47
|
Dear all, * Short version * Did somebody manage to compile AGLIB (including the wrappers) on Apple's OS X, and run TableTrans? * Long version * I would be thrilled to get a copy of TableTrans working on the Mac. OS X 10.4.9, PPC G4, non-Intel, Dev.Tools etc. installed, Tcl/Tk version is 8.4.10 from "Tcl/Tk Aqua BI" in /Library/Framework/... and 8.4.7 from Apple in /System/Library/Framework/...). I have to take ahead that I am not too unix-savy concerning coding, re-compiling libraries and such. With some trial and error I got somewhere but am stuck now. I will try explaining what I tried and what does (not) work. Sorry for the lengthy email. I installed agapps-1.1.2-mac-pkg.tar.gz. -> Doesn't work yet. I installed aglib-2.0.1-mac-base.pkg.tar.gz and adapted the script that starts TableTrans.sh -> Still does not work. I get: > khofbaue-al:/usr/local/bin/agtk/agapps/scripts khofbaue$ ./TableTrans2 > Traceback (most recent call last): > File "TableTrans.py", line 21, in ? > import agtk.agTableTrans > File "/usr/local/bin/agtk/agapps/python/agtk/agTableTrans.py", line 19, in ? > import ag > ImportError: No module named ag Looks like it cannot find aglib. Digging into the aglib-2.0.1-mac-base.pkg.tar.gz package shows me that the Mac-Binary release comes _without_ the tcl and python ag_wrappers, which I believe I do need for TableTrans. So I have to re-compile AGLIB from source: Downloaded aglib-2.0.1.tar.gz and compiled with: > export LIBS="-ltcl -lpython" > export CC="gcc-3.3" > export CXX="g++-3.3" > ./configure --disable-python-pkgdir --disable-tcl-pkgdir > make (Note that it does NOT compile with gcc-4.0 and that without the extra LIBS argument linking to tcl and python fails - for me.) Configure runs fine [1] but it seems like there is a problem in linking [2]. This is where I am stuck. I also grabbed some (?) cvs sources with > cvs -z3 -d:pserver:ano...@ag...:/cvsroot/agtk co -P AGLIB I do not know to what extent they are different, but with those compiling actually works. However, installing with > sudo make install fails with some "alloc: invalid block" error [3]. This is where I am stuck now and I would really appreciate some help. Thanks a lot, Konrad ******************** [1] Configure Output > khofbaue-al:~/Development/corpus/TableTrans/aglib/release201/aglib-2.0.1 khofbaue$ ./configure --disable-python-pkgdir --disable-tcl-pkgdir > checking for a BSD-compatible install... /usr/bin/install -c > checking whether build environment is sane... yes > checking for gawk... gawk > checking whether make sets $(MAKE)... yes > checking for gcc... gcc-3.3 > checking for C compiler default output... a.out > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc-3.3 accepts -g... yes > checking for gcc-3.3 option to accept ANSI C... none needed > checking for style of include used by make... GNU > checking dependency style of gcc-3.3... gcc3 > checking whether we are using the GNU C++ compiler... yes > checking whether g++-3.3 accepts -g... yes > checking dependency style of g++-3.3... gcc3 > checking whether make sets $(MAKE)... (cached) yes > checking build system type... powerpc-apple-darwin8.9.0 > checking host system type... powerpc-apple-darwin8.9.0 > checking for ld used by GCC... /usr/bin/ld > checking if the linker (/usr/bin/ld) is GNU ld... no > checking for /usr/bin/ld option to reload object files... -r > checking for BSD-compatible nm... /usr/bin/nm -p > checking for a sed that does not truncate output... /usr/bin/sed > checking whether ln -s works... yes > checking how to recognise dependent libraries... file_magic Mach-O dynamically linked shared library > checking command to parse /usr/bin/nm -p output... ok > checking how to run the C preprocessor... gcc-3.3 -E > checking for egrep... grep -E > checking for ANSI C header files... yes > checking for sys/types.h... yes > checking for sys/stat.h... yes > checking for stdlib.h... yes > checking for string.h... yes > checking for memory.h... yes > checking for strings.h... yes > checking for inttypes.h... yes > checking for stdint.h... yes > checking for unistd.h... yes > checking dlfcn.h usability... yes > checking dlfcn.h presence... yes > checking for dlfcn.h... yes > checking for ranlib... ranlib > checking for strip... strip > checking for objdir... .libs > checking for gcc-3.3 option to produce PIC... -fno-common > checking if gcc-3.3 PIC flag -fno-common works... yes > checking if gcc-3.3 static flag -static works... no > checking if gcc-3.3 supports -c -o file.o... yes > checking if gcc-3.3 supports -c -o file.lo... yes > checking if gcc-3.3 supports -fno-rtti -fno-exceptions... yes > checking whether the linker (/usr/bin/ld) supports shared libraries... yes > checking how to hardcode library paths into programs... unsupported > checking whether stripping libraries is possible... no > checking dynamic linker characteristics... darwin8.9.0 dyld > checking if libtool supports shared libraries... yes > checking whether to build shared libraries... yes > checking whether to build static libraries... no > checking whether -lc should be explicitly linked in... yes > creating libtool > checking isql.h usability... yes > checking isql.h presence... yes > checking for isql.h... yes > checking isqlext.h usability... yes > checking isqlext.h presence... yes > checking for isqlext.h... yes > checking for SQLAllocEnv in -liodbc... yes > checking for tclsh... /usr/bin/tclsh > checking tcl.h usability... yes > checking tcl.h presence... yes > checking for tcl.h... yes > checking for python... /usr/bin/python > checking jni.h usability... no > checking jni.h presence... no > checking for jni.h... no > checking jni_md.h usability... no > checking jni_md.h presence... no > checking for jni_md.h... no > checking for xercesc library version... n/a > checking zlib.h usability... yes > checking zlib.h presence... yes > checking for zlib.h... yes > checking for zlibVersion in -lz... yes > configure: creating ./config.status > config.status: creating Makefile > config.status: creating src/Makefile > config.status: creating src/ag/Makefile > config.status: creating src/ag_wrapper/Makefile > config.status: creating src/ag_wrapper/tcl/Makefile > config.status: creating src/ag_wrapper/python/Makefile > config.status: creating src/ag_wrapper/java/Makefile > config.status: creating src/formats/Makefile > config.status: creating src/formats/AG/Makefile > config.status: creating src/formats/ATLAS/Makefile > config.status: creating src/formats/BAS/Makefile > config.status: creating src/formats/BU/Makefile > config.status: creating src/formats/CAG/Makefile > config.status: creating src/formats/LCF/Makefile > config.status: creating src/formats/SwitchBoard/Makefile > config.status: creating src/formats/TF/Makefile > config.status: creating src/formats/TIMIT/Makefile > config.status: creating src/formats/TreeBank/Makefile > config.status: creating src/formats/XLabel/Makefile > config.status: creating scripts/Makefile > config.status: creating demo/Makefile > config.status: creating doc/Makefile > config.status: creating doc/dtd/Makefile > config.status: executing depfiles commands > > > Configuration summary. > > * agdb: yes > * tcl wrapper: yes > headers: -I/usr/include > big-ball: no > install dir: ${prefix}/lib/ag/tcl > * python wrapper: yes > headers: -I/System/Library/Frameworks/Python.framework/Versions/2.3/include/python2.3 > big-ball: no > install dir: ${prefix}/lib/ag/python > * java wrapper: no > * Xerces-C: no > * zlib: yes > > **************************** [2] Make output (second run) > khofbaue-al:~/Development/corpus/TableTrans/aglib/release201/aglib-2.0.1 khofbaue$ make > Making all in src > Making all in ag > make[2]: Nothing to be done for `all'. > Making all in ag_wrapper > Making all in tcl > /bin/sh ../../../libtool --mode=link g++-3.3 -g -O2 -L../../ag -L../../ag/.libs -o ag.la -rpath /usr/local/lib/ag/tcl -no-undefined -module -version-info 1:0:0 ag.lo -lag -ltcl -lpython > rm -fr .libs/ag.la .libs/ag.* .libs/ag.* > gcc-3.3 -r -keep_private_externs -nostdlib -o .libs/ag.1.0.0.so-master.o ag.lo && gcc-3.3 -bundle -o .libs/ag.1.0.0.so .libs/ag.1.0.0.so-master.o -L/Users/khofbaue/Development/corpus/TableTrans/aglib/release201/aglib-2.0.1/src/ag -L/Users/khofbaue/Development/corpus/TableTrans/aglib/release201/aglib-2.0.1/src/ag/.libs -lag -ltcl -lpython -lc > ld: Undefined symbols: > __ZNSs20_S_empty_rep_storageE > __ZNSs4_Rep10_M_destroyERKSaIcE > __ZNSs4_Rep11_S_max_sizeE > __ZNSs4_Rep11_S_terminalE > __ZNSs6appendEPKcm > __ZNSs6appendERKSs > __ZNSs6assignEPKcm > __ZNSs6assignERKSs > __ZNSs9_M_mutateEmmm > __ZNSsC1EPKcRKSaIcE > __ZNSsC1ERKSs > __ZNSsD1Ev > __ZNSsD4Ev > __ZNSt24__default_alloc_templateILb1ELi0EE10deallocateEPvm > __ZNSt24__default_alloc_templateILb1ELi0EE12_S_force_newE > __ZNSt24__default_alloc_templateILb1ELi0EE12_S_free_listE > __ZNSt24__default_alloc_templateILb1ELi0EE22_S_node_allocator_lockE > __ZNSt24__default_alloc_templateILb1ELi0EE8allocateEm > __ZNSt24__default_alloc_templateILb1ELi0EE9_S_refillEm > __ZNSt8ios_base4InitC1Ev > __ZNSt8ios_base4InitD1Ev > __ZSt17__throw_bad_allocv > __ZSt20__throw_length_errorPKc > __ZSt9terminatev > __ZTVN10__cxxabiv117__class_type_infoE > __ZTVN10__cxxabiv120__si_class_type_infoE > __Znwm > ___cxa_allocate_exception > ___cxa_begin_catch > ___cxa_end_catch > ___cxa_rethrow > ___cxa_throw > ___gxx_personality_v0 > make[3]: *** [ag.la] Error 1 > make[2]: *** [all-recursive] Error 1 > make[1]: *** [all-recursive] Error 1 > make: *** [all-recursive] Error 1 ***************************************** [3] Sudo Make Install output (from cvs source) > khofbaue-al:~/Development/corpus/TableTrans/aglib/aglibcvs/AGLIB khofbaue$ sudo make install > Password: > Making install in src > Making install in . > /bin/sh ../mkinstalldirs /usr/local/lib > /bin/sh ../libtool --mode=install /usr/bin/install -c libag.la /usr/local/lib/libag.la > /usr/bin/install -c .libs/libag.1.0.0.dylib /usr/local/lib/libag.1.0.0.dylib > (cd /usr/local/lib && rm -f libag.1.dylib && ln -s libag.1.0.0.dylib libag.1.dylib) > (cd /usr/local/lib && rm -f libag.dylib && ln -s libag.1.0.0.dylib libag.dylib) > /usr/bin/install -c .libs/libag.lai /usr/local/lib/libag.la > /usr/bin/install -c .libs/libag.a /usr/local/lib/libag.a > ranlib /usr/local/lib/libag.a > chmod 644 /usr/local/lib/libag.a > ---------------------------------------------------------------------- > Libraries have been installed in: > /usr/local/lib > > If you ever happen to want to link against installed libraries > in a given directory, LIBDIR, you must either use libtool, and > specify the full pathname of the library, or use the `-LLIBDIR' > flag during linking and do at least one of the following: > - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable > during execution > > See any operating system documentation about shared libraries for > more information, such as the ld(1) and ld.so(8) manual pages. > ---------------------------------------------------------------------- > make install-data-hook > target_dir=/usr/local/include/aglib; \ > /bin/sh ../mkinstalldirs $target_dir; \ > for s in ag/AGAPI.h ag/AGException.h ag/AGTypes.h ag/AG.h ag/FeatureMap.h ag/Timeline.h ag/AGSet.h ag/Hash.h ag/Utilities.h ag/Anchor.h ag/Identifiers.h ag/db.h ag/Annotation.h ag/Metadata.h ag/AnnotationIndex.h ag/Signal.h ag/Validation.h agf/AIF.h agf/TBEscapeHandler.h agf/TB_UPenn_WSJ_EscapeHandler.h agf/TBhandler.h agf/BU.h agf/TBparser.h agf/BUpos.h agf/TF.h agf/LCF.h agf/TFfile.h agf/LCFfile.h agf/TIMIT.h agf/Paired.h agf/TIMITfile.h agf/RE.h agf/TreeBank.h agf/Record.h agf/XLabel.h agf/SAX_AIFHandlers.h agf/XLabelFile.h agf/SWBfile.h agf/agfio.h agf/SwitchBoard.h agf/agfioError.h agf/agf_wrapper.h agf/Transcriber.h agf/ATLAS.h agf/SAX_AIFH andlers.h agf/agfXercesUtils.h tree_api/agtree.h; do \ > t=$target_dir/`basename $s`; \ > /usr/bin/install -c -m 644 $s $t; \ > done > Making install in ag_wrapper > Making install in tcl > /bin/sh ../../../mkinstalldirs /usr/local/lib/ag_wrapper/tcl > /bin/sh ../../../libtool --mode=install /usr/bin/install -c ag.la /usr/local/lib/ag_wrapper/tcl/ag.la > libtool: install: warning: relinking `ag.la' > cd /Users/khofbaue/Development/corpus/TableTrans/aglib/aglibcvs/AGLIB/src/ag_wrapper/tcl; /bin/sh ../../../libtool --mode=relink g++-3.3 -g -O2 -o ag.la -rpath /usr/local/lib/ag_wrapper/tcl -no-undefined -module -version-info 1:0:0 ag_la-ag.lo -L../.. -L../../.libs -lag -ltcl -lpython > g++-3.3 -dynamiclib -o .libs/ag.1.0.0.so ag_la-ag.lo -L/Users/khofbaue/Development/corpus/TableTrans/aglib/aglibcvs/AGLIB/src -L/Users/khofbaue/Development/corpus/TableTrans/aglib/aglibcvs/AGLIB/src/.libs /usr/local/lib/libag.dylib -ltcl -lpython -lc -install_name /usr/local/lib/ag_wrapper/tcl/ag.1.so -compatibility_version 2 -current_version 2.0 > /usr/bin/install -c .libs/ag.1.0.0.soT /usr/local/lib/ag_wrapper/tcl/ag.1.0.0.so > (cd /usr/local/lib/ag_wrapper/tcl && rm -f ag.1.so && ln -s ag.1.0.0.so ag.1.so) > (cd /usr/local/lib/ag_wrapper/tcl && rm -f ag.so && ln -s ag.1.0.0.so ag.so) > /usr/bin/install -c .libs/ag.lai /usr/local/lib/ag_wrapper/tcl/ag.la > /usr/bin/install -c .libs/ag.a /usr/local/lib/ag_wrapper/tcl/ag.a > ranlib /usr/local/lib/ag_wrapper/tcl/ag.a > chmod 644 /usr/local/lib/ag_wrapper/tcl/ag.a > ---------------------------------------------------------------------- > Libraries have been installed in: > /usr/local/lib/ag_wrapper/tcl > > If you ever happen to want to link against installed libraries > in a given directory, LIBDIR, you must either use libtool, and > specify the full pathname of the library, or use the `-LLIBDIR' > flag during linking and do at least one of the following: > - add LIBDIR to the `DYLD_LIBRARY_PATH' environment variable > during execution > > See any operating system documentation about shared libraries for > more information, such as the ld(1) and ld.so(8) manual pages. > ---------------------------------------------------------------------- > make install-data-hook > /bin/sh -c "LD_LIBRARY_PATH=../../.libs: /usr/bin/tclsh8.4 pkg_mkIndex.tcl" > alloc: invalid block: 0xa08bca0: a 1c 0 > > make[5]: *** [install-data-hook] Abort trap > make[4]: *** [install-data-am] Error 2 > make[3]: *** [install-am] Error 2 > make[2]: *** [install-recursive] Error 1 > make[1]: *** [install-recursive] Error 1 > make: *** [install-recursive] Error 1 ____ This message and any files transmitted with it are legally privileged and intended for the sole use of the individual(s) or entity to whom they are addressed. If you are not the intended recipient, please notify the sender by reply and delete the message and any attachments from your system. Any unauthorised use or disclosure of the content of this message is strictly prohibited and may be unlawful. Nothing in this e-mail message amounts to a contractual or legal commitment on the part of EUROCONTROL, unless it is confirmed by appropriately signed hard copy. Any views expressed in this message are those of the sender. |