Ticket #535 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

Build errors on OS X 10.6

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

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

comment:1 Changed 3 years ago by anonymous

  • Milestone Unclassified deleted

Milestone Unclassified deleted

comment:2 Changed 3 years ago by wacko

  • Owner set to wacko
  • Milestone set to OS Alpha 2

comment:3 Changed 3 years ago by wacko

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 Changed 3 years ago by k776

  • Milestone changed from OS Alpha 2 to OS Alpha 3

comment:5 Changed 3 years ago by wacko

  • Status changed from new to closed
  • Resolution set to worksforme

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 Changed 3 years ago by k776

  • Milestone changed from Alpha 3 to Alpha 2

comment:7 Changed 3 years ago by Kimball

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 Changed 3 years ago by wacko

you do not have cmake installed it looks like

http://www.cmake.org/

download that and rerun the .sh file

comment:9 Changed 3 years ago by Kimball

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 Changed 3 years ago by Philip

  • Status changed from closed to reopened
  • Resolution worksforme deleted

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 Changed 3 years ago by Kimball

  • Milestone changed from Alpha 2 to Alpha 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 Changed 3 years ago by k776

  • Owner wacko deleted
  • Status changed from reopened to new

comment:13 Changed 2 years ago by fabio

r8684 may have fixed this.

comment:14 Changed 2 years ago by Kimball

  • Status changed from new to closed
  • Resolution set to fixed

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.