### Berkeley DB Reference Guide: Building Berkeley DB for UNIX/POSIX systems |

### Linux

1. I can't compile and run multithreaded applications.

   Special compile-time flags are required when compiling threaded applications on Linux. If you are compiling a threaded application, you must compile with the _REENTRANT flag:

   >     cc -D_REENTRANT ...

   The Berkeley DB library will automatically build with the correct options.

2. I see database corruption when accessing databases on NFS-mounted filesystems.

   Some Linux filesystems are known to not support complete semantics for the POSIX fsync call on NFS-mounted filesystems. No Berkeley DB files should be placed on NFS-mounted filesystems on these systems.

3. I see database corruption when accessing databases.

   Some Linux filesystems do not support POSIX filesystem semantics. Specifically, ext2 and early releases of ReiserFS, and ext3 in some configurations, do not support "ordered data mode" and may insert random data into database or log files when systems crash. Berkeley DB files should not be placed on a filesystem that does not support, or is not configured to support, POSIX semantics.

Copyright (c) 1996-2003 Sleepycat Software, Inc. - All rights reserved.