Nokia Networks Home

Nokia nmake Product Builder

Quick Links

Related Products

What is probe?

The nmake distribution includes a tool called probe. Probe makes determinations about the compiler and the environment to tune nmake to the specific environment.

Why is probe used?

nmake is used on many UNIX® platforms and with compilers from different vendors. Different platforms have different standards, and compiler vendors often implement features differently in their software. It is necessary to probe the environment so nmake knows specifically how to act in this environment, what arguments the compiler accepts, what capabilities the compiler has, etc. Probing the environment allows nmake to tune itself dynamically to different compilers, compiler modes, and UNIX implementations.

What exactly does probe do?

Probe runs a series of tests to learn the specifics of the platform and the compiler. The results of the tests are stored in "probe files". The tests are run once, the first time a compiler is used. After that nmake uses the probe files rather than running the tests again.

What are the probe files?

The probe files are stored in <nmake_root>/lib/probe/C/[make|pp]/ and have odd looking filenames such as 182DF9485bincc and 734E74F7.0.3CC. These filenames are hashed values determined by factors such as the following:

  1. The full path to the compiler (so each compiler will have a different probe filename.)
  2. The compiler mode as specified in $(CC). (Different arguments present in $(CC) will cause different probe files. You may want to include arguments, for instance, to force a compiler capable of compiling both C and C++ code to probe in C mode.)
  3. The compiler universe as determined by the below criteria. The universe is represented in the CC.UNIVERSE variable in the make probe file.
    • If /usr/5bin is in the PATH before /bin and /usr/bin then CC.UNIVERSE=att, otherwise CC.UNIVERSE=ucb.
  4. The operating system version (nmake 10 and later.)
  5. The environment variable VERSION_ENVIRONMENT may contain a colon separated list of environment variables for probe to consider when generating the configuration filename hash.

nmake keeps different probe files based on the above attributes. This insures different compilers (determined by the path to the compiler) will have different probe files, and different modes of the same compiler will also have different probe files. If you upgrade a compiler in place (ie. a new compiler has the same path as the old one and none of the above attributes change) the compiler will not be re-probed. However, if the compiler is placed in a new path then it will be probed the first time it is used.

There are usually two probe files per compiler. The make probe file contains nmake information, the pp probe file contains cpp information. If the native cpp supports viewpathing then no pp probe file will be created because the native cpp will be used instead of nmake cpp (see the cpp FAQ for details.)

You can find the make probe file for a given compiler by running the command below. To list a probe file replace -k with -l. For the pp probe file replace make with pp.

    probe -k C make /full/path/to/cc


Cross compilers are a special case. Libraries and headers for cross compilers are generally not stored in the standard directories, such as /usr/lib and /usr/include, and cross compiler tools such as ld and nm often have custom names which nmake does not know about. Given these customizations, the probe files for cross compilers may need to be hand modified after they are generated to accomidate such differences. If you need to modify the probe file then change the mode to 644 and edit the file. And remember, when new compilers are installed, or new versions of nmake are installed, these hand modifications will have to be carried over manually. A better option to hand modifications is the use of probe_hints described below.

Probe Hints

Release lu3.4 introduced the probe_hints feature which allows the administrator to define overrides for probe values. The overrides happen automatically whenever a compiler is probed, so once the probe_hints are installed new probe files need not be hand modified. For details see probe_hints in the lu3.4 release notes and Appendix A in the nmake User's Guide.


The probe binary executable is a wrapper to launch shell scripts that do the actual probing. The executable is <nmake_root>/lib/probe/probe and must have set uid permissions so it can create the probe files. The permissions must be set to 4755 and look like -rwsr-xr-x.

The probe shell scripts target ksh and bash compatibility. The scripts are installed at <nmake_root>/lib/probe/C/make/probe and <nmake_root>/lib/probe/C/pp/probe.

Common probe errors

Not a C compiler: failed to compile ...
The most common causes of this error are:
  1. The compiler is not licensed and thus fails to compile anything. You need to license the compiler or set the CC variable to another valid compiler.
  2. The compiler does not support the -c argument. In this case you can write a shell script wrapper around the compiler which will strip off the -c and run the compiler as necessary.
  3. The compiler does not output a .o file with the -c argument. Hopefully the compiler will have an option to output a .o file. If so include the option in the CC variable setting. For example, CC = cc -doto.
  4. The compiler works fine but returns a non-zero exit code. In this case you can write a shell wrapper around the compiler which will exit with 0 when successful. Be careful not to always exit with 0 because nmake will not be able to tell when the compile really fails.
probe shell for C language processor ... obsolete ...
This message comes up if the time stamp on the probe command is newer than the time stamp of the make or pp probe shell script. This might happen if the nmake installation is copied to another directory and the time stamps get changed. The warning message can be eliminated by touching the probe scripts to update their time stamps. For example:
touch <nmake_root>/lib/probe/C/make/probe
touch <nmake_root>/lib/probe/C/pp/probe
...: Cannot Write [Permission denied]
The <nmake_root>/lib/probe/probe executable must be set uid, thus the permissions must be set to 4755 and look like -rwsr-xr-x. All the directories and files under <nmake_root>/lib/probe/ must be owned by the same owner of the <nmake_root>/lib/probe/probe command, and must be writable by the owner. If the permissions are not set correctly then the probe command will not be able to write new probe files. If the nmake directory is NFS mounted to client machines then it must not be mounted as read-only.
No probe files being written, but no error messages
It appears that some systems don't report the write error back to nmake when the file system is full. Make sure your filesystem has free space. If it is an NFS mounted filesystem check the space from the host machine as some clients may not report the proper information.

Changes Since nmake 3.0

The following variables are no longer defined in the make probe file as of nmake 3.0.2:

The following variables have been added to the make probe file since nmake release 3.0.1:

The following variables have been added to the make probe file since nmake release lu3.4:

More Information

For more information on probe refer to the probe(1) man page and Appendix A of the nmake User's Guide.

Last Update: Friday,12-Aug-2016 10:48:08 EDT