|
From: <jo...@ei...> - 2010-08-15 05:49:20
|
Neto, It is "just" a type checking error ;-) The current line looks like this: posix_memalign(&randomDataBuffer, sysconf(_SC_PAGESIZE), RANDOM_BUFFER_SIZE) change it to posix_memalign((void**)&randomDataBuffer, sysconf(_SC_PAGESIZE), RANDOM_BUFFER_SIZE) There are several other incantations that will work and a couple have a few other advantages so if the bug fix isn't exactly like above don't worry, it'll probably use a reinterpret_cast for better compile time checking. Good luck, Joe Quoting "is...@ya..." <is...@ya...>: > My friends > > Forgive me if I'm doing something wrong but... > > > svn co https://iometer.svn.sourceforge.net/svnroot/iometer/ > > Copying all files ....................................................... > > Checked out revision 52. > > On Linux: > > [root@localhost 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 -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 -c Pulsar.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 -c IOManager.cpp > IOManager.cpp: In member function âvoid Manager::GenerateRandomData()â: > IOManager.cpp:1028: error: invalid conversion from âunsigned char**â > to âvoid**â > IOManager.cpp:1028: error: initializing argument 1 of âint > posix_memalign(void**, size_t, size_t)â > make: *** [IOManager.o] Error 1 > > Could you please help me? > > TIA > > neto > > > ________________________________ > From: "jo...@ei..." <jo...@ei...> > To: "is...@ya..." <is...@ya...> > Cc: Vedran Degoricija <ve...@ya...>; > iom...@li...; > iom...@li... > Sent: Sat, August 14, 2010 12:40:24 AM > Subject: Re: [Iometer-devel] Error compiling WorkingBranch_Q2_2010_Release > > Neto, you're doing everything correctly. > > A quick look at the svn repo shows that the offending code was > introduced on March 26 by allenwa. > > If you go into the IOManager.cpp file and search for VirtualAlloc you > will find 2 instances, one with the problem code and one that is done > correctly. You can use this as an example to fix your problem. > > There should be series of #if defines for the various operating > systems, with Windows using VirtualAlloc and linux using valloc. You > will also need to fix the VirtualFree call in the stop test, it too > should be #ifdef'd > > If you go in to fix it up and submit a patch do me a favor and make > sure to change the VirtualAlloc call to check to make sure the > allocation actually succeeds (i.e. the data buffer is not NULL). > Sloppy practices like not checking only introduce hidden bugs waiting > to crash some innocent user. > > Good luck, > Joe > > > > Quoting "is...@ya..." <is...@ya...>: > >> I did: On Linux Redhat 5.4 >> >> svn co https://iometer.svn.sourceforge.net/svnroot/iometer iometer >> >> On Linux: WorkingBranch_Q2_2010_Release >> >> [root@localhost 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 -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 -c Pulsar.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 -c IOManager.cpp >> IOManager.cpp: In member function âvoid Manager::GenerateRandomData()â: >> IOManager.cpp:1023: error: âMEM_COMMITâ was not declared in this scope >> IOManager.cpp:1023: error: âMEM_RESERVEâ was not declared in this scope >> IOManager.cpp:1023: error: âPAGE_READWRITEâ was not declared in this scope >> IOManager.cpp:1023: error: âVirtualAllocâ was not declared in this scope >> IOManager.cpp: In member function âvoid Manager::Stop_Test(int)â: >> IOManager.cpp:1099: error: âMEM_RELEASEâ was not declared in this scope >> IOManager.cpp:1099: error: âVirtualFreeâ was not declared in this scope >> make: *** [IOManager.o] Error 1 >> >> >> >> >> ________________________________ >> From: Vedran Degoricija <ve...@ya...> >> To: "is...@ya..." <is...@ya...>; >> iom...@li...; >> iom...@li... >> Sent: Fri, August 13, 2010 5:42:56 PM >> Subject: Re: [Iometer-devel] Error compiling WorkingBranch_Q2_2010_Release >> >> >> Hi Neto, >> >> The errors you are seeing are Windows definitions being compiled >> under Linux. >> What version are you trying to build and/or what SVN path did you sync with? >> >> All of the braches (trunk and tags included) should be buildable clean under >> Windows and Linux. >> >> Ved >> >> >> >> >> ________________________________ >> From: "is...@ya..." <is...@ya...> >> To: "is...@ya..." <is...@ya...>; >> iom...@li...; >> iom...@li... >> Sent: Fri, August 13, 2010 12:51:55 PM >> Subject: Re: [Iometer-devel] Error compiling WorkingBranch_Q2_2010_Release >> >> >> Hi All, >> >> This is neto from Brazil >> >> How are you? >> >> Could you please someone help me to download the latest patch (svn track) of >> Iometer for Windows 64 bits and Linux 64 bits (RedHat 5.4)? >> >> Please this is urgent. >> >> TIA >> >> All the best >> >> neto >> >> >> >> >> ________________________________ >> From: "is...@ya..." <is...@ya...> >> To: iom...@li...; iom...@li... >> Sent: Fri, August 13, 2010 3:35:30 PM >> Subject: [Iometer-devel] Error compiling WorkingBranch_Q2_2010_Release >> >> >> Hi All, >> >> This is neto from Brazil >> >> How are you? >> >> >> svn co https://iometer.svn.sourceforge.net/svnroot/iometer iometer >> >> On Linux: WorkingBranch_Q2_2010_Release >> >> [root@localhost 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 -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 -c Pulsar.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 -c IOManager.cpp >> IOManager.cpp: In member function âvoid Manager::GenerateRandomData()â: >> IOManager.cpp:1023: error: âMEM_COMMITâ was not declared in this scope >> IOManager.cpp:1023: error: âMEM_RESERVEâ was not declared in this scope >> IOManager.cpp:1023: error: âPAGE_READWRITEâ was not declared in this scope >> IOManager.cpp:1023: error: âVirtualAllocâ was not declared in this scope >> IOManager.cpp: In member function âvoid Manager::Stop_Test(int)â: >> IOManager.cpp:1099: error: âMEM_RELEASEâ was not declared in this scope >> IOManager.cpp:1099: error: âVirtualFreeâ was not declared in this scope >> make: *** [IOManager.o] Error 1 >> >> >> Any clues? >> >> All the best >> >> neto >> >> >> > > > |