Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

force recompile when linked shared library changes #43

Closed
y opened this issue Jun 18, 2015 · 2 comments
Closed

force recompile when linked shared library changes #43

y opened this issue Jun 18, 2015 · 2 comments

Comments

@y
Copy link

y commented Jun 18, 2015

When I upgraded my version of opencv from 2.4 to 3.0, my script failed with the following:

$ myprog.pl
Had problems bootstrapping Inline module 'MyMod::OpenCV_e076'

Can't load '/private/tmp/lib/auto/MyMod/OpenCV_e076/OpenCV_e076.bundle' for module MyMod::OpenCV_e076: dlopen(/private/tmp/lib/auto/MyMod/OpenCV_e076/OpenCV_e076.bundle, 1): Library not loaded: /opt/local/lib/libopencv_core.2.4.dylib
  Referenced from: /private/tmp/lib/auto/MyMod/OpenCV_e076/OpenCV_e076.bundle
  Reason: image not found at /home/perlbrew/perls/perl-5.22/lib/5.22.0/darwin-2level/DynaLoader.pm line 197.
 at /home/perlbrew/perls/perl-5.22/lib/site_perl/5.22.0/Inline.pm line 533.

 at /Users/y/perl5/lib/MyMod/OpenCV.pm line 25.
BEGIN failed--compilation aborted at /Users/y/perl5/lib/MyMod/OpenCV.pm line 25.
Compilation failed in require at /home/perlbrew/perls/perl-5.22/lib/site_perl/5.22.0/Module/Runtime.pm line 317.

I'm specifying the library like so: use Inline C => Config => LIBS => '-lopencv_core', so I was hoping that the symlink change for libopencv_core.dylib to libopencv_core.3.0.dylib instead of libopencv_core.2.4.dylib would trigger a recompile. Is it possibly for Inline::C to detect these types of changes and recompile instead of causing a failure and forcing a manual recompile?

@mohawk2
Copy link
Collaborator

mohawk2 commented Jun 18, 2015

All things are theoretically possible. Many are not remotely practicable. That's even a major version-number change, which is why the symlink points at a different thing. This is deeply unlikely to ever be a feature of Inline::C.

@mohawk2 mohawk2 closed this as completed Jun 18, 2015
@wbraswell
Copy link
Contributor

@y
You can probably figure out a way to build this functionality yourself, either in your application side or in a branch of Inline::C.

Start by looking at Module::Refresh, this has recently allowed me to more properly force-recompile RPerl, which is based on Inline.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants