dsw / oink-stack

Oink is a collaboration of C++ static analysis tools.
http://danielwilkerson.com/oink/index.html
154 stars 34 forks source link

configure issue on build (with workaround) #22

Open ns-bak opened 6 years ago

ns-bak commented 6 years ago

When running the ./configure script at the top level, the script died when it went into the smbase directory with the following error:

Can't locate sm_config.pm in @INC (you may need to install the sm_config module) (@INC contains: /usr/lib/perl5/site_perl/5.26.1/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.26.1 /usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.26.1 /usr/lib/perl5/5.26.1/x86_64-linux-thread-multi /usr/lib/perl5/5.26.1 /usr/lib/perl5/site_perl) at ./configure.pl line 6.
configure failed at ./configure.pl line 128.

For some reason, the smbase/configure.pl:6 require sm_config; line was not able to find the sm_config.pm file in the current directory. My guess is I need to update some config setting to make the @INC path see the local directory? (I freely admit that I don't know what I am doing).

I was able to get the entire configure script to work by changing the line in smbase/configure.pl:6 to do "./sm_config.pm";, but that may be undesired. I've never worked with perl before, so I am not sure if the do statement is bad practice or not.

noabody commented 6 years ago

https://github.com/WeiDUorg/elkhound/commit/d422a2624bcbd1aa35116960e1f01fc10b77f168 edit smbase/configure.pl: add use lib '.'

diff --git a/smbase/configure.pl b/smbase/configure.pl
index 06b9678..7173f92 100755
--- a/smbase/configure.pl
+++ b/smbase/configure.pl
@@ -2,6 +2,7 @@
 # configure script for smbase

 use strict 'subs';
+use lib '.';

 require sm_config;