Various Platform Notes
Miscellaneous OS idiosyncrasies that affect Perforce
SUMMARY
Miscellaneous OS idiosyncrasies that affect Perforce
DETAILS
These notes provide additional information about using Perforce on the following platforms. You can find all past and present versions of the Perforce clients and server on our ftp site. For general product information, see the Perforce home page.
Perforce and Changes to Daylight Saving Time in 2007
Perforce relies on your computer's operating system to obtain the proper date and time, so there is nothing within Perforce to be fixed or adjusted. If your computer has been updated for Daylight Saving Time changes, Perforce will automatically reflect the proper date and time. Please contact your operating system vendor for any relevant operating system patches.
Windows users, please see the Windows section of this page, below.
UNIX
Last update: August 12, 2004
To maximize performance, configure the server root ($P4ROOT) to reside on a local disk and not an NFS-mounted volume. The Perforce Server's file-locking semantics work with NFS mounts on Solaris 2.5.1 and later, but are incompatible with BSD and Linux variants. Perforce client workspaces can reside on NFS mounts without problems.
Microsoft Windows
2007 Daylight Saving Time changes
After installation of Microsoft's patch for the 2007 Daylight Saving Time (DST) changes, all date/time queries use the 2007 method of calculating DST. Historical data from years prior to 2007 that refer to the approximately four weeks per year that are now part of DST will now be changed by one hour.
This causes problems for files that match the following conditions:
- Created or modified during the affected weeks in years prior to 2007
- Use the +k filetype modifier
- Use the
$Date$or$DateTime$RCS keywords
p4 verify will report
BAD! errors, because the MD5 checksum values have changed for
these file revisions. The checksums change because the dates and times
returned by Windows after application of the patch differ from those returned
prior to the application of the patch.
To fix this, run p4 verify -q against your depot to identify
BAD! file revisions. Then, check the contents of these revisions and
run the p4 verify -v command against only the revisions affected
by this problem. This will tell Perforce to recalculate the MD5 checksum
values for them. It is possible that some files reported as BAD!
by p4 verify -q are reported for other reasons. If you are
unsure of why errors are reported for some files, Contact Perforce Technical Support
for assistance.
There is no DST patch for Windows Vista. It does not suffer from this problem.
Installation
To install Perforce on Windows computers, use our Windows installer, which correctly manages changes in the environment and can install the server as a Windows service.
Windows version limitations
The Windows 32-bit platform (including Windows 2000 and 32 bit versions of Windows 2003, XP, and Vista) has a 2GB per-process memory utilization limit. On Windows, the Perforce Server runs as a single process, servicing each client request as a thread within that process. For sites with a very large transaction volume, this 2GB limitation can inhibit performance and large operations. The Windows 64-bit platform does not have this memory limitation. The use of a 64-bit version of Windows is preferable for sites that might encounter the 2GB per process limitation of the 32-bit version.
The Perforce Server is not supported on Windows 95 or Windows 98, because these operating systems do not support sufficient file locking.
Windows Vista, by default, will not allow a user to write directly write to 'Program Files'. This write protection can cause problems when a user is restoring a Perforce Server from checkpoint and their P4ROOT is under 'Program Files'. The restoration will not fail, instead the write is silently redirected to the user's virtual store. The problem can be resolved by moving the P4ROOt directory out of 'Program Files', or having an administrator change the permissions on the 'Program Files\Perforce\' directory to allow other users 'write' and 'modify' access.
System limitations
The following Windows limitations affect all Windows programs, including Perforce.
- Unlike UNIX, there is no atomic renaming of files on Windows. Renaming is a two-step process, wherein a file is deleted and then a new file is put in its place. As a result, a file might not exist when being replaced in the archive or synced to a client.
- Windows does not allow deletion of a file that is locked for read. This limitation can cause problems when syncing or submitting files. This problem is indicated by messages like "Cannot unlink file" or "File in use by another process."
In all cases, however, Perforce returns appropriate error messages, and problems can be corrected by re-trying the operation. The errors are not fatal and do not corrupt the Perforce metadata.
Filesystem limitations
Under Windows, Perforce clients and servers are subject to the maximum path length limitations inherent in the underlying version of Windows being used. Maximum path lengths range between 254 and 260 characters. Attempts to use paths longer than the limit will result in errors. Any requested operation using paths >260 will not complete successfully and will often generate a warning of the form:
The system can not find the path specified.This path length limitation is based on the MAX_PATH parameter in the Win32API which is�defined as 260 characters. This limitation is documented by Microsoft here:
Some examples of errors you may encounter include these:
- Using the Perforce Proxy server on Windows
WARNING: Proxy could not update its cache.
File is\LongFileName.c
The system cannot find the path specified
- Using P4Win:
Open for write:\ .tmp
The system can not find the path specified
There are ways to avoid this issue by making file paths shorter. They include the following:
- Locate your root directory, such as P4ROOT or P4PROOT, towards the top of your Windows directory hierarchy, or in a folder at the drive root.
- Reduce folder and filename lengths
- Reduce the number of levels of folders within your file tree.
- Create a virtual drive for part of a path by using the "subst" command. Use the shorter virtual drive path with Perforce. For example, to substitute "U:" for a long directory name such as:
F:\p4user\ClientName\LongDirectory\Name
subst U: F:\p4user\ClientName\LongDirectory\NameSubsequent references to "U:\" will still operate on the longer path.
If you expect to have extremely long paths you may wish to consider using a different operating system to host your Perforce installation.
Filesystem requirements
Do not run the Perforce Windows server on a Novell filesystem, or any filesystem that only supports the 8.3 naming scheme. Perforce database files have long suffixes and under the 8.3 naming these file names are folded. Both NTFS and the NT implementation of the FAT16 DOS filesystem will support long file names. The FAT32 filesystem under Windows 2000 is also supported. It is recommended that a network mounted filesystem not be used for the Perforce server root. While this configuration will work, severe performance degradation can be expected. This performance degredation is due to network latency, disk access, and filesystem locking considerations.
Service Pack requirements
Perforce requires Service Pack 6a when using Windows NT, and Service Pack 3 when using Windows 2000. There are no special requirements for other Windows operating systems.
Special Considerations
Configuring the editor
By default, the Windows client uses notepad as an editor and an internal diff routine. If $SHELL is set, Perforce assumes that you have installed the MKS toolkit, and uses vi as its default editor. To override this default, set the environment variables P4EDITOR and P4DIFF.
Using multiple drives for the client workspace
On Windows, a client workspace can span multiple drives. To enable this feature, specify a client root using the keyword null. Specify the drive letter in each line of the client view. The following is a sample client specification for the client named foocli.
Client: foocli
Owner: joe
Description:
Created by joe.
Root: null
Options: noallwrite noclobber nocompress crlf unlocked nomodtime normdir
View:
//depot/foo/... //foocli/c:/projects/proj1/...
//depot/bar/... //foocli/e:/projects/proj2/...
Syncing files into the root of a Windows network share
Attempts to sync depot files to the root of a Windows network share will fail. For example, in the case of this client specification fragment:
Root: \\system\sharename
View:
//depot/... //client/...
Attempts to sync //depot/file.c will result in an error. The client will try to make the directory "\\". This happens to any file that maps into the root of a share via its UNC path.
There are two workarounds for this:
- Map a network drive and use the drive letter instead of the UNC path
- Create a directory under the share root which is used as the client root and which is guaranteed to exist.
Wildcard expansion
On Windows the Perforce client executable performs wildcard expansion directly (via setargv.obj) rather than relying on the shell. While this works well with both the DOS box (which doesn't do wildcard expansion) and the MKS Korn Shell (which does), it means that to get a * past the Perforce client under the Korn Shell, you must quote it twice (i.e. '"*"'): once to get past the Korn Shell, and once to get past the wildcard expansion in the Perforce client.
Filenames containing tilde (~)
To avoid inadvertently overwriting files when syncing to a Windows computer, do not use the tilde character in filenames. The Windows operating system uses the tilde to represent long filenames, and attempts to expand such filenames when you sync.
Filenames and reserved words
Do not use Windows reserved words as filenames. Examples:
- CON
- PRN
- AUX
- LPTn (where n is 1-9)
- COMn (where n is 1-9)
- NUL
Starting the Perforce Server from the command line
The Perforce server executable on Microsoft Windows (p4d.exe) is a Windows console application. The application does not automatically run as a background process. Unless you are performing tests on your server, starting the Perforce Server as a Windows service is preferable to starting it as a Windows console application. The Perforce Windows installer defaults to installing the Perforce Server as a Windows Service. To start the Perforce Server as a Windows service from an MS-DOS command prompt you can use the following command: net start perforce. The server will read the environment and registry variables at startup time. These settings are discussed in the Perforce System Administrator's Guide. There is also a discussion on Windows specific environment variables in�KB article #36.
For details about running multiple Perforce services on the same Microsoft Windows system, refer to KB article #35.
Lotus Notes
P4V has been known to lock up due to a bug in Lotus Notes when used in conjunction with P4V. IBM has provided a fix, SPR# JGON5SZSK6, in Lotus Notes 6.0.4. For details on this bug, please see the fix list for Lotus Notes on IBM’s website. We recommend the following workarounds:
- Upgrade Lotus Notes to 6.0.4 or higher.
- Run P4V and Lotus Notes as mutually exclusive services.
- # Use P4Win instead of P4V.
HPUX 11.11
Large File Support
The file system on which the P4 depot files (P4ROOT) will reside must have large file support enabled. The HPUX file system administration command for enabling this feature is "fsadm". To see if your file system supports large files, first find the volume using the df command:
% df /source/p4root
/source/p4root (/dev/vg00/lvol8): 206504044 blocks 18900001 i-nodes
Then use the fsadm command (using the raw device):
% fsadm -F hfs /dev/vg00/rlvol8
file system : /dev/vg00/rlvol8
magic number : 4324334
feature bits : 3
file system supports : largefiles, longfilenames
If the output reads "nolargefiles" instead of "largefiles" you will need to do the following:
- unmount the filesystem
- fsadm -F hfs -o largefiles /dev/vg00/rlvol8
- remount the filesystem
See "man fsadm" for more details.
VMS
Last update: 8/12/2004
System requirements
The Perforce p4 command-line client is available on Alpha OpenVMS 6.1, 7.0 and 7.1 and VAX VMS 5.5. The VMS client works with any Perforce server on UNIX or Windows.
Installation
On VMS, you use logicals where Perforce normally expects environment variable, for example, P4PORT, P4CLIENT, P4USER. Enclose case-sensitive values for logicals in quotes.
To install the p4 client:
- Download p4.exe to your VMS host.
- Define a symbol for p4; for example:
$ p4 :== $device:[directory]p4.exe
You can put this definition into your login.com so that it takes effect every time you log in.
NOTE: The client program information is displayed unversioned on VMS: 'p4 -V' displays 'P4-VMS' (on other platforms it includes the version number).
Special Considerations
Configuring the editor
By default, the VMS client uses EDIT as an editor. If the logical POSIX$SHELL is set, it is assumed that the user has the Posix environment installed so vi is used instead. To override this default, set the logical EDITOR.
VMS files and file names
- Symbolic links stored in the Perforce depot are treated as small text files on VMS, because VMS does not support symlinks.
- Because VMS forcibly downshifts C program command line arguments, enclose references to mixed-case file names in quotes.
- VMS assumes that a file name without a suffix inherits the suffix of a file name earlier on the command line. To overcome this behavior, Perforce appends a period (.) to ensure a null suffix for all generated local file names, and strips trailing periods from any local file argument.
- Perforce uses the current directory for temporary files on VMS. To use the Perforce client, the current directory must be writable.
AS400
Last update: August 17, 2004
The AS400 version of the Perforce p4 client was built on AS400 V4R4, using the Visual Age C++ compiler. The Perforce Server is not available on this platform. The ASCII/EBCDIC conversion is handled by the iconv() function, using the IBMCCSID00819 EBCDIC codepage.
Installation
The following procedure tells you how to install Perforce on the AS400 using a Windows workstation as an intermediary.
- Download (as binary) the following AS400 savefile onto your Windows workstation:
ftp://ftp.perforce.com/pub/perforce/r02.1/bin.as400/p4.zip
Use an uncompress utility to uncompress thePerfsavffile. The file size is 8532480 bytes. - On the AS400, create a library named PERFORCE. In the PERFORCE library,
create a save file named PERFSAVE, as follows:
CRTLIB LIB(PERFORCE)
CRTSAVF FILE(PERFORCE/PERFSAVF) - On the Windows workstation, open a DOS command box and ftp the
Perfsavffile (as binary) to the PERFORCE/PERFSAVF savefile on your AS400:C:\> ftp as400hostname
...
ftp> binary
ftp> put p4 PERFORCE/PERFSAVF
ftp> quit - Back on the AS400, verify the contents of the savefile
DSPSAVF FILE(PERFORCE/PERFSAVF)
The following objects are listed:Object Type Attribute Owner Size Data
PERFORCE *LIB PROD LORI 73728 YES
P4 *PGM CPPLE LORI 4157440 YES
P4 *CMD QPGMR 4096 YES
P4SYNC *CMD QPGMR 4096 YES
QCMDSRC *FILE PF QPGMR 32768 YES
QREXSRC *FILE PF QPGMR 40960 YES - Restore the savefile from the PERFORCE/PERFSAVF into the library PERFORCE
(the same library where the PERFSAVF savefile is):
RSTLIB SAVLIB(PERFORCE) DEV(*SAVF) SAVF(PERFORCE/PERFSAVF)
(This step attempts to extract the PERFORCE library you created in step 2. The resulting error is harmless.) - To make the p4 command available to you, add the PERFORCE library to your
library list as follows:
ADDLIBLE PERFORCE
Now you can run the 'p4' command. The 'p4' CMD file wraps up the arguments and passes them to the 'p4' PGM executable.
Special Considerations
Configuring the editor
The default editor (set by P4EDITOR) is edtf.
OS/2
Last update: December 1999
The Perforce OS/2 command-line client is the p4.exe executable. The Perforce server is not available on this platform.
Special considerations
Configuring the editor
By default, the Perforce editor is vi and the file comparison program is diff (same defaults as UNIX). To override the defaults, set the EDITOR and DIFF variables.
Using multiple drives for the client workspace
On OS/2, a client workspace can span multiple drives. To enable this feature, specify a client root using the keyword null. Specify the drive letter in each line of the client view. The following is a sample client specification for the client named foocli.
Client: foocli
Owner: joe
Description:
Created by Joe
Root: null
Options: noallwrite noclobber nocompress crlf unlocked nomodtime normdir
View:
//depot/foo/... //foocli/c:/projects/proj1/...
//depot/bar/... //foocli/e:/projects/proj2/...
BeOS
Last update: December 1999
The Perforce BeOS client can be used on BeOS DR9 for Macintosh and Power Computing PowerPCs to access a Perforce server on any platform. This version was developed using BeOS DR9 with Freescale CodeWarrior. Run the BeOS p4 client from the shell command line in a terminal window.
Special considerations
Configuring the editor
The default Perforce editor is Edit, the BeOS system GUI editor. To override this default, set the $EDITOR environment variable. Be sure to set your editor for "Multiple Launch", as follows:
- Invoke IconWorld.
- Drag the Edit icon onto the IconWorld window.
- Change the App Info settings.
Perforce file permissions
The Be Box is meant to be used as a single-user machine and the effective user has superuser permission, which can circumvent the read-only permissions that Perforce uses to prevent outside modifications to the files it controls. To determine if files have been changed, use the 'p4 diff' command.
Amiga
Last update: October 31, 2006
The Perforce Amiga client program can be run against any Perforce server on UNIX or Windows. The Perforce Server is not available on this platform.
System requirements
AmigaOS 3.1 using ixemul.library version 47. The library may be available from amiga.sourceforge.net.
Special considerations
Specifying file paths
The Amiga version of p4 uses UNIX path names: an Amiga path in the format "drive:path/path/name" gets converted to and from the UNIX format "/drive/path/path/name". Make sure conversion between Amiga and UNIX path names is enabled in ixemul, and keep this conversion in mind when specifying file paths.
Perforce Cygwin Client
If you have your Perforce depot files stored on Windows and you use the Perforce Cygwin command line client to sync files to a client computer, mount your Cygwin volume in text mode to ensure that Windows line endings (CRLF or \r\n) are preserved. If you mount your Cygwin volume in binary mode, the CR (\r) character is deleted when you sync.
Novell File Server
Last update: December 20, 2006
Do not run the Perforce Server on a Novell file system. The Perforce server creates database files with names that are not 8.3 compliant, and the Novell file system does not support such extended file names. As a result, for example, the files "db.rev," "db.revcx," and "db.review" cannot be distinguished as different files, and are overwritten and corrupted.
Macintosh
Platform specific notes for Macintosh can be found in KB article #71.
