Porting Lagoon to AMD 64

From LagoonWiki

Jump to: navigation, search

Contents

Preface

These instructions assume that you have a fresh checkout from the cvs repository and that you are on fedora core with a x86_64 processor. When you're finished you should have a copy that runs like the 32 bit version.

Replacement Libraries

  • tcl and tk: yum install tcl-devel tk-devel
  • DevIL: yum install DevIL-devel
  • wxPython: yum install wxPython-devel
  • nvidia drivers: yum install kmod-nvidia xorg-x11-drv-nvidia-devel; /usr/sbin/nvidia-xconfig

Modifications to Libraries

  • add "|| defined(__x86_64__)" to the end of externalPackages/tnl/tnlTypes.h line 287
  • add "|| __GNUC__ == 4" to the end of externalPackages/tnl/tnlTypes.h line 296
  • change line 450 of externalPackages/tnl/platform.cpp to: S32 dVsprintf(char *buffer, U32 bufferSize, const char* format, va_list arglist)
  • change line 455 of externalPackages/tnl/platform.cpp to: S32 len = vsnprintf(buffer, bufferSize, format, arglist);
  • change line 108 of externalPackages/tnl/tnlPlatform.h to: extern S32 dVsprintf(char *buffer, U32 bufferSize, const char *format, va_list arglist);
  • add "#include <stdarg.h>" after "#define _TNL_PLATFORM_H_" at the top of externalPackages/tnl/tnlPlatform.h
  • add "-fPIC" to the end of line 39 in externalPackages/tnl/Makefile
  • add "-fPIC" to the end of line 26 in externalPackages/libtomcrypt/makefile
  • add return; to the beginning of nDefaultLogHandler::PutLineBuffer in code/src/kernel/ndefaultloghandler.cc line 77

Replacement Libraries

  • OpenAL
    • cd to externalPackages/openal and delete everything (rm -rf *)
    • download the openal and alut source archives to externalPackages/openal
    • extract the two archives where they are and rename the directories (mv freealut-1.0.1 alut; mv openal-0.0.8 al)
    • delete examples and test_suite from externalPackages/openal/alut/Makefile.am line 2
    • save al's makefile to the al directory
    • save alut's makefile to the alut directory
  • ODE
    • cd to externalPackages/ode and delete everything (rm -rf *)
    • download the ode source archive from ode's site to externalPackages/ode
    • extract the archive where it is and copy all the folder's contents down one level (mv ode-0.6-rc3/.)
    • save ode's makefile to the ode directory

Replacement Files

Conclusion

Now just make from the root hypno directory. It will configure, then build the libs, then compile lagoon. It should only config once and will rebuild the libs after every make clean.