pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/43140: benchmarks/bonnie++ does not compile on Solaris



>Number:         43140
>Category:       pkg
>Synopsis:       benchmarks/bonnie++ does not compile on Solaris
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Apr 08 13:50:00 +0000 2010
>Originator:     Jörn Clausen
>Release:        
>Organization:
University of Bielefeld
>Environment:
>Description:
bonnie++-1.03e does not compile on Solaris:

g++ -O2  -DNDEBUG -Wall -W -Wshadow -Wpointer-arith -Wwrite-strings -pedantic 
-ffor-scope   -c bon_io.cpp
bon_io.cpp: In member function `int CFileOp::m_open(const char*, int, bool)':
bon_io.cpp:398: error: `O_DIRECT' was not declared in this scope
bon_io.cpp:398: warning: unused variable 'O_DIRECT'

This has been documented in the author's blog for more than a year now, so an 
upstream fix seems improbable:

http://etbe.coker.com.au/2008/12/10/new-version-of-bonnie-and-violin-memory/#comments
>How-To-Repeat:

>Fix:
This is a very superficial patch, as the command line option for direct IO is 
simply ignored on Suns:

--- /software/pkgsrc/source/local/bonnie++-1.03e/bon_io.cpp     Fri Sep 26 
05:19:38 2008
+++ work.spare4200/bonnie++-1.03e/bon_io.cpp    Thu Apr  8 15:38:21 2010
@@ -393,6 +393,8 @@
     createFlag = OPEN_ACTION_CREATE_IF_NEW | OPEN_ACTION_REPLACE_IF_EXISTS;
 #else
     flags = O_RDWR | O_CREAT | O_EXCL;
+#endif
+#ifndef sun
     if(m_use_direct_io)
     {
       flags |= O_DIRECT;

I haven't investigated the development branch, but the changelog for 1.96 
mentions a fix for Solaris as well:

http://etbe.coker.com.au/2009/07/05/released-bonnie-1-96/



Home | Main Index | Thread Index | Old Index