View Issue Details

IDProjectCategoryView StatusLast Update
0002562libextractorportabilitypublic2012-10-06 13:29
Reporterronaldtse Assigned ToChristian Grothoff Due Date
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformDarwinOSOSXOS Version10.8
Product Version1.0.0 
Target Version1.0.1Fixed in Version1.0.1 
Summary0002562: 'extract' command fails due to default plugin path in Darwin
DescriptionCompiling from tarball, after 'make install', the 'extract' command always returns empty results because plugins are not found. This problem did not exist in 0.6.3.

The reason is due to the following Darwin specific code found in extractor_plugpath.c. Suppose I do a 'make install' to a typical prefix of '/usr/local'. The executable 'extract' will be installed at '/usr/local/bin'. In this case, the get_path_from_NSGetExecutablePath function returns '/usr/local/bin/libextractor' instead of '/usr/local/lib/libextractor', so it is unable to find any plugins.

In addition, on Darwin, the '_NSGetExecutablePath' call may return a symbolic link, so if you configured the prefix to something like '/usr/local/X/' and symlink '/usr/local/X/bin/extract' to '/usr/local/bin/extract', the path from 'get_path_from_NSGetExecutablePath' will return the symbolic path '/usr/local/bin/libextractor', which is most probably wrong. A 'realpath' call can resolve this path to the real path.

#if DARWIN
  if (NULL == prefix)
    prefix = get_path_from_NSGetExecutablePath ();
  if (NULL == prefix)
    prefix = get_path_from_dyld_image ();
#endif
Steps To Reproduce./configure --prefix=/usr/local
make && make install
extract -V src/plugins/testdata/png_image.png
=> No results
TagsNo tags attached.

Activities

Christian Grothoff

2012-10-06 13:26

manager   ~0006403

Fixed in SVN 24203.

Issue History

Date ModifiedUsernameFieldChange
2012-09-27 09:12ronaldtseNew Issue
2012-09-27 18:12Christian GrothoffAssigned To => Christian Grothoff
2012-09-27 18:12Christian GrothoffStatusnew => assigned
2012-10-06 13:26Christian GrothoffNote Added: 0006403
2012-10-06 13:26Christian GrothoffStatusassigned => resolved
2012-10-06 13:26Christian GrothoffResolutionopen => fixed
2012-10-06 13:27Christian GrothoffTarget Version => 1.0.1
2012-10-06 13:29Christian GrothoffStatusresolved => closed
2012-10-06 13:29Christian GrothoffFixed in Version => 1.0.1