Hello,
I tried to use the nmtools on Mac OS 10.4.11, but unfortunately I can't manage to run the software.
I tried to follow the instructions of the detailed tutorial. First I had the problem that I couldn't use the "make" command within the console, because I had to install the Mac OS Developer Tools first.

Now it seems to me that the installation was successful, but I don't get the desired feedback when typing in e.g. "nms". I get the error message "bash: nms: command not found".

If I check the directory (ls /usr/local/bin) I get a list with "nm2half, nm2pow2, nms, nmstiles, nmtiles...", which should be right.

well, I don't have a MAC, but we are talking about UNIX aren't we? So...you correctly placed your nmtools into a directory that should be in your bash shell's execution path. Check by typing into the console:

> echo $PATH
and see whether the result contains /usr/local/bin?
Good if it does...

Next, a program needs to have the execution flag set, in order to be recognized as an executable!!

How does one check the execution flag of a program? Remember?
Type at the console prompt

> ls -l /usr/local/bin/nms

The resulting output should roughly look like so, with only the beginning of the line being of interest:

-rwxr-xr-x 1 root root 18257 Jan 20 01:05 /usr/local/bin/nms

At the beginning of the line you see the relevant flags: r=read, w=write and x=execute. There are 3 flag groups, separated by a '-' . The first one refers to the user who owns the file = the owner, the second to the users in the same group as the file owner and the third to all other users. So you must check whether each group of flags includes an x in your case!! Otherwise nms is not found by your bash shell.

Suppose some of these x'es are missing in your case. What to do next?
Just set the execution flags yourself!

> chmod a+x /usr/local/bin/nms

Check it by calling again

> ls -l /usr/local/bin/nms

At this point it might be worthwhile to try once more

> nms

What happens?

If you get a help output, you are in busines and then the other tools must be treated analogously.
This you can do much easier by a chdir to /usr/local/bin

> cd /usr/local/bin
and a single subsequent command

> chmod a+x nm*

Let me know....
Good luck,
Fridger

PS: Perhaps some of my local MAC friends can comment about some MAC specific issues?

PPS: For you as an 'end user' of the nmtools there was NO need whatsoever to use 'make' since I have added already the compiled executables for the MAC to the nmtools distribution. Also, are you sure that you used the nmtool executables for the right operating system (MAC) ? You simply need to copy the ones from the distribution's subdirectory 'OSX_universal_MAC.bin' into the execution directory /usr/local/bin.

OK, I tried your first test step: "echo $PATH": my result is different of your description:I get: /bin:/sbin:/usr/bin:/usr/sbin

If I try: "ls -l /usr/local/bin/nms" I get the following result:-rwxr-xr-x 1 root staff 933996 Jun 23 18:23 /usr/local/bin/nms

so the execute rights should be right, but there is a difference (staff instead of root). I don't know what that means...

Frank

Frank,

so we got the reason for your problem: The standard UNIX execution directory /usr/local/bin for local executables is not part of your PATH variable (whatever the reasons). Then any executable program in that /usr/local/bin directory cannot be found by your bash shell. This includes of course, 'nms' and all the other nmtools...The PATH content for 'root' and 'users' is indeed different, usually. How about typing into the console the command

> whoami

Are you 'root' at that point?

Anyway, all you got to do is to add /usr/local/bin to PATH.

You might first do it temporaily, in order to try things out: type in your console

> export PATH=$PATH:/usr/local/bin
check what you did, by calling again

> echo $SHELL
Now /usr/local/bin should be part of PATH.

Try again to call

> nms

Now you should get the help text. Right?

To make the above 'export PATH=...' statement permanent you can just add it with an editor to the .bashrc profile in your HOME directory. You find the latter by typing 'cd'.

Yeah, now I was succesful to run the nmtools. Great feeling!
Fridger, thank you so much for your very helpful messages.

The error message above came from the installation try of version 1.5pre1, I think. At the beginning of all installation process I tried to install both the version 1.0.1 and 1.5pre1. I didn't realized that there are same script names (e.g. nms). So it seems to me that there was some confusion between the new and the old files.

Now, after doing a crash course in UNIX (I never did anything within the UNIX console before), I deleted all the nmtools files and tried to install the version 1.0.1 from scratch. Now it runs. That's great!
Now I have to try the next steps...

Only one more hint: Please install version 1.5pre1 of the nmtools!!! This version gives identical results to 1.01, BUT is about a factor of TWO faster. Also there is nicer info output about what's going on...

now I realized, why I had the error message. After trying to install the version 1.5pre1 using the â€™make -f Makefile.osx installâ€˜ command, it seems to me that the file 'libpng.dylib' wasn't installed. So I simply copied that file into /usr/local/bin. Now if I type 'nms' the normal help text is on the screen. So lets go further with double speed

Hmmm, if I am 'root' the script runs well, but if I am normal user the file 'libpng.dylib' will not found.
Fridger, do you know, where the file ''libpng.dylib' has to be placed?
I tried /usr/local/bin and /usr/lib: both paths seems wrong to me.

If you used the command 'make -f Makefile.osx' in the subdir 'src' of the nmtools distribution, then libpng.dylib and all the tools should have been installed correctly. I don't know of course what you did instead. Since apparently your UNIX know-how is "limited" there might be some mistakes on the way...

If 'make' doesn't work for you (since you installed it incorrectly), you might simply copy libpng.dylib to
/usr/local/lib, I suppose. But to make sure that it is found you should check first

> echo $LIBPATH

which should contain /usr/local/lib. If not you may add it like in case of $PATH. If that directory does not exist, you must create it with

Now I used 'root' to create the normal maps. Worked very well. Amazing speed, indeed. Great tool.

If I'm using my user account I couldn't start the scripts 'nms' and 'nmtiles'. I created a directory /usr/local/lib and copied the 'libpng.dylib' file into that directory. I did the export LIBPATH routine and the echo $LIBPATH command showed the right path (:/usr/local/lib). But the error message 'dyld: Library not loaded: @executable_path/libpng.dylib' still occured. So I used the 'root'-account to get to a result...

Who is online

Users browsing this forum: No registered users and 1 guest

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum