View Issue Details

IDProjectCategoryView StatusLast Update
0002562libextractorportabilitypublic2012-10-06 15:29
Reporterronaldtse Assigned ToChristian Grothoff  
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 15:26

manager   ~0006403

Fixed in SVN 24203.

Issue History

Date Modified Username Field Change
2012-09-27 11:12 ronaldtse New Issue
2012-09-27 20:12 Christian Grothoff Assigned To => Christian Grothoff
2012-09-27 20:12 Christian Grothoff Status new => assigned
2012-10-06 15:26 Christian Grothoff Note Added: 0006403
2012-10-06 15:26 Christian Grothoff Status assigned => resolved
2012-10-06 15:26 Christian Grothoff Resolution open => fixed
2012-10-06 15:27 Christian Grothoff Target Version => 1.0.1
2012-10-06 15:29 Christian Grothoff Status resolved => closed
2012-10-06 15:29 Christian Grothoff Fixed in Version => 1.0.1