[kokua-dev] Building Linux64

Emily Björk bjoerk.emily at gmail.com
Sat Jun 16 12:44:52 PDT 2012

Okay this is interesting :)

While waiting for some insight on why that didn't work I did some
experimenting, I temporarily disabled the use of the -m32 and -m64
flags (just leave them out completely) in the common-cmake-file (and
changed -march=pentium4 to -march=native just for testing) and
attempted to build the source.

To my big surprise I get warnings (treated as errors with -Werror):

indra/llcommon/llmemory.h: In member function ‘bool
LLPrivateMemoryPool::LLMemoryBlock* const&, const
LLPrivateMemoryPool::LLMemoryBlock* const&)’:
indra/llcommon/llmemory.h:240: error: cast from ‘char*’ to ‘U32’ loses precision
indra/llcommon/llmemory.h:240: error: cast from ‘char*’ to ‘U32’ loses precision

The affected line is
return (U32)lhs->getBuffer() < (U32)rhs->getBuffer();

The error makes perfect sense since pointers are 64bits on a 64bit
linux system and indeed that line will not do what the author(s)
intended it to (don't get me started on the use of S/U/F-16/32/64 etc.
in general, this just goes to show how brittle it is to assume exact
word sizes).

Anyhow, what is baffling me is that, how did the kokua team manage to
produce 64bit linux builds without getting that compile error? Are you
setting the -mx32 flag to run in  compatibility long mode? But that
would require GCC 4.7 or later... Anyhow I'm interested in knowing
what is going on with the linux 64 build :)


2012/6/16 Emily Björk <bjoerk.emily at gmail.com>:
> Oh poop, I'm terrible at mailing-lists... I should have clicked reply all right?
> Also this to clarify, I hope I'm not running the wrong autobuild:
> $ which autobuild
> /home/emily/Kokua/autobuild/bin//autobuild
> 2012/6/16 Emily Björk <bjoerk.emily at gmail.com>:
>> Okay that was my fault, I apparently forgot to source the script where
>> I put that export.
>> Now I get this:
>> $ pwd
>> /home/emily/Kokua/autobuild
>> $ hg paths
>> default = https://bitbucket.org/kokua/autobuild
>> $ echo $PATH
>> /home/emily/Kokua/autobuild/bin/:/home/emily/Kokua/autobuild/bin/:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
>> $ cd ../kokua/
>> $ autobuild configure  -c RelWithDebInfoOS -- -DLL_TESTS=OFF
>> ERROR: no configuration for platform 'linux64' found; one may be
>> created using 'autobuild edit platform'
>> For more information: try re-running your command with --verbose or --debug
>> linux64
>> Any ideas?
>> 2012/6/16 Borun (a.k.a. Boroondas Gupte) <borun at kokuaviewer.org>:
>>> On 06/16/2012 06:05 PM, Emily Björk wrote:
>>>> Hi I'm looking at setting up a 64bit Linux build environment but I ran
>>>> into a snag.
>>>> Why is the source compiled with "-m32" for 64bit builds? This prevents
>>>> the generation of x86_64 instructions [...]
>>> This should not happen if you set AUTOBUILD_PLATFORM_OVERRIDE as advised
>>> at http://wiki.kokuaviewer.org/wiki/Building_with_autobuild#linux_64_bit
>>> _______________________________________________
>>> kokua-dev mailing list
>>> kokua-dev at lists.kokuaviewer.org
>>> http://lists.kokuaviewer.org/listinfo.cgi/kokua-dev-kokuaviewer.org

More information about the kokua-dev mailing list