今天在redhat 6.2下编译iometer 2010时出现错误:
[root@-host2 src]# make -f Makefile-Linux.x86_64 all
/usr/bin/g++ -O -Wall -D_GNU_SOURCE -DIOMTR_OSFAMILY_UNIX -DIOMTR_OS_LINUX -DIOMTR_CPU_X86_64 -DIOMTR_SETTING_GCC_M64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DNOMINMAX -DUSE_NEW_DISCOVERY_MECHANISM -DFORCE_STRUCT_ALIGN -DIOMTR_SETTING_CPU_AFFINITY -c IOGlobals.cpp
/usr/bin/g++ -O -Wall -D_GNU_SOURCE -DIOMTR_OSFAMILY_UNIX -DIOMTR_OS_LINUX -DIOMTR_CPU_X86_64 -DIOMTR_SETTING_GCC_M64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_REENTRANT -DNOMINMAX -DUSE_NEW_DISCOVERY_MECHANISM -DFORCE_STRUCT_ALIGN -DIOMTR_SETTING_CPU_AFFINITY -c Pulsar.cpp
In file included from IOManager.h:94,
from Pulsar.cpp:135:
IOPerformance.h:101:21: error: stropts.h: No such file or directory
make: *** [Pulsar.o] Error 1
这是STREAM支持,好像早期Linux支持。现在iometer在Solaris下面需要这个,Linux下面可以删除这个。
修改如下:
将100行的:
#if defined(IOMTR_OS_LINUX) || defined(IOMTR_OSFAMILY_NETWARE) || defined(IOMTR_OS_SOLARIS)
修改为:
#if defined(IOMTR_OSFAMILY_NETWARE) || defined(IOMTR_OS_SOLARIS)
再编译,OK