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
University of Bielefeld
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:

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 @@
     flags = O_RDWR | O_CREAT | O_EXCL;
+#ifndef sun
       flags |= O_DIRECT;

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

Home | Main Index | Thread Index | Old Index