[Clam-devel] Please test macosx dmg (only intel)
Volker Schumacher
volker at photone.de
Mon Jan 22 14:13:59 PST 2007
Hi Pau & David,
cool that you are working on the Mac build system!
I didn't find much time during the last weeks to play around with
CLAM, but let me know if I can help anything.
I tried to open the Annotator example and get the following error:
Link (dyld) error:
Library not loaded: /usr/local/Trolltech/Qt-4.2.2/lib/
QtCore.framework/Versions/4/QtCore
Referenced from: /Applications/Annotator.app/Contents/MacOS/Annotator
Reason: image not found
When I list the link paths via
$> otool -L Annotator.app/Contents/MacOS/Annotator
i get the following output:
Annotator.app/Contents/MacOS/Annotator:
/usr/local/Trolltech/Qt-4.2.2/lib/QtCore.framework/Versions/
4/QtCore (compatibility version 4.2.0, current version 4.2.2)
/usr/local/Trolltech/Qt-4.2.2/lib/QtGui.framework/Versions/4/
QtGui (compatibility version 4.2.0, current version 4.2.2)
/usr/local/Trolltech/Qt-4.2.2/lib/QtOpenGL.framework/
Versions/4/QtOpenGL (compatibility version 4.2.0, current version 4.2.2)
/System/Library/Frameworks/AGL.framework/Versions/A/AGL
(compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/
OpenGL (compatibility version 1.0.0, current version 1.0.0)
/usr/local/lib/libclam_core.0.96.1.dylib (compatibility
version 0.0.0, current version 0.0.0)
/usr/local/lib/libclam_audioio.0.96.1.dylib (compatibility
version 0.0.0, current version 0.0.0)
/usr/local/lib/libclam_processing.0.96.1.dylib
(compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0,
current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0,
current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 88.3.4)
It seems like all libraries are not linked to the ones that are
included in the package.
I could fix it by doing the following:
$> cd Annotator.app/Contents/MacOS
$> install_name_tool -change /usr/local/Trolltech/Qt-4.2.2/lib/
QtCore.framework/Versions/4/QtCore @executable_path/../Frameworks/
QtCore Annotator
$> install_name_tool -change /usr/local/Trolltech/Qt-4.2.2/lib/
QtGui.framework/Versions/4/QtGui @executable_path/../Frameworks/QtGui
Annotator
$> install_name_tool -change /usr/local/Trolltech/Qt-4.2.2/lib/
QtOpenGL.framework/Versions/4/QtOpenGL @executable_path/../Frameworks/
QtOpenGL Annotator
$> install_name_tool -change /usr/local/lib/libclam_core.0.96.1.dylib
@executable_path/../Frameworks/libclam_core.0.96.1.dylib Annotator
$> install_name_tool -change /usr/local/lib/libclam_audioio.
0.96.1.dylib @executable_path/../Frameworks/libclam_audioio.
0.96.1.dylib Annotator
$> install_name_tool -change /usr/local/lib/libclam_processing.
0.96.1.dylib @executable_path/../Frameworks/libclam_processing.
0.96.1.dylib Annotator
The Annotator application started successfully after doing this.
Many Greetings!
Volker
On Jan 22, 2007, at 9:00 PM, Pau Arumi wrote:
> At last a productive development day!
> http://clam.iua.upf.edu/download/mac/cvssnapshots/
> CLAM_Annotator-0.3.6-CVS-20070122.dmg
>
> Please, test and report results. It should work without any
> additional library. Only intel arch.
> Annotator should run but not work correctly since it lacks
> extractors and example data
>
> David and me have been working on a script (attached) that copies
> external libraries into the bundle and fixes all links outside the
> bundle.
> Specifically, it uses otool to retrieve all dependent dynamic
> libraries and install_name_tool to fix ids and links.
> The script gets recursively all libraries that depend on a given
> binary.
>
>
> Pau & David
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> #! /opt/local/bin/python
>
> import os
>
> def run(command) :
> print "\033[32m:: ", command, "\033[0m"
> return os.system(command)
> for line in os.popen(command) :
> print line,
> sys.stdout.flush()
> def norun(command) :
> print "\033[31mXX ", command, "\033[0m"
> def phase(desc) :
> print "\033[33m== ", desc, "\033[0m"
>
>
> def libDependencies(binary, visited) :
> libs = []
> print "examining", binary
> for line in os.popen("otool -L "+binary).readlines()[1:] :
> entry = line.split()[0]
> if entry in visited :
> continue
> if entry.startswith("/System/") : continue
> if entry.startswith("/usr/lib/") : continue
> visited.append(entry)
> visited = libDependencies( entry, visited )
> return visited
>
> libsPath = libDependencies("Annotator", [] )
> print libsPath
>
>
> libs = [ (os.path.basename(path), path) for path in libsPath ]
>
> run("mkdir -p Annotator.app/Contents/Frameworks/")
>
> vars = {}
> for lib, path in libs :
> vars['toChange']=lib
> vars['path']=path
> run("cp %(path)s Annotator.app/Contents/Frameworks/%(toChange)s" %
> vars )
> run("install_name_tool -id @executable_path/../Frameworks/%
> (toChange)s Annotator.app/Contents/Frameworks/%(toChange)s" % vars)
>
> for lib, path in libs :
> vars['toChange']=lib
> vars['path']=path
> run("install_name_tool -change %(path)s @executable_path/../
> Frameworks/%(toChange)s Annotator.app/Contents/MacOS/Annotator" %
> vars )
> for changedLib, changedPath in libs :
> vars['changed']=changedLib
> vars['changedPath']=changedPath
> run("install_name_tool -change %(changedPath)s
> @executable_path/../Frameworks/%(changed)s Annotator.app/Contents/
> Frameworks/%(toChange)s" % vars )
>
> _______________________________________________
> Clam-devel mailing list
> Clam-devel at llistes.projectes.lafarga.org
> https://llistes.projectes.lafarga.org/cgi-bin/mailman/listinfo/clam-
> devel
More information about the clam-devel
mailing list