📄 solaris.so
字号:
m4_comment([$Id: solaris.so,v 11.26 2007/06/27 14:41:06 bostic Exp $])m4_ref_title(Building m4_db for UNIX/POSIX systems, Solaris, @Solaris, build_unix/sco, build_unix/sunos)m4_nlistbeginm4_nlist([dnlm4_bold([I can't compile and run multithreaded applications.])m4_p([dnlSpecial compile-time flags and additional libraries are required whencompiling threaded applications on Solaris. If you are compiling athreaded application, you must compile with the D_REENTRANT flag and linkwith the libpthread.a or libthread.a libraries:])m4_indent([dnlcc -mt ...cc -D_REENTRANT ... -lthreadcc -D_REENTRANT ... -lpthread])m4_p([dnlThe m4_db library will automatically build with the correct options.])])m4_hlm4_nlist([dnlm4_bold([I've installed gcc on my Solaris system, but configurationfails because the compiler doesn't work.])m4_p([dnlOn some versions of Solaris, there is a cc executable in the user's path,but all it does is display an error message and fail:])m4_indent([% which cc/usr/ucb/cc% cc/usr/ucb/cc: language optional software package not installed])m4_p([dnlBecause m4_db always uses the native compiler in preference to gcc, thisis a fatal error. If the error message you are seeing is the following,then this may be the problem:])m4_indent([checking whether the C compiler (cc -O) works... noconfigure: error: installation or configuration problem: C compiler cannot create executables.])m4_p([dnlThe simplest workaround is to set your CC environment variable to thesystem compiler and reconfigure; for example:])m4_indent([env CC=gcc ../dist/configure])m4_p([dnlIf you are using the --configure-cxx option, you may also want to specifya C++ compiler, for example the following:])m4_indent([env CC=gcc CCC=g++ ../dist/configure])])m4_hlm4_nlist([dnlm4_bold([I see the error"libc internal error: _rmutex_unlock: rmutex not held", followed by a coredump when running threaded or JAVA programs.])m4_p([dnlThis is a known bug in Solaris 2.5 and it is fixed by Sun patch 103187-25.])])m4_hlm4_nlist([dnlm4_bold([I see error reports of nonexistent files, corrupted metadatapages and core dumps.])m4_p([dnlSolaris 7 contains a bug in the threading libraries (-lpthread,-lthread), which causes the wrong version of the pwrite routine to belinked into the application if the thread library is linked in afterthe C library. The result will be that the pwrite function is calledrather than the pwrite64. To work around the problem, use an explicitlink order when creating your application.])m4_p([dnlSun Microsystems is tracking this problem with Bug Id's 4291109 and 4267207,and patch 106980-09 to Solaris 7 fixes the problem:])m4_indent([dnlBug Id: 4291109Duplicate of: 4267207Category: librarySubcategory: libthreadState: closedSynopsis: pwrite64 mapped to pwriteDescription:When libthread is linked after libc, there is a table of functions inlibthread that gets "wired into" libc via _libc_threads_interface().The table in libthread is wrong in both Solaris 7 and on28_35 for theTI_PWRITE64 row (see near the end).])])m4_hlm4_nlist([dnlm4_bold([I see corrupted databases when doing hot backups or creatinga hot failover archive.])m4_p([dnlThe Solaris cp utility is implemented using the mmap system call, andso writes are not blocked when it reads database pages. Seem4_link(M4RELDIR/ref/transapp/reclimit, [m4_db recoverability]) for moreinformation.])])m4_hlm4_nlist([dnlm4_bold([Performance is slow and the application is doing a lot of I/Oto the disk on which the database environment's files are stored.])m4_p([dnlBy default, Solaris periodically flushes dirty blocks from memory-mappedfiles to the backing filesystem. This includes the m4_db databaseenvironment's shared memory regions and can affect m4_db performance.Workarounds include creating the shared regions in system shared memory(m4_ref(DB_SYSTEM_MEM)) or application private memory(m4_ref(DB_PRIVATE)), or, configuring Solaris to not flush memory-mappedpages. For more information, see the "Solaris Tunable ParametersReference Manual: fsflush and Related Tunables".])])m4_hlm4_nlist([dnlm4_bold([I see errors about "open64" when building m4_db applications.])m4_p([dnlSystem include files (most commonly fcntl.h) in some releases of AIX,HP-UX and Solaris redefine "open" when large-file support is enabledfor applications. This causes problems when compiling applicationsbecause "open" is a method in the m4_db APIs. To work around thisproblem:m4_nlistbeginm4_nlist([dnlAvoid including the problematical system include files in source codefiles which also include m4_db include files and call into the m4_dbAPI.])m4_nlistns([dnlBefore building m4_db, modify the generated include file db.h to itselfinclude the problematical system include files.])m4_nlistns([dnlTurn off m4_db large-file support by specifying them4_linkpage(M4RELDIR/ref/build_unix/conf, --disable-largefile,--disable-largefile) configuration option and rebuilding.])m4_nlistend])])m4_nlistendm4_page_footer
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -