Building x86_64 on Leopard

Compiling, libraries, modules, coding guidelines and porting

Moderators: jesterKing, stiv

Post Reply
rlangschultz
Posts: 0
Joined: Wed Jan 30, 2008 2:43 am
Location: Tulsa, OK

Building x86_64 on Leopard

Post by rlangschultz »

I tried to export CFLAGS="-g -O2 -I/usr/include -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk" CXX=gcc CXXFLAGS="-g -O2 -I/usr/include -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.5.sdk"

qhull compiles pretty well, but when it gets to the Freetype libraries things go bad... anything I may be missing? Here is the output:

ake all in extern/bFTGL/src
g++ -c -Wall -Wno-reorder -DUSE_SUMO_SOLID -pipe -fPIC -funsigned-char -fno-strict-aliasing -DNDEBUG -O2 -D_THREAD_SAFE -I../include -I/Users/rlangschultz/blender/blender/../lib/darwin-9.1.0-i386/freetype/include -I/Users/rlangschultz/blender/blender/../lib/darwin-9.1.0-i386/freetype/include/freetype2 -I/System/Library/Frameworks/OpenGL.framework FTBitmapGlyph.cpp -o /Users/rlangschultz/blender/blender/obj/darwin-9.1.0-i386/extern/ftgl/FTBitmapGlyph.o
In file included from FTBitmapGlyph.cpp:3:
../include/FTBitmapGlyph.h:5:22: error: ft2build.h: No such file or directory
../include/FTBitmapGlyph.h:6:10: error: #include expects "FILENAME" or <FILENAME>
../include/FTBitmapGlyph.h:7:10: error: #include expects "FILENAME" or <FILENAME>
In file included from ../include/FTBitmapGlyph.h:10,
from FTBitmapGlyph.cpp:3:
../include/FTGlyph.h:5:10: error: #include expects "FILENAME" or <FILENAME>
../include/FTGlyph.h:6:10: error: #include expects "FILENAME" or <FILENAME>
In file included from ../include/FTGlyph.h:8,
from ../include/FTBitmapGlyph.h:10,
from FTBitmapGlyph.cpp:3:
../include/FTBBox.h:5:10: error: #include expects "FILENAME" or <FILENAME>
../include/FTBBox.h:7:10: error: #include expects "FILENAME" or <FILENAME>
In file included from ../include/FTBBox.h:10,
from ../include/FTGlyph.h:8,
from ../include/FTBitmapGlyph.h:10,
from FTBitmapGlyph.cpp:3:
../include/FTPoint.h:5:10: error: #include expects "FILENAME" or <FILENAME>
../include/FTPoint.h:6:10: error: #include expects "FILENAME" or <FILENAME>
../include/FTPoint.h:39: error: expected ‘,’ or ‘...’ before ‘&’ token
../include/FTPoint.h:39: error: ISO C++ forbids declaration of ‘FT_Vector’ with no type
../include/FTPoint.h: In constructor ‘FTPoint::FTPoint(int)’:
../include/FTPoint.h:40: error: ‘ft_vector’ was not declared in this scope
../include/FTBBox.h: At global scope:
../include/FTBBox.h:49: error: expected `)' before ‘glyph’
../include/FTGlyph.h:31: error: expected `)' before ‘glyph’
../include/FTGlyph.h:65: error: ‘FT_Error’ does not name a type
../include/FTGlyph.h:81: error: ‘FT_Error’ does not name a type
../include/FTBitmapGlyph.h:31: error: expected `)' before ‘glyph’
FTBitmapGlyph.cpp:5: error: expected `)' before ‘glyph’
make[2]: *** [/Users/rlangschultz/blender/blender/obj/darwin-9.1.0-i386/extern/ftgl/FTBitmapGlyph.o] Error 1
make[1]: *** [all] Error 1
make: *** [all] Error 1

stiv
Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv »

In file included from FTBitmapGlyph.cpp:3:
../include/FTBitmapGlyph.h:5:22: error: ft2build.h: No such file or directory
The first msg is always the important one.

A missing file means either something is not installed or a bad path.

nobulart
Posts: 0
Joined: Thu Apr 24, 2008 3:52 pm

Post by nobulart »

Hi rlang. Any success with your 64-bit build on Leopard? I just recently switched to a Mac Pro and would dearly love to be able to compile a 64-bit version for this platform. I keep running into issues with xvidcore when trying to build it.

Code: Select all

.
.
.
Undefined symbols:
  "_xvid_V_Pass_8_mmx", referenced from:
      _xvid_QP_Funcs_mmx in libextern_xvidcore.a(qpel.o)
  "_MBFieldTest_mmx", referenced from:
      _MBFieldTest_mmx$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_dequant_mpeg_intra_mmx", referenced from:
      _dequant_mpeg_intra_mmx$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_sse2_os_trigger", referenced from:
      _sse2_os_trigger$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_xvid_H_Pass_8_mmx", referenced from:
      _xvid_QP_Funcs_mmx in libextern_xvidcore.a(qpel.o)
  "_xvid_H_Pass_Avrg_8_Add_mmx", referenced from:
      _xvid_QP_Add_Funcs_mmx in libextern_xvidcore.a(qpel.o)
  "_dev16_sse2", referenced from:
.
.
.
Perhaps you could give me some pointers as to what libraries you're using, and perhaps the config for whatever build system you're using? Would be hugely appreciated.

stiv
Posts: 0
Joined: Tue Aug 05, 2003 7:58 am
Location: 45N 86W

Post by stiv »

1) make sure you are using the ffmpeg stuff in the extern dir and not your system libs.

2) may not be applicable here, but some people have run the configure script by hand to set the necessary compile flags.

nobulart
Posts: 0
Joined: Thu Apr 24, 2008 3:52 pm

Post by nobulart »

Thanks stiv. I'll give it a try and post my results here tomorrow.

nobulart
Posts: 0
Joined: Thu Apr 24, 2008 3:52 pm

Post by nobulart »

Okay, I'm trying to build the current SVN version here. Using the default SCons darwin configuration, which so far as I can tell is would use the bundled ffmpeg. Looks like it's failing during linking. Something to do with the xvid libraries. Here's a snippet :

Code: Select all

.
.
gcc -o /Users/craig/blender/svn/build/darwin/bin/blenderplayer -fexceptions -framework CoreServices -framework Foundation -framework IOKit -framework AppKit -framework Carbon -framework AGL -framework AudioUnit -framework AudioToolbox -framework CoreAudio -framework QuickTime -u __dummy -u _PyMac_Error -framework System -framework Python -framework OpenGL /Users/craig/blender/svn/build/darwin/source/creator/dynamic_buildinfo.o /Users/craig/blender/svn/build/darwin/lib/libgp_ghost.a /Users/craig/blender/svn/build/darwin/lib/libgp_common.a /Users/craig/blender/svn/build/darwin/lib/libbf_string.a /Users/craig/blender/svn/build/darwin/lib/libbf_ghost.a /Users/craig/blender/svn/build/darwin/lib/libbf_blenkernel.a /Users/craig/blender/svn/build/darwin/lib/libnodes.a /Users/craig/blender/svn/build/darwin/lib/libblender_ONL.a /Users/craig/blender/svn/build/darwin/lib/libbf_decimation.a /Users/craig/blender/svn/build/darwin/lib/libbf_blenloader.a /Users/craig/blender/svn/build/darwin/lib/libbf_blenpluginapi.a /Users/craig/blender/svn/build/darwin/lib/libbf_imbuf.a /Users/craig/blender/svn/build/darwin/lib/libbf_avi.a /Users/craig/blender/svn/build/darwin/lib/libbf_bloutines.a /Users/craig/blender/svn/build/darwin/lib/libbf_converter.a /Users/craig/blender/svn/build/darwin/lib/libbf_sumo.a /Users/craig/blender/svn/build/darwin/lib/libbf_ketsji.a /Users/craig/blender/svn/build/darwin/lib/libextern_solid.a /Users/craig/blender/svn/build/darwin/lib/libextern_qhull.a /Users/craig/blender/svn/build/darwin/lib/libbf_bullet.a /Users/craig/blender/svn/build/darwin/lib/libbf_common.a /Users/craig/blender/svn/build/darwin/lib/libbf_dummy.a /Users/craig/blender/svn/build/darwin/lib/libbf_logic.a /Users/craig/blender/svn/build/darwin/lib/libbf_rasterizer.a /Users/craig/blender/svn/build/darwin/lib/libbf_oglrasterizer.a /Users/craig/blender/svn/build/darwin/lib/libbf_expressions.a /Users/craig/blender/svn/build/darwin/lib/libbf_scenegraph.a /Users/craig/blender/svn/build/darwin/lib/libbf_moto.a /Users/craig/blender/svn/build/darwin/lib/libbf_soundsystem.a /Users/craig/blender/svn/build/darwin/lib/libbf_kernel.a /Users/craig/blender/svn/build/darwin/lib/libkx_network.a /Users/craig/blender/svn/build/darwin/lib/libbf_ngnetwork.a /Users/craig/blender/svn/build/darwin/lib/libbf_loopbacknetwork.a /Users/craig/blender/svn/build/darwin/lib/libextern_bullet2dynamics.a /Users/craig/blender/svn/build/darwin/lib/libextern_bullet2linmath.a /Users/craig/blender/svn/build/darwin/lib/libextern_bullet2collision.a /Users/craig/blender/svn/build/darwin/lib/libbf_guardedalloc.a /Users/craig/blender/svn/build/darwin/lib/libbf_memutil.a /Users/craig/blender/svn/build/darwin/lib/libbf_bmfont.a /Users/craig/blender/svn/build/darwin/lib/libbf_yafray.a /Users/craig/blender/svn/build/darwin/lib/libbf_blenlib.a /Users/craig/blender/svn/build/darwin/lib/libextern_libavformat.a /Users/craig/blender/svn/build/darwin/lib/libextern_libavcodec.a /Users/craig/blender/svn/build/darwin/lib/libextern_libswscale.a /Users/craig/blender/svn/build/darwin/lib/libextern_libavutil.a /Users/craig/blender/svn/build/darwin/lib/libbf_cineon.a /Users/craig/blender/svn/build/darwin/lib/libbf_ftfont.a /Users/craig/blender/svn/build/darwin/lib/libbf_dds.a /Users/craig/blender/svn/build/darwin/lib/libbf_openexr.a /Users/craig/blender/svn/build/darwin/lib/libbf_quicktime.a /Users/craig/blender/svn/build/darwin/lib/libextern_ftgl.a /Users/craig/blender/svn/build/darwin/lib/libbf_dna.a /Users/craig/blender/svn/build/darwin/lib/libbf_readblenfile.a /Users/craig/blender/svn/build/darwin/lib/libblenkernel_blc.a /Users/craig/blender/svn/build/darwin/lib/libextern_x264.a /Users/craig/blender/svn/build/darwin/lib/libextern_libmp3lame.a /Users/craig/blender/svn/build/darwin/lib/libextern_xvidcore.a -L/Users/craig/blender/svn/build/darwin/lib -L/usr/lib -L/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config -L/System/Library/Frameworks/OpenGL.framework/Libraries -L/Users/craig/blender/svn/lib/darwin-8.x.i386/sdl/lib -L/Users/craig/blender/svn/lib/darwin-8.x.i386/jpeg/lib -L/Users/craig/blender/svn/lib/darwin-8.x.i386/png/lib -L. -L. -L/Users/craig/blender/svn/lib/darwin-8.x.i386/openexr/lib -L/Users/craig/blender/svn/lib/darwin-8.x.i386/gettext/lib -L/Users/craig/blender/svn/lib/darwin-8.x.i386/freetype/lib -L/Users/craig/blender/svn/lib/darwin-8.x.i386/openal/lib -ljpeg -lpng -lz -lfreetype -lintl -lopenal -liconv -lIex -lHalf -lIlmImf -lImath -lIlmThread -lSDL -lstdc++ -lSystemStubs
Install file: "release/plugins/texture/Makefile" as "/Users/craig/blender/svn/install/darwin/plugins/texture/Makefile"
Install file: "release/plugins/texture/tiles.c" as "/Users/craig/blender/svn/install/darwin/plugins/texture/tiles.c"
Install file: "release/text/blender.html" as "/Users/craig/blender/svn/install/darwin/blender.html"
Install file: "release/text/BlenderQuickStart.pdf" as "/Users/craig/blender/svn/install/darwin/BlenderQuickStart.pdf"
Install file: "release/text/copyright.txt" as "/Users/craig/blender/svn/install/darwin/copyright.txt"
Install file: "release/text/GPL-license.txt" as "/Users/craig/blender/svn/install/darwin/GPL-license.txt"
Install file: "release/text/Python-license.txt" as "/Users/craig/blender/svn/install/darwin/Python-license.txt"
Install file: "release/text/release_244.txt" as "/Users/craig/blender/svn/install/darwin/release_244.txt"
Undefined symbols:
  "_yv12_to_bgra_mmx", referenced from:
      _yv12_to_bgra_mmx$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_dequant_h263_inter_3dne", referenced from:
      _dequant_h263_inter_3dne$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_sad8bi_3dne", referenced from:
      _sad8bi_3dne$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_xvid_H_Pass_Add_16_mmx", referenced from:
      _xvid_QP_Add_Funcs_mmx in libextern_xvidcore.a(qpel.o)
  "_dequant_mpeg_inter_3dne", referenced from:
      _dequant_mpeg_inter_3dne$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_dequant_h263_inter_mmx", referenced from:
      _dequant_h263_inter_mmx$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_dequant_h263_inter_xmm", referenced from:
      _dequant_h263_inter_xmm$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_sse8_8bit_mmx", referenced from:
      _sse8_8bit_mmx$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_dequant_h263_intra_3dne", referenced from:
      _dequant_h263_intra_3dne$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_transfer_16to8copy_3dne", referenced from:
      _transfer_16to8copy_3dne$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_interpolate8x8_halfpel_h_3dne", referenced from:
      _interpolate8x8_halfpel_h_3dne$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_dequant_mpeg_intra_3dne", referenced from:
      _dequant_mpeg_intra_3dne$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_quant_h263_inter_sse2", referenced from:
      _quant_h263_inter_sse2$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_transfer_8to16subro_mmx", referenced from:
      _transfer_8to16subro_mmx$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_interpolate8x4_halfpel_v_3dn", referenced from:
      _interpolate8x4_halfpel_v_3dn$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_interpolate8x8_halfpel_h_3dn", referenced from:
      _interpolate8x8_halfpel_h_3dn$non_lazy_ptr in libextern_xvidcore.a(xvid.o)
  "_xvid_H_Pass_Avrg_16_mmx", referenced from:
      _xvid_QP_Funcs_mmx in libextern_xvidcore.a(qpel.o)
.
.
there's several hundred lines of the same pointer reference problems which follow this, all of them in libextern_xvidcore.a

Jens
Posts: 0
Joined: Sat Aug 26, 2006 7:24 pm
Location: Hamburg, Germany

Post by Jens »

Hi nobulart

Do the following:

1. In terminal goto : /blender/extern/xvidcore/build/generic

2. type: ./configure --disable-assembly --disable-mmx ( + press enter )

3. do make ( type make + press enter )

After that you are able to compile as usual, cause the xvid is pre-build

Cheers...Jens

nobulart
Posts: 0
Joined: Thu Apr 24, 2008 3:52 pm

Post by nobulart »

Totally wicked!!! That worked. Thank you Jens, you just made my week!

ginsoakedboy
Posts: 0
Joined: Sat Nov 15, 2008 6:25 am
Location: India

Post by ginsoakedboy »

I applied following diff to my code it worked


Index: extern/xvidcore/build/generic/configure
===================================================================
--- extern/xvidcore/build/generic/configure (revision 17438)
+++ extern/xvidcore/build/generic/configure (working copy)
@@ -4052,6 +4052,13 @@
PREFIX="-DPREFIX"
MARK_FUNCS=""
;;
+ darwin*)
+ { echo "$as_me:$LINENO: result: darwin" >&5
+echo "${ECHO_T}darwin" >&6; }
+ NASM_FORMAT="macho"
+ PREFIX="-DPREFIX"
+ MARK_FUNCS=""
+ ;;
esac

AS="$chosen_asm_prog"
Sometime I wish I was a little kid again

Post Reply