OSX 10.6 64bit compilation fails with 1.7.1

Bug #731234 reported by Christopher Denter
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Panda3D
Fix Released
Low
David Rose

Bug Description

I'm trying to compile using makepanda, python 2.6 64 bit on OSX 10.6 64bit. I made two changes in makepanda.py that make it not build i386 but x86_64.

Here is the compile error: http://paste.pocoo.org/show/350106/

Tags: makepanda osx
rdb (rdb)
tags: added: makepanda osx
Revision history for this message
rdb (rdb) wrote :

Could you attach the output of:

gcc -arch x86_64 -dM -E - < /dev/null

Revision history for this message
Christopher Denter (dennda) wrote :
Download full text (3.8 KiB)

Absolutely my friend, here you go:

dennda ~$ gcc -arch x86_64 -dM -E - < /dev/null
#define __DBL_MIN_EXP__ (-1021)
#define __FLT_MIN__ 1.17549435e-38F
#define __DEC64_DEN__ 0.000000000000001E-383DD
#define __CHAR_BIT__ 8
#define __WCHAR_MAX__ 2147483647
#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
#define __FLT_EVAL_METHOD__ 0
#define __DBL_MIN_10_EXP__ (-307)
#define __FINITE_MATH_ONLY__ 0
#define __DEC64_MAX_EXP__ 384
#define __SHRT_MAX__ 32767
#define __LDBL_MAX__ 1.18973149535723176502e+4932L
#define __APPLE_CC__ 5664
#define __UINTMAX_TYPE__ long unsigned int
#define __DEC32_EPSILON__ 1E-6DF
#define __block __attribute__((__blocks__(byref)))
#define __SCHAR_MAX__ 127
#define __USER_LABEL_PREFIX__ _
#define __STDC_HOSTED__ 1
#define __DEC64_MIN_EXP__ (-383)
#define __DBL_DIG__ 15
#define __FLT_EPSILON__ 1.19209290e-7F
#define __LDBL_MIN__ 3.36210314311209350626e-4932L
#define __DEC32_MAX__ 9.999999E96DF
#define __strong
#define __APPLE__ 1
#define __DECIMAL_DIG__ 21
#define __LDBL_HAS_QUIET_NAN__ 1
#define __DYNAMIC__ 1
#define __GNUC__ 4
#define __MMX__ 1
#define __FLT_HAS_DENORM__ 1
#define __DBL_MAX__ 1.7976931348623157e+308
#define __DBL_HAS_INFINITY__ 1
#define __DEC32_MIN_EXP__ (-95)
#define OBJC_NEW_PROPERTIES 1
#define __LDBL_HAS_DENORM__ 1
#define __DEC32_MIN__ 1E-95DF
#define __weak __attribute__((objc_gc(weak)))
#define __DBL_MAX_EXP__ 1024
#define __DEC128_EPSILON__ 1E-33DL
#define __SSE2_MATH__ 1
#define __amd64 1
#define __tune_core2__ 1
#define __LONG_LONG_MAX__ 9223372036854775807LL
#define __GXX_ABI_VERSION 1002
#define __FLT_MIN_EXP__ (-125)
#define __x86_64 1
#define __DBL_MIN__ 2.2250738585072014e-308
#define __LP64__ 1
#define __DBL_HAS_QUIET_NAN__ 1
#define __DEC128_MIN__ 1E-6143DL
#define __REGISTER_PREFIX__
#define __DBL_HAS_DENORM__ 1
#define __NO_INLINE__ 1
#define __DEC_EVAL_METHOD__ 2
#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL
#define __FLT_MANT_DIG__ 24
#define __VERSION__ "4.2.1 (Apple Inc. build 5664)"
#define __DEC64_EPSILON__ 1E-15DD
#define __DEC128_MIN_EXP__ (-6143)
#define __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ 1066
#define __SIZE_TYPE__ long unsigned int
#define __DEC32_DEN__ 0.000001E-95DF
#define __FLT_RADIX__ 2
#define __LDBL_EPSILON__ 1.08420217248550443401e-19L
#define __SSE_MATH__ 1
#define __k8 1
#define __LDBL_DIG__ 18
#define __x86_64__ 1
#define __FLT_HAS_QUIET_NAN__ 1
#define __FLT_MAX_10_EXP__ 38
#define __LONG_MAX__ 9223372036854775807L
#define __FLT_HAS_INFINITY__ 1
#define __DEC64_MAX__ 9.999999999999999E384DD
#define __DEC64_MANT_DIG__ 16
#define __DEC32_MAX_EXP__ 96
#define __DEC128_DEN__ 0.000000000000000000000000000000001E-6143DL
#define __LITTLE_ENDIAN__ 1
#define __LDBL_MANT_DIG__ 64
#define __CONSTANT_CFSTRINGS__ 1
#define __DEC32_MANT_DIG__ 7
#define __k8__ 1
#define __WCHAR_TYPE__ int
#define __pic__ 2
#define __FLT_DIG__ 6
#define __INT_MAX__ 2147483647
#define __FLT_MAX_EXP__ 128
#define __BLOCKS__ 1
#define __DBL_MANT_DIG__ 53
#define __DEC64_MIN__ 1E-383DD
#define __WINT_TYPE__ int
#define __SSE__ 1
#define __LDBL_MIN_EXP__ (-16381)
#define __MACH__ 1
#define __amd64__ 1
#define __LDBL_MAX_EXP__ 16384
#define __SSP__ 1
#define __LDBL_M...

Read more...

Revision history for this message
David Rose (droklaunchpad) wrote :

I tracked this down to old, incorrect assumptions in dtoolbase/numeric_types.h and parser_inc/stdint.h about the size of "long int", which isn't consistent across 64-bit platforms, and might be 32 bits or might be 64. Fortunately, "long long int" appears to be universally 64 bits (at least until we have 128-bit architectures available, I guess), so there's an easy workaround, which I've just committed.

However, a successful build on 64-bit OSX is still impossible due to the absence of the deprecated Carbon functions we have been relying on to open a window. Until some Mac expert can find the modern replacements for these functions, we'll continue to be limited to 32-bit Mac builds.

Revision history for this message
Christopher Denter (dennda) wrote :

Use Cocoa with a CVDisplayLink to drive the rendering and use AGL as OpenGL binding. There is an example OpenGL app as an XCode project that shows how to properly use OpenGL with Cocoa.

Revision history for this message
David Rose (droklaunchpad) wrote :

It's not just a question of hooking up Cocoa to OpenGL--there are issues even opening a window in a program that might be launched from Python or any other non-desktop app.

But, if you'd like to help us by working out these issues and submitting a patch, you'd have the gratitude of the entire current and future OSX Panda community. :)

David

Revision history for this message
rdb (rdb) wrote :

Thanks David! For the record, I've become part of the OSX Panda community now, as I just purchased a Mac mini today. Maybe I'll now have a chance to look at Mac-specific issues.

rdb (rdb)
Changed in panda3d:
assignee: nobody → David Rose (droklaunchpad)
importance: Undecided → Low
milestone: none → 1.7.2
status: New → Fix Committed
rdb (rdb)
Changed in panda3d:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers