LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Suse 9.1 and splint ... (https://www.linuxquestions.org/questions/linux-newbie-8/suse-9-1-and-splint-192477/)

MattG1981 06-11-2004 05:24 PM

Suse 9.1 and splint ...
 
Suse 9.1 didnt come with splint and I am brand new to Linux ....

I have downloaded splint 3.1.1 but I have no idea what I am doing, it says something about the standard library not found. Can someone please help me set this up.

The computers at school have it so I can just type "splint source.c" and then it runs ... is there any way I can set it up to do this on my computer as well?

Dark_Helmet 06-11-2004 06:21 PM

What format did you download it as? A source tarball (.tgz, .tar.gz, .tar.bz2)? RPMs? Some other format?

What have you don so far to try and install it? What errors have you received?

Need details :)

MattG1981 06-11-2004 06:55 PM

it was a tarball that just extracted out to a bunch of directories and files ...

Ok .. that is odd ... I just ran it and it worked fine, but it still says this before anything else:

Cannot find standard library: standard.lcd
Check LARCH_PATH environment variable.

I dont know what standard.lcd is .....

and also, I dont want to have to type in /home/mgimbl/splint/splint-3.1.1/bin/splint everytime to splint my file .. how can I make it so I just type 'splint source.c'

Dark_Helmet 06-11-2004 07:18 PM

Ok, I just downloaded the source to look at it. It follows the same pattern that 99% of from-souce packages follow.

1. Untar the file
2. cd to the created dir (in this case splint-3.1.1)
3. Type: ./configure
4. Type: make
5. Type: make install

Obviously, don't proceed to the next step if there was an error reported in any of the phases. If an error was encountered, post it. Once you make it to the "make install" phase and it completes successfully, then you'll be able to use it like any other command (e.g. "splint source_code.c").

I didn't see anything in the documentation that referred to environment variables of any sort or dependencies. So, my suggestion would be to remove the directory you have now, repeat the process of untar'ing the file, and execute the commands above. Like I said, if you run into any problems, stop, and post them here. We'll get you going in no time.

Dark_Helmet 06-11-2004 07:26 PM

As I was typing, I was compiling it in the background. During compilation, it runs a test suite to verify the compile. The header printed at the beginning of the tests mentioned that LARCH_PATH is not set. It then provided a listing of what the default value for it would be. This default value is simply a collection of directories that it will search in order. This is not an error per se, but if after running "make install" you keep getting the message, then you might consider setting the variable to get rid of the message. It's a simple matter to fix. And, btw, standard.lcd is a file created when you compile the package (I found it in splint-3.1.1/lib). More than likely, when you run make install, it (an other libraries) will be copied to the proper place. That's why I suggest waiting until after running make install to see if the LARCH_PATH message disappears.

MattG1981 06-11-2004 07:27 PM

I took your advice and tried it that way ... the configure worked, but when I did make, I got this error:

WARNING: `aclocal-1.6' is needed, and you do not seem to have it handy on your
system. You might have modified some files without having the
proper tools for further handling them. Check the `README' file,
it often tells you about the needed prerequirements for installing
this package. You may also peek at any GNU archive site, in case
some other package would contain this missing `aclocal-1.6' program.

I googled for this aclocal program or whatever, but I cant find anything about it ..


edit: also .. the readme doesnt mention anything about it

Dark_Helmet 06-11-2004 07:35 PM

Welcome to the wonderful world of dependencies. Although, I'm not quite sure why the configure script would have missed it if it needed it. However, the download of the splint code does say this:
Quote:

If you need to rebuild any of the makefiles, you will also need:

* automake-1.6, available from http://ftp.gnu.org/gnu/automake/
aclocal is a part of the GNU automake package. So what you'll need to do is download and install automake. Now, depending on what distribution you have, you might have an easier way. If you have a package manager installed (like Red Hat does), you can check to see if you can automate the install. It would probably be filed under "development" packages. If you can't find it, you can always download and install using the link the splint webpage mentioned.

<edit>
You can get automake-1.8.5 from that link if you choose to download-and-install. There's no reason to install an older older copy if there's a newer one available
</edit>

MattG1981 06-11-2004 08:16 PM

hmmm ... I just downloaded the 1.8.5 ... logged onto root ... ran ./configure, make, make install and I didnt get any errors during any of that process (for automake) ... then I went to install splint again and it still says I am missing aclocal 1.6

I am going to reboot now ... maybe they need to be restarted?? .. I have no clue.

any suggestions?

MattG1981 06-11-2004 08:24 PM

nope .. nothing .. still says I am missing that file

Dark_Helmet 06-11-2004 08:24 PM

I would kill the source tree for splint again (it's paranoia on my part, but whenever I get compile errors, I like to start from a clean slate), and run through the steps again. Also, double-check to make sure aclocal is intalled. If you have "which" installed on your system, just type: which aclocal

On my system, the output of which is:
/usr/bin/aclocal

As long as you get some output, then you're probably ok (it'll probably be in one of these: /bin, /usr/bin, or /usr/local/bin).

There's no need to reboot. aclocal is a program like any other; not a system daemon or anything.

MattG1981 06-11-2004 08:51 PM

linux:~ # which aclocal
/usr/local/bin/aclocal

downloaded a fresh copy ... went to my /root/splint3.1.1/ directory, ./configure, make ... and I get the same error :( ...

maybe I should create a copy of aclocal and place it in the directory that you have yours in?


p.s. - It is in also in the same directory as yours ...

linux:~ # whereis aclocal
aclocal: /usr/bin/aclocal /usr/local/bin/aclocal /usr/share/aclocal /usr/share/man/man1/aclocal.1.gz


- edit
I am going to try downloading just the 1.6 version instead of 1.8.5 .. maybe they changed a few lines of code or maybe splint is looking for a file called aclocal1.6 or something like that

MattG1981 06-11-2004 09:03 PM

HAHA! .. finally ....

That was the problem .. it must have been looking for a file called xxx1.6 or soemtihng, but I donwloaded the 1.6 and splint installed fine.

Works great .. just typing in splint source.c

Thank you sooo much for all the help Dark, couldnt have done it without you

MattG1981 06-11-2004 09:05 PM

btw ... do I have to keep these automake folders in my root directory or have they been installed where they need to be and it will be safe to delete them?

Dark_Helmet 06-11-2004 09:06 PM

Hmmmm... that's really very odd. If which can see it, then it's in your path. If it's in your path, then the make instructions should be able to see it.

I checked the aclocal on my system by typing: aclocal --version

The output:
aclocal (GNU automake) 1.6.3
..(plus some other irrelevant stuff)...

So, I have a 1.6.X version. It would be extremely bad form if splint requires exactly a 1.6.X version. Stranger (and stupider) things have happened though. Before you install the 1.6 version, go back to your source tree for 1.8.5 and issue this command: make uninstall

That ought to clean things up some.

The original message was just a warning. I don't know if it could safely be ignored, but seeing as how the splint site specifically mentions it, I would guess it shouldn't be. I'll keep my fingers crossed... just in case.

Dark_Helmet 06-11-2004 09:07 PM

Hehehe... got it working while I was typing... congrats! :)

Once the software is installed, you're free to delete the source trees. There's no more use for them at this point (unless you plan to do some code hacking).


All times are GMT -5. The time now is 04:30 PM.