[xml] Compiling libxslt.a on OSX 10.3.6



Hello List,
I am using libxslt in our plugin bundle. I am using Mac OS X 10.3.6 to compile and develop it. When this bundle is used on 10.2 I get following error,

FileMaker[404] CFLog (21): Error loading /usr/lib/libiconv.2.dylib: error code 0, error number 2 (dyld: /Applications/FileMaker Developer 7/FileMaker Developer.app/Contents/MacOS/FileMaker can't open library: /usr/lib/libiconv.2.dylib (No such file or directory, errno = 2)

As you have pointed out on you download site, 10.2 doesn't have iconv. So I got libiconv compiled it using xcode to get static library [libiconv.a] and then compiled libxml, libxslt and libexslt to get respective static libraries. I then compiled our bundle with these libraries. But still the problem persists.

When I use nm on this libxml.a I get following output,

build ushah> nm -mg libxml.a | grep iconv
         (undefined [lazy bound]) external _libiconv
         (undefined [lazy bound]) external _libiconv_close
         (undefined [lazy bound]) external _libiconv_open

I have compiled iconv as static library. It is included with -liconv option while linking libxml. Then in plugin I have libxml and libiconv as static libraries. But still when I use nm and otool on plugin binary,

MacOS ushah> nm -mg WaAnAnalyzer | grep iconv (undefined [lazy bound]) external _libiconv (from libiconv) (undefined [lazy bound]) external _libiconv_close (from libiconv) (undefined [lazy bound]) external _libiconv_open (from libiconv)

MacOS ushah> otool -L WaAnAnalyzer
WaAnAnalyzer:
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 128.0.0) @executable_path/../Frameworks/FMWrapper.framework/Versions/A/FMWrapper (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current version 5.0.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 71.1.1)

MacOS ushah> otool -L WaAnAnalyzer WaAnAnalyzer: /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 128.0.0) @executable_path/../Frameworks/FMWrapper.framework/Versions/A/FMWrapper (compatibility version 0.0.0, current version 0.0.0) /usr/lib/libiconv.2.dylib (compatibility version 5.0.0, current version 5.0.0) /usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 71.1.1)


some how compiler adds libiconv.2.dylib as dynamic dependency. Here is the LD command that I get in XCode, /usr/bin/g++-3.3 -o /Users/ushah/Desktop/WaAnAnalyzer/XCode/build/WaAnAnalyzer.fmplugin/ Contents/MacOS/WaAnAnalyzer -L/Users/ushah/Desktop/WaAnAnalyzer/XCode/build -F/Users/ushah/Desktop/WaAnAnalyzer/XCode/build -F/Users/ushah/Desktop/WaAnAnalyzer/XCode/MacLib/ -filelist /Users/ushah/Desktop/WaAnAnalyzer/XCode/build/WaAnAnalyzer.build/ WaAnAnalyzer.build/Objects-normal/WaAnAnalyzer.LinkFileList -framework Carbon -framework FMWrapper -lxml -lexslt -lxslt -liconv -arch ppc -bundle -lz

If you will observe I have included -liconv but it doesn't seem to respect that. I get the same results with 3.3 or 3.1 compiler. Let me know as to how I can avoid this dependency on libiconv.2.dylib. Thanks in advance for your help.

- Utkarsh




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]