Opened 14 years ago

Closed 13 years ago

#535 closed defect (fixed)

Build errors on OS X 10.6

Reported by: Philip Taylor Owned by:
Priority: Nice to Have Milestone: Alpha 3
Component: Core engine Keywords:
Cc: Patch:

Description

Kimball reports messages like:

../../../source/lib/sysdep/cpu.cpp:38: error: invalid conversion from ‘volatile int64_t*’ to ‘volatile intptr_t*’
../../../source/lib/sysdep/cpu.cpp:38: error:   initializing argument 1 of ‘bool cpu_CAS(volatile intptr_t*, intptr_t, intptr_t)’
../../../source/lib/timer.h: In member function ‘void TimerUnit::AddDifferenceAtomic(TimerUnit, TimerUnit)’:
../../../source/lib/timer.h:180: warning: dereferencing type-punned pointer will break strict-aliasing rules

which looks like it's perhaps using the ARCH_AMD64 branch on a 32-bit target. (Maybe we should add cassert(sizeof(void*) == 8) etc to verify the arch selection earlier?)

Reportedly:

$ g++ -v
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5664~38/src/configure --disable-checking --enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin10 --program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10 --target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5664)

$ gcc -dumpmachine
i686-apple-darwin10

$ echo $HOSTTYPE
x86_64 

Changing premake.lua to correctly use x86 doesn't seem to change much (the ARCH_AMD64 comes from the source code, not the build system).

I'm not sure what we need to do to help debug this.

Change History (14)

comment:1 by (none), 14 years ago

Milestone: Unclassified

Milestone Unclassified deleted

comment:2 by Andrew, 14 years ago

Milestone: OS Alpha 2
Owner: set to Andrew

comment:3 by Andrew, 14 years ago

So I was able to compile with no changes required to anything on OSX 10.6.. Its possible this could be a machine specific config but I highly doubt it my build of G++ is the same as the one above so I do not suspect an issue there.

comment:4 by Kieran P, 14 years ago

Milestone: OS Alpha 2OS Alpha 3

comment:5 by Andrew, 14 years ago

Resolution: worksforme
Status: newclosed

I was able to build both x86 and x86_64 on osx 10.6 with no issues both release and debug builds. I am going to close this until someone complains they can't build it because as of right now it builds just fine.

comment:6 by Kieran P, 14 years ago

Milestone: Alpha 3Alpha 2

comment:7 by Kimball, 14 years ago

Not sure if this is a result of something I've done wrong, but I can't get past update-workspaces.sh on the current build in 10.6.4:

res2-182-86-dhcp:workspaces Home$ ./update-workspaces.sh
Updating bundled third-party dependencies...

bash -c 'mkdir -p output/{debug,release,test}/{FCollada/{FCDocument,FMath,FUtils,FColladaTest/{FCTestAssetManagement,FCTestExportImport,FCTestXRef}},FColladaPlugins/FArchiveXML}'
cp output/libFColladaSD.a ../lib/libFColladaSD.a
cp output/libFColladaSR.a ../lib/libFColladaSR.a

SpiderMonkey is already up to date

Building NVTT...

./build.sh: line 11: cmake: command not found
ERROR: NVTT build failed

comment:8 by Andrew, 14 years ago

you do not have cmake installed it looks like

http://www.cmake.org/

download that and rerun the .sh file

comment:9 by Kimball, 14 years ago

Odd, I've always been able to get past this point before. Is the use of cmake a recent addition?

I'm now getting this error when I run "make -j3"

In file included from ../../../source/lib/sysdep/arch/ia32/ia32.cpp:29:
../../../source/lib/sysdep/arch/ia32/ia32.h:31:3: error: #error "including ia32.h without ARCH_IA32=1"
DLL.cpp
make[1]: *** [obj/lowlevel_Debug/ia32.o] Error 1
make: *** [lowlevel] Error 2

And I have no pyrogenesis_dbg to run in /binaries/system.

comment:10 by Philip Taylor, 14 years ago

Resolution: worksforme
Status: closedreopened

Reopening since it still seems to be a real problem (see also forum post).

Since this works for some people but not others, perhaps the difference is 32/64-bit kernel (triggering different architecture-detection in our build system)? (This failure is apparently on a MacBook Pro with Core 2 with 32-bit kernel.)

comment:11 by Kimball, 14 years ago

Milestone: Alpha 2Alpha 3

Just rebooted with 64-bit kernel, still encountering this:

ia32.cpp
In file included from ../../../source/lib/sysdep/arch/ia32/ia32.cpp:29:
../../../source/lib/sysdep/arch/ia32/ia32.h:31:3: error: #error "including ia32.h without ARCH_IA32=1"
Decompose.cpp
make[1]: *** [obj/lowlevel_Debug/ia32.o] Error 1
make: *** [lowlevel] Error 2

comment:12 by Kieran P, 14 years ago

Owner: Andrew removed
Status: reopenednew

comment:13 by fabio, 13 years ago

r8684 may have fixed this.

comment:14 by Kimball, 13 years ago

Resolution: fixed
Status: newclosed

I'm not sure what exact revision solved this issue, but with a quick edit to premake.lua and removing Atlas from the compilation process (as it doesn't run on OSX just yet), Philip was able to walk me through the issues that remained. The game does build and run on whatever hardware/software that was getting in the way before.

Note: See TracTickets for help on using tickets.