Error - Ubuntu 8.04 (Hardy)

Discussion and help for Compilation problems and platform portability.

Moderators: Dade, coordinators

Error - Ubuntu 8.04 (Hardy)

Postby Seregost » Sun Aug 30, 2009 7:28 am

Hi to all.
I've tried to compile luxrender on my Ubuntu-Hardy 8.04 (I don't now why but cannot install newest versions :cry: ) following Ubuntu/Debian instructions. Everything goes well untill I've got those errors:

Code: Select all
[ 10%] Building CXX object CMakeFiles/lux.dir/lux/core/material.o
In file included from /home/damiano/lux/core/randomgen.h:39,
                 from /home/damiano/lux/core/lux.h:126,
                 from /home/damiano/lux/core/material.h:26,
                 from /home/damiano/lux/core/material.cpp:24:
/home/damiano/lux/core/memory.h: In member function ‘void* MemoryArena::Alloc(size_t)’:
[b]/home/damiano/lux/core/memory.h:209: warning: format ‘%d’ expects type ‘int’, but argument 2 has type ‘size_t’
/home/damiano/lux/core/memory.h:209: warning: format ‘%d’ expects type ‘int’, but argument 3 has type ‘size_t’[/b]


Errors appear in each pass of building process, and after it had finish, I've got Lux installed without any executable in "render" folder.This is line 209 of "memory.h" file in "core" folder:

Code: Select all
class  MemoryArena {
public:
   // MemoryArena Public Methods
   MemoryArena(size_t bs = 32768) {
      blockSize = bs;
      curBlockPos = 0;
      currentBlock = lux::AllocAligned<char>(blockSize);
   }
   ~MemoryArena() {
      lux::FreeAligned(currentBlock);
      for (size_t i = 0; i < usedBlocks.size(); ++i)
         lux::FreeAligned(usedBlocks[i]);
      for (size_t i = 0; i < availableBlocks.size(); ++i)
         lux::FreeAligned(availableBlocks[i]);
   }
   void *Alloc(size_t sz) {
      // Round up _sz_ to minimum machine alignment
      #if defined(LUX_ALIGNMENT)
      sz = ((sz + (LUX_ALIGNMENT-1)) & (~(LUX_ALIGNMENT-1)));
      #else
      sz = ((sz + 7) & (~7));
      #endif
      if (curBlockPos + sz > blockSize) {
         // Get new block of memory for _MemoryArena_
         usedBlocks.push_back(currentBlock);
         if (availableBlocks.size() > 0 && sz <= blockSize) {
            currentBlock = availableBlocks.back();
            availableBlocks.pop_back();
         } else {
            if (sz > blockSize)
209                        printf("Huge arena alloc: %d (%d)", sz, blockSize);[/b]
            currentBlock = lux::AllocAligned<char>(max(sz, blockSize));
         }
         curBlockPos = 0;
      }
      void *ret = currentBlock + curBlockPos;
      curBlockPos += sz;
      return ret;
   }
   void FreeAll() {
      curBlockPos = 0;
      while (usedBlocks.size() > 0) {
         availableBlocks.push_back(usedBlocks.back());
         usedBlocks.pop_back();
      }
   }
private:
   // MemoryArena Private Data
   size_t curBlockPos, blockSize;
   char *currentBlock;
   vector<char *> usedBlocks, availableBlocks;
};


So, my question is: I've got tu unistall, download tar file and then compile from it?
If yes: How can I unistall it? :oops:
If no: How can I repare it?

Oh yes: Ubuntu Hardy 8.04 - 64bit
Sorry for my poor english
User avatar
Seregost
 
Posts: 128
Joined: Tue Nov 18, 2008 8:01 am

Re: Error - Ubuntu 8.04 (Hardy)

Postby jensverwiebe » Sun Aug 30, 2009 10:44 am

These are no errors, but warnings.
Normally these are harmless and don´t stop compile unless you have -Werror switched on. ( treats warnings as errors )

You can fix it yourself by: ( by LordCRC )

change variable to %ul
then cast the variables, ie ", (unsigned long)sz, ....

I did it with %zu to match the size_t variable, not sure what is better.

line 209:
printf("Huge arena alloc: %zu (%zu)", sz, blockSize);



Jens
User avatar
jensverwiebe
Developer
 
Posts: 3429
Joined: Wed Apr 02, 2008 4:34 pm

Re: Error - Ubuntu 8.04 (Hardy)

Postby Lord Crc » Sun Aug 30, 2009 1:26 pm

zu is better, but not portable. ul is portable. I'll fix the repository now.
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 5032
Joined: Sat Nov 17, 2007 2:10 pm

Re: Error - Ubuntu 8.04 (Hardy)

Postby jeanphi » Mon Aug 31, 2009 1:58 am

Hi,

Actually this printf line was a personnal temporary debug hack that should never have been published. We should never use printf to output anything so the proper fix is simply to remove this printf (it doesn't even trigger).

Jeanphi
jeanphi
Developer
 
Posts: 7943
Joined: Mon Jan 14, 2008 7:21 am

Re: Error - Ubuntu 8.04 (Hardy)

Postby Lord Crc » Mon Aug 31, 2009 5:57 am

Yeah I was curious why there was a printf there :)
May contain traces of nuts.
User avatar
Lord Crc
Developer
 
Posts: 5032
Joined: Sat Nov 17, 2007 2:10 pm

Re: Error - Ubuntu 8.04 (Hardy)

Postby jensverwiebe » Mon Aug 31, 2009 6:46 am

...where on track with unnneded printf´s, take a look at renderserver.cpp line 409 too.
Throws the same warning.
THX


Jens
User avatar
jensverwiebe
Developer
 
Posts: 3429
Joined: Wed Apr 02, 2008 4:34 pm

Re: Error - Ubuntu 8.04 (Hardy)

Postby Seregost » Wed Sep 02, 2009 4:55 am

Ok, I think i've understood. I've removed the folder, downloaded from mercurial the LuxRenderCore tar.gz, extract in a "lux" folder, followed the compile instructions and after that i've got an error about renderfarm. Sorry if I don't uploaded info about that but I've got a big trouble with Ubuntu and I've to reinstall the distro. Maybe tomorrow some news
Sorry for my poor english
User avatar
Seregost
 
Posts: 128
Joined: Tue Nov 18, 2008 8:01 am

Re: Error - Ubuntu 8.04 (Hardy)

Postby Seregost » Tue Sep 15, 2009 6:33 am

Ok, the previous error doesn't appear nomore, but now, i've got this one.
Code: Select all
/home/damiano/lux/core/renderfarm.cpp:32:26: error: boost/asio.hpp: No such file or directory
In file included from /home/damiano/lux/core/sampling.h:29,
                 from /home/damiano/lux/core/scene.h:29,
                 from /home/damiano/lux/core/renderfarm.cpp:24:
/home/damiano/lux/core/contribution.h: In member function ‘bool lux::ContributionBuffer::Add(lux::Contribution*, float)’:
/home/damiano/lux/core/contribution.h:100: warning: comparison between signed and unsigned integer expressions
/home/damiano/lux/core/contribution.h:102: warning: comparison between signed and unsigned integer expressions
/home/damiano/lux/core/renderfarm.cpp: At global scope:
/home/damiano/lux/core/renderfarm.cpp:39: error: ‘boost::asio’ has not been declared
/home/damiano/lux/core/renderfarm.cpp: In member function ‘bool lux::RenderFarm::connect(const std::string&)’:
/home/damiano/lux/core/renderfarm.cpp:120: error: ‘tcp’ has not been declared
/home/damiano/lux/core/renderfarm.cpp:120: error: expected `;' before ‘stream’
/home/damiano/lux/core/renderfarm.cpp:121: error: ‘stream’ was not declared in this scope
/home/damiano/lux/core/renderfarm.cpp: In member function ‘void lux::RenderFarm::disconnect(const lux::RenderFarm::ExtRenderingServerInfo&)’:
/home/damiano/lux/core/renderfarm.cpp:204: error: ‘tcp’ has not been declared
/home/damiano/lux/core/renderfarm.cpp:204: error: expected `;' before ‘stream’
/home/damiano/lux/core/renderfarm.cpp:205: error: ‘stream’ was not declared in this scope
/home/damiano/lux/core/renderfarm.cpp: In member function ‘void lux::RenderFarm::flush()’:
/home/damiano/lux/core/renderfarm.cpp:226: error: ‘tcp’ has not been declared
/home/damiano/lux/core/renderfarm.cpp:226: error: expected `;' before ‘stream’
/home/damiano/lux/core/renderfarm.cpp:227: error: ‘stream’ was not declared in this scope
/home/damiano/lux/core/renderfarm.cpp: In member function ‘void lux::RenderFarm::updateFilm(lux::Scene*)’:
/home/damiano/lux/core/renderfarm.cpp:256: error: ‘tcp’ has not been declared
/home/damiano/lux/core/renderfarm.cpp:256: error: expected `;' before ‘stream’
/home/damiano/lux/core/renderfarm.cpp:257: error: ‘stream’ was not declared in this scope
make[2]: *** [CMakeFiles/lux.dir/lux/core/renderfarm.o] Error 1
make[1]: *** [CMakeFiles/lux.dir/all] Error 2
make: *** [all] Error 2
damiano@damiano-desktop:~$



Can someone explain what I have to do? I have this errors when I try to compile both with RC5 and RC6 :(
Sorry for my poor english
User avatar
Seregost
 
Posts: 128
Joined: Tue Nov 18, 2008 8:01 am

Re: Error - Ubuntu 8.04 (Hardy)

Postby jeanphi » Tue Sep 15, 2009 7:28 am

Hi,

You need a boost library with the asio development headers. Starting from v0.6RC5 we use boost version 1.39 (you should be able to compile lux with boost version at least 1.35) and don't provide asio headers with Lux source code.

Jeanphi
jeanphi
Developer
 
Posts: 7943
Joined: Mon Jan 14, 2008 7:21 am

Re: Error - Ubuntu 8.04 (Hardy)

Postby Seregost » Tue Sep 15, 2009 4:00 pm

I've noticed that in my system is installed libboost 1.34. So I have to upgrade them :?
Sorry for my poor english
User avatar
Seregost
 
Posts: 128
Joined: Tue Nov 18, 2008 8:01 am

Next

Return to Compilation & Portability

Who is online

Users browsing this forum: No registered users and 2 guests