Chakakhan Posted July 3, 2011 Report Share Posted July 3, 2011 Hi Yves, good job on the scripts!The game was failing at run-time due to the the DELAYLOAD linker directive - it didn't like it. It caused OpenGL to fail on three different machines and on win7 and xp all with current drivers. I commented this out and it works now.I also commented out the extra_checks flag as it was throwing exceptions about casting down to smaller types all over the place.I attached a zip file in the same format as your previous one, so it can be installed in the same way, just copy it right over the existing files.There is no testgen project in the solution right now, but I see the code for it in the premake script. I will take a look at why it is not creating the project for it.premake4-v2.zip Quote Link to comment Share on other sites More sharing options...
Yves Posted July 3, 2011 Author Report Share Posted July 3, 2011 (edited) Thank you for the feedback and the changes!There's no testgen project anymore. I'm invoking cxxtestgen from prebuild-commands and/or customized code for creating the projectfiles (look in premake4/src/actions).EDIT: I've attached the "vanilla"-premake I was using (had to add .txt to be able to upload).You can check what I've changed by making filediffs if you would like to know the details (e.g. diff -uNB --strip-trailing-cr file_original file_new).EDIT2: Also look at the know-issues, especially number one in this post.premake-stable-fc0374a03b17.tar.bz2.txt Edited July 3, 2011 by Yves Quote Link to comment Share on other sites More sharing options...
Yves Posted July 10, 2011 Author Report Share Posted July 10, 2011 I've attached a patch which fixes errors when compiling atlas on osx with the version of wxwidgets provided by macports.Some functions don't yet support std::wstring as parameters in this version.I can compile now, but I can't link because a 64bit version of wxwidgets is missing.It looks like we'll have to add support for wxwidgets 2.9 for getting 64bit support. Simply setting arch=x86 in premake4.lua as a workaround doesn't work either because a lot of dependencies do their own architecture detection.atlas_patch.txt Quote Link to comment Share on other sites More sharing options...
Chakakhan Posted July 10, 2011 Report Share Posted July 10, 2011 Hi Yves, did you merge my changes for Visual Studio in with your patch? Quote Link to comment Share on other sites More sharing options...
Yves Posted July 11, 2011 Author Report Share Posted July 11, 2011 (edited) Hi Yves, did you merge my changes for Visual Studio in with your patch?It's a patch for the c++ sourcecode and isn't related to premake.Btw: I'll be on holiday the next three weeks starting next tuesday, so I won't be available in this time. Edited July 11, 2011 by Yves Quote Link to comment Share on other sites More sharing options...
Chakakhan Posted July 11, 2011 Report Share Posted July 11, 2011 I was referring to your premake patch you attached earlier . Quote Link to comment Share on other sites More sharing options...
Yves Posted July 11, 2011 Author Report Share Posted July 11, 2011 I was referring to your premake patch you attached earlier .Hmm did I post a patch after yours? Am I getting forgetful or did you mean this post? It's not a patch, just the original version of premake I was using. The version you can download from the homepage is not the most current stable version and the most current one from bitbucket is newer than the version I was using.If you check the differences from this version to the one I've customized, you can see what I have changed. Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted July 15, 2011 Report Share Posted July 15, 2011 I committed stuff now. Run update-workspaces-new.bat / update-workspaces-new.sh and otherwise it should be pretty much the same as normal. (One difference is that Unix builds default to release mode now, and you have to run "make config=debug" if you want debug mode). (I'll rename update-workspaces-new back to update-workspaces once it's been tested enough). It seems to work for me on Linux, and with VS2008 on Windows (though I haven't tested Atlas); further testing would be appreciated, particularly on OS X and VS2010. Quote Link to comment Share on other sites More sharing options...
Yves Posted July 16, 2011 Author Report Share Posted July 16, 2011 (edited) Thank you Philip! I'm glad it's committed now .EDIT: Btw. here are some tickets related to the update:1. Ticket #404 Makefile build system should have pyrogenesis/test targets depend on ColladaStatus: It seems there's still no solution for this, but there's an existing feature-request for premake.2. Ticket #428 Generated makefiles should not try to run wrong premakeStatus: I think this was already fixed in the most recent version of premake3, but definitely now with premake4. Can be closed.3. Ticket #713 Update premake for Xcode use Edited July 16, 2011 by Yves Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted July 18, 2011 Report Share Posted July 18, 2011 Encountered a new bug: makefile dependency tracking broken for PCH Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted July 19, 2011 Report Share Posted July 19, 2011 I'm exploring the xcode support (on 10.6.6 OS X). Interesting notes so far:It won't compile with PCH enabled because there's a relative path issue - it can't find precompiled.h so the build failsRunning update-workspaces-new.sh using the --without-pch option allows the build to continuesource/lib/sysdep/arch/x86_64/topology.cpp fails to compile due to std::bitset not being defined. So I included <bitset> instead of <set> and it compiled, hopefully this works on other platforms?There's a lot of annoying Boost warnings like these, but which don't seem to affect the build:/opt/local/include/boost/mpl/has_xxx.hpp:344:0 /opt/local/include/boost/mpl/has_xxx.hpp:344:9: warning: "BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION" is not defined/opt/local/include/boost/mpl/has_xxx.hpp:357:0 /opt/local/include/boost/mpl/has_xxx.hpp:357:9: warning: "BOOST_MPL_HAS_XXX_NO_WRAPPED_TYPES" is not defined/opt/local/include/boost/mpl/has_xxx.hpp:386:0 /opt/local/include/boost/mpl/has_xxx.hpp:386:9: warning: "BOOST_MPL_HAS_XXX_NO_EXPLICIT_TEST_FUNCTION" is not defined/opt/local/include/boost/mpl/has_xxx.hpp:459:0 /opt/local/include/boost/mpl/has_xxx.hpp:459:8: warning: "BOOST_MPL_HAS_XXX_NEEDS_TEMPLATE_SFINAE" is not defined/opt/local/include/boost/detail/container_fwd.hpp:71:0 /opt/local/include/boost/detail/container_fwd.hpp:71:9: warning: "BOOST_CLANG" is not definedNext I ran into a few problems:I get a fatal error from nasm about unrecognized output format 'macho64', which is strange but led me to this ticket (I'm running the 64-bit kernel)PhaseScriptExecution ../../../source/lib/sysdep/arch/amd64/amd64_asm.asmcd /Users/ben/0ad/build/workspaces/xcode3setenv ACTION buildsetenv ALTERNATE_GROUP staffsetenv ALTERNATE_MODE u+w,go-w,a+rXsetenv ALTERNATE_OWNER bensetenv ALWAYS_SEARCH_USER_PATHS NOsetenv APPLE_INTERNAL_DEVELOPER_DIR /AppleInternal/Developersetenv APPLE_INTERNAL_DIR /AppleInternalsetenv APPLE_INTERNAL_DOCUMENTATION_DIR /AppleInternal/Documentationsetenv APPLE_INTERNAL_LIBRARY_DIR /AppleInternal/Librarysetenv APPLE_INTERNAL_TOOLS /AppleInternal/Developer/Toolssetenv APPLY_RULES_IN_COPY_FILES NOsetenv ARCHS x86_64setenv ARCHS_STANDARD_32_64_BIT "x86_64 i386"setenv ARCHS_STANDARD_32_BIT i386setenv ARCHS_STANDARD_64_BIT x86_64setenv BUILD_COMPONENTS "headers build"setenv BUILD_DIR /Users/ben/0ad/build/workspaces/xcode3/../../../binaries/systemsetenv BUILD_ROOT /Users/ben/0ad/build/workspaces/xcode3/../../../binaries/systemsetenv BUILD_STYLE Releasesetenv BUILD_VARIANTS normalsetenv BUILT_PRODUCTS_DIR ../../../binaries/systemsetenv CACHE_ROOT /var/folders/Zm/ZmwMaQ8yEtKxnaAD0zWSBE+++TI/-Caches-/com.apple.Xcode.501setenv CCHROOT /var/folders/Zm/ZmwMaQ8yEtKxnaAD0zWSBE+++TI/-Caches-/com.apple.Xcode.501setenv CHMOD /bin/chmodsetenv CHOWN /usr/sbin/chownsetenv CLASS_FILE_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/JavaClassessetenv CLEAN_PRECOMPS YESsetenv CLONE_HEADERS NOsetenv CODESIGNING_FOLDER_PATH ../../../binaries/system/liblowlevel.asetenv CODE_SIGNING_ALLOWED NOsetenv COMPOSITE_SDK_DIRS /var/folders/Zm/ZmwMaQ8yEtKxnaAD0zWSBE+++TI/-Caches-/com.apple.Xcode.501/CompositeSDKssetenv CONFIGURATION Releasesetenv CONFIGURATION_BUILD_DIR ../../../binaries/systemsetenv CONFIGURATION_TEMP_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Releasesetenv COPYING_PRESERVES_HFS_DATA NOsetenv COPY_PHASE_STRIP NOsetenv COPY_RESOURCES_FROM_STATIC_FRAMEWORKS YESsetenv CP /bin/cpsetenv CURRENT_ARCH x86_64setenv CURRENT_VARIANT normalsetenv DEAD_CODE_STRIPPING NOsetenv DEBUGGING_SYMBOLS YESsetenv DEBUG_INFORMATION_FORMAT dwarfsetenv DEPLOYMENT_LOCATION NOsetenv DEPLOYMENT_POSTPROCESSING NOsetenv DERIVED_FILES_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/DerivedSourcessetenv DERIVED_FILE_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/DerivedSourcessetenv DERIVED_SOURCES_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/DerivedSourcessetenv DEVELOPER_APPLICATIONS_DIR /Developer/Applicationssetenv DEVELOPER_BIN_DIR /Developer/usr/binsetenv DEVELOPER_DIR /Developersetenv DEVELOPER_FRAMEWORKS_DIR /Developer/Library/Frameworkssetenv DEVELOPER_FRAMEWORKS_DIR_QUOTED "\"/Developer/Library/Frameworks\""setenv DEVELOPER_LIBRARY_DIR /Developer/Librarysetenv DEVELOPER_SDK_DIR /Developer/SDKssetenv DEVELOPER_TOOLS_DIR /Developer/Toolssetenv DEVELOPER_USR_DIR /Developer/usrsetenv DEVELOPMENT_LANGUAGE Englishsetenv DO_HEADER_SCANNING_IN_JAM NOsetenv DSTROOT /tmp/lowlevel.dstsetenv DWARF_DSYM_FILE_NAME liblowlevel.a.dSYMsetenv DWARF_DSYM_FOLDER_PATH ../../../binaries/systemsetenv ENABLE_HEADER_DEPENDENCIES YESsetenv ENABLE_OPENMP_SUPPORT NOsetenv EXCLUDED_INSTALLSRC_SUBDIRECTORY_PATTERNS ".svn .git CVS"setenv EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES "*.nib *.lproj *.framework *.gch (*) CVS .svn .git *.xcodeproj *.xcode *.pbproj *.pbxproj"setenv EXECUTABLE_EXTENSION asetenv EXECUTABLE_NAME liblowlevel.asetenv EXECUTABLE_PATH liblowlevel.asetenv EXECUTABLE_PREFIX libsetenv EXECUTABLE_SUFFIX .asetenv FILE_LIST /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/Objects/LinkFileListsetenv FIXED_FILES_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/FixedFilessetenv FRAMEWORK_FLAG_PREFIX -frameworksetenv FRAMEWORK_SEARCH_PATHS "\"../../../binaries/system\" "setenv FRAMEWORK_VERSION Asetenv FULL_PRODUCT_NAME liblowlevel.asetenv GCC3_VERSION 3.3setenv GCC_C_LANGUAGE_STANDARD gnu99setenv GCC_DYNAMIC_NO_PIC NOsetenv GCC_ENABLE_SYMBOL_SEPARATION NOsetenv GCC_MODEL_TUNING G5setenv GCC_OPTIMIZATION_LEVEL 3setenv GCC_PFE_FILE_C_DIALECTS "c objective-c c++ objective-c++"setenv GCC_PREPROCESSOR_DEFINITIONS "NDEBUG CONFIG_FINAL=1 LIB_STATIC_LINK"setenv GCC_SYMBOLS_PRIVATE_EXTERN NOsetenv GCC_TREAT_WARNINGS_AS_ERRORS NOsetenv GCC_VERSION 4.2setenv GCC_VERSION_IDENTIFIER __2setenv GCC_WARN_ABOUT_RETURN_TYPE YESsetenv GCC_WARN_UNUSED_VARIABLE YESsetenv GENERATE_MASTER_OBJECT_FILE NOsetenv GENERATE_PKGINFO_FILE NOsetenv GENERATE_PROFILING_CODE NOsetenv GID 20setenv GROUP staffsetenv HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT YESsetenv HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES YESsetenv HEADERMAP_INCLUDES_NONPUBLIC_NONPRIVATE_HEADERS YESsetenv HEADERMAP_INCLUDES_PROJECT_HEADERS YESsetenv HEADER_SEARCH_PATHS "\"../../../binaries/system/include\" /usr/X11R6/include/X11 /usr/X11R6/include /usr/include/X11 ../../../source/pch/lowlevel ../../../source ../../../libraries/valgrind/include ../../../libraries/cxxtest/include /opt/local/include"setenv ICONV /usr/bin/iconvsetenv INFOPLIST_EXPAND_BUILD_SETTINGS YESsetenv INFOPLIST_OUTPUT_FORMAT same-as-inputsetenv INFOPLIST_PREPROCESS NOsetenv INPUT_FILE_BASE amd64_asmsetenv INPUT_FILE_DIR /Users/ben/0ad/build/workspaces/xcode3/../../../source/lib/sysdep/arch/amd64setenv INPUT_FILE_NAME amd64_asm.asmsetenv INPUT_FILE_PATH /Users/ben/0ad/build/workspaces/xcode3/../../../source/lib/sysdep/arch/amd64/amd64_asm.asmsetenv INPUT_FILE_REGION_PATH_COMPONENTsetenv INPUT_FILE_SUFFIX .asmsetenv INSTALL_DIR /tmp/lowlevel.dst/usr/local/libsetenv INSTALL_GROUP staffsetenv INSTALL_MODE_FLAG u+w,go-w,a+rXsetenv INSTALL_OWNER bensetenv INSTALL_PATH /usr/local/libsetenv INSTALL_ROOT /tmp/lowlevel.dstsetenv JAVAC_DEFAULT_FLAGS "-J-Xms64m -J-XX:NewSize=4M -J-Dfile.encoding=UTF8"setenv JAVA_APP_STUB /System/Library/Frameworks/JavaVM.framework/Resources/MacOS/JavaApplicationStubsetenv JAVA_ARCHIVE_CLASSES YESsetenv JAVA_ARCHIVE_TYPE JARsetenv JAVA_COMPILER /usr/bin/javacsetenv JAVA_FRAMEWORK_RESOURCES_DIRS Resourcessetenv JAVA_JAR_FLAGS cvsetenv JAVA_SOURCE_SUBDIR .setenv JAVA_USE_DEPENDENCIES YESsetenv JAVA_ZIP_FLAGS -urgsetenv JIKES_DEFAULT_FLAGS "+E +OLDCSO"setenv KEEP_PRIVATE_EXTERNS NOsetenv LD_GENERATE_MAP_FILE NOsetenv LD_MAP_FILE_PATH /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/lowlevel-LinkMap-normal-x86_64.txtsetenv LD_OPENMP_FLAGS -fopenmpsetenv LEX /Developer/usr/bin/lexsetenv LIBRARY_FLAG_NOSPACE YESsetenv LIBRARY_FLAG_PREFIX -lsetenv LIBRARY_SEARCH_PATHS "\"../../../binaries/system\" ../../../binaries/system /usr/X11R6/lib /opt/local/lib"setenv LINKER_DISPLAYS_MANGLED_NAMES NOsetenv LINK_FILE_LIST_normal_x86_64 /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/Objects-normal/x86_64/lowlevel.LinkFileListsetenv LINK_WITH_STANDARD_LIBRARIES YESsetenv LOCAL_ADMIN_APPS_DIR /Applications/Utilitiessetenv LOCAL_APPS_DIR /Applicationssetenv LOCAL_DEVELOPER_DIR /Library/Developersetenv LOCAL_LIBRARY_DIR /Librarysetenv MACH_O_TYPE staticlibsetenv MAC_OS_X_PRODUCT_BUILD_VERSION 10J567setenv MAC_OS_X_VERSION_ACTUAL 1066setenv MAC_OS_X_VERSION_MAJOR 1060setenv MAC_OS_X_VERSION_MINOR 0606setenv NATIVE_ARCH i386setenv NATIVE_ARCH_32_BIT i386setenv NATIVE_ARCH_64_BIT x86_64setenv NATIVE_ARCH_ACTUAL x86_64setenv NO_COMMON YESsetenv OBJECT_FILE_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/Objectssetenv OBJECT_FILE_DIR_normal /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/Objects-normalsetenv OBJROOT /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Releasesetenv ONLY_ACTIVE_ARCH NOsetenv OPTIMIZATION_LEVEL 0setenv OS MACOSsetenv OSAC /usr/bin/osacompilesetenv OTHER_CFLAGS "-Wno-switch -Wno-reorder -Wno-invalid-offsetof -Wextra -Wno-missing-field-initializers -Wunused-parameter -Wredundant-decls -Wnon-virtual-dtor -Wundef -fstack-protector-all -D_FORTIFY_SOURCE=2 -fstrict-aliasing -fpch-preprocess -msse -fno-omit-frame-pointer -msse2 -fvisibility=hidden -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE"setenv OTHER_CPLUSPLUSFLAGS "-Wno-switch -Wno-reorder -Wno-invalid-offsetof -Wextra -Wno-missing-field-initializers -Wunused-parameter -Wredundant-decls -Wnon-virtual-dtor -Wundef -fstack-protector-all -D_FORTIFY_SOURCE=2 -fstrict-aliasing -fpch-preprocess -msse -fno-omit-frame-pointer -msse2 -fvisibility=hidden -I/opt/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE"setenv OTHER_INPUT_FILE_FLAGSsetenv PACKAGE_TYPE com.apple.package-type.static-librarysetenv PASCAL_STRINGS YESsetenv PATH_PREFIXES_EXCLUDED_FROM_HEADER_DEPENDENCIES "/usr/include /usr/local/include /System/Library/Frameworks /System/Library/PrivateFrameworks /Developer/Headers /Developer/SDKs /Developer/Platforms"setenv PFE_FILE_C_DIALECTS c++setenv PKGINFO_FILE_PATH /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/PkgInfosetenv PLATFORM_DEVELOPER_APPLICATIONS_DIR /Developer/Applicationssetenv PLATFORM_DEVELOPER_BIN_DIR /Developer/usr/binsetenv PLATFORM_DEVELOPER_LIBRARY_DIR /Developer/Librarysetenv PLATFORM_DEVELOPER_SDK_DIR /Developer/SDKssetenv PLATFORM_DEVELOPER_TOOLS_DIR /Developer/Toolssetenv PLATFORM_DEVELOPER_USR_DIR /Developer/usrsetenv PLATFORM_NAME macosxsetenv PLATFORM_PRODUCT_BUILD_VERSION 10M2518setenv PLIST_FILE_OUTPUT_FORMAT same-as-inputsetenv PREBINDING NOsetenv PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR YESsetenv PRECOMP_DESTINATION_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/PrefixHeaderssetenv PRESERVE_DEAD_CODE_INITS_AND_TERMS NOsetenv PRIVATE_HEADERS_FOLDER_PATH /usr/local/includesetenv PRODUCT_NAME lowlevelsetenv PRODUCT_SETTINGS_PATHsetenv PRODUCT_TYPE com.apple.product-type.library.staticsetenv PROFILING_CODE NOsetenv PROJECT lowlevelsetenv PROJECT_DERIVED_FILE_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/DerivedSourcessetenv PROJECT_DIR /Users/ben/0ad/build/workspaces/xcode3setenv PROJECT_FILE_PATH /Users/ben/0ad/build/workspaces/xcode3/lowlevel.xcodeprojsetenv PROJECT_NAME lowlevelsetenv PROJECT_TEMP_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.buildsetenv PUBLIC_HEADERS_FOLDER_PATH /usr/local/includesetenv RECURSIVE_SEARCH_PATHS_FOLLOW_SYMLINKS YESsetenv REMOVE_CVS_FROM_RESOURCES YESsetenv REMOVE_GIT_FROM_RESOURCES YESsetenv REMOVE_SVN_FROM_RESOURCES YESsetenv REZ_COLLECTOR_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/ResourceManagerResourcessetenv REZ_EXECUTABLE YESsetenv REZ_OBJECTS_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/ResourceManagerResources/Objectssetenv REZ_SEARCH_PATHS "\"../../../binaries/system\" "setenv RUN_CLANG_STATIC_ANALYZER NOsetenv SCAN_ALL_SOURCE_FILES_FOR_INCLUDES NOsetenv SCRIPT_INPUT_FILE /Users/ben/0ad/build/workspaces/xcode3/../../../source/lib/sysdep/arch/amd64/amd64_asm.asmsetenv SCRIPT_OUTPUT_FILE_0 /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/DerivedSources/amd64_asm.osetenv SCRIPT_OUTPUT_FILE_COUNT 1setenv SDKROOTsetenv SDK_PRODUCT_BUILD_VERSION 10J567setenv SED /usr/bin/sedsetenv SEPARATE_STRIP YESsetenv SEPARATE_SYMBOL_EDIT NOsetenv SET_DIR_MODE_OWNER_GROUP YESsetenv SET_FILE_MODE_OWNER_GROUP NOsetenv SHARED_DERIVED_FILE_DIR ../../../binaries/system/DerivedSourcessetenv SHARED_PRECOMPS_DIR /var/folders/Zm/ZmwMaQ8yEtKxnaAD0zWSBE+++TI/-Caches-/com.apple.Xcode.501/SharedPrecompiledHeaderssetenv SKIP_INSTALL NOsetenv SOURCE_ROOT /Users/ben/0ad/build/workspaces/xcode3setenv SRCROOT /Users/ben/0ad/build/workspaces/xcode3setenv STANDARD_C_PLUS_PLUS_LIBRARY_TYPE dynamicsetenv STRINGS_FILE_OUTPUT_ENCODING UTF-16setenv STRIP_INSTALLED_PRODUCT YESsetenv STRIP_STYLE debuggingsetenv SYMBOL_REPOSITORY_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.build/SymbolRepositoriessetenv SYMROOT /Users/ben/0ad/build/workspaces/xcode3/../../../binaries/systemsetenv SYSTEM_ADMIN_APPS_DIR /Applications/Utilitiessetenv SYSTEM_APPS_DIR /Applicationssetenv SYSTEM_CORE_SERVICES_DIR /System/Library/CoreServicessetenv SYSTEM_DEMOS_DIR /Applications/Extrassetenv SYSTEM_DEVELOPER_APPS_DIR /Developer/Applicationssetenv SYSTEM_DEVELOPER_BIN_DIR /Developer/usr/binsetenv SYSTEM_DEVELOPER_DEMOS_DIR "/Developer/Applications/Utilities/Built Examples"setenv SYSTEM_DEVELOPER_DIR /Developersetenv SYSTEM_DEVELOPER_DOC_DIR "/Developer/ADC Reference Library"setenv SYSTEM_DEVELOPER_GRAPHICS_TOOLS_DIR "/Developer/Applications/Graphics Tools"setenv SYSTEM_DEVELOPER_JAVA_TOOLS_DIR "/Developer/Applications/Java Tools"setenv SYSTEM_DEVELOPER_PERFORMANCE_TOOLS_DIR "/Developer/Applications/Performance Tools"setenv SYSTEM_DEVELOPER_RELEASENOTES_DIR "/Developer/ADC Reference Library/releasenotes"setenv SYSTEM_DEVELOPER_TOOLS /Developer/Toolssetenv SYSTEM_DEVELOPER_TOOLS_DOC_DIR "/Developer/ADC Reference Library/documentation/DeveloperTools"setenv SYSTEM_DEVELOPER_TOOLS_RELEASENOTES_DIR "/Developer/ADC Reference Library/releasenotes/DeveloperTools"setenv SYSTEM_DEVELOPER_USR_DIR /Developer/usrsetenv SYSTEM_DEVELOPER_UTILITIES_DIR /Developer/Applications/Utilitiessetenv SYSTEM_DOCUMENTATION_DIR /Library/Documentationsetenv SYSTEM_LIBRARY_DIR /System/Librarysetenv TARGETNAME lowlevelsetenv TARGET_BUILD_DIR ../../../binaries/systemsetenv TARGET_NAME lowlevelsetenv TARGET_TEMP_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.buildsetenv TEMP_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.buildsetenv TEMP_FILES_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.buildsetenv TEMP_FILE_DIR /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Release/lowlevel.buildsetenv TEMP_ROOT /Users/ben/0ad/build/workspaces/xcode3/obj/lowlevel_Releasesetenv UID 501setenv UNSTRIPPED_PRODUCT NOsetenv USER bensetenv USER_APPS_DIR /Users/ben/Applicationssetenv USER_LIBRARY_DIR /Users/ben/Librarysetenv USE_DYNAMIC_NO_PIC YESsetenv USE_HEADERMAP YESsetenv USE_HEADER_SYMLINKS NOsetenv VALIDATE_PRODUCT NOsetenv VALID_ARCHS "i386 ppc ppc64 ppc7400 ppc970 x86_64"setenv VERBOSE_PBXCP NOsetenv VERSION_INFO_BUILDER bensetenv VERSION_INFO_FILE lowlevel_vers.csetenv VERSION_INFO_STRING "\"@(#)PROGRAM:lowlevel PROJECT:lowlevel-\""setenv WARNING_CFLAGS -Wallsetenv XCODE_APP_SUPPORT_DIR /Developer/Library/Xcodesetenv XCODE_PRODUCT_BUILD_VERSION 10M2518setenv XCODE_VERSION_ACTUAL 0400setenv XCODE_VERSION_MAJOR 0400setenv XCODE_VERSION_MINOR 0400setenv YACC /Developer/usr/bin/yacc/bin/sh -c "nasm -D OS_UNIX=1 -i${INPUT_FILE_DIR}/ -f macho64 ${INPUT_FILE_PATH} -o ${DERIVED_FILES_DIR}/${INPUT_FILE_BASE}.o"nasm: fatal: unrecognised output format `macho64' - use -hf for a listtype `nasm -h' for helpCommand /bin/sh failed with exit code 1I tried upgrading nasm through MacPorts but already have the latest port (2.09.09)In the process I upgraded all outdated ports. Boost was upgraded from @1.46.1_0 to @1.47.0_0 but this seems to have broken the build badly (many errors about random::rand48 being re-declared), so I had to revert back to 1.46. Safe to say, 1.47 should not be used until that's fixed. If you upgrade by accident, try "sudo port activate boost @1.46.1_0" or install it as needed.[*]And finally a linker error due to the above error in liblowlevel (but why would the build process continue?)Ld ../../../binaries/system/pyrogenesis.app/Contents/MacOS/pyrogenesis normal x86_64cd /Users/ben/0ad/build/workspaces/xcode3/Developer/usr/bin/g++-4.2 -arch x86_64 -L../../../binaries/system -L../../../binaries/system -L/usr/X11R6/lib -L../../../libraries/spidermonkey/lib -L../../../libraries/cxxtest/lib -L../../../libraries/enet/lib -L../../../libraries/valgrind/lib -L../../../libraries/nvtt/lib -L/opt/local/lib -F../../../binaries/system -filelist /Users/ben/0ad/build/workspaces/xcode3/obj/pyrogenesis_Release/pyrogenesis.build/Objects-normal/x86_64/pyrogenesis.LinkFileList -ljpeg -lpng -lz -lmozjs185-ps-release -lvorbisfile -lboost_signals-mt -lboost_filesystem-mt -lboost_system-mt -lenet -lcurl -lnvcore -lnvmath -lnvimage -lnvtt -lpthread -framework OpenGL -L/opt/local/lib -lSDLmain -lSDL -framework Cocoa -L/opt/local/lib -lxml2 -framework OpenAL /Users/ben/0ad/binaries/system/libmocks_real.a /Users/ben/0ad/binaries/system/libnetwork.a /Users/ben/0ad/binaries/system/libsimulation2.a /Users/ben/0ad/binaries/system/libscriptinterface.a /Users/ben/0ad/binaries/system/libengine.a /Users/ben/0ad/binaries/system/libgraphics.a /Users/ben/0ad/binaries/system/libatlas.a /Users/ben/0ad/binaries/system/libgui.a /Users/ben/0ad/binaries/system/liblowlevel.a -o ../../../binaries/system/pyrogenesis.app/Contents/MacOS/pyrogenesisi686-apple-darwin10-g++-4.2.1: /Users/ben/0ad/binaries/system/liblowlevel.a: No such file or directoryCommand /Developer/usr/bin/g++-4.2 failed with exit code 1 Quote Link to comment Share on other sites More sharing options...
janwas Posted July 19, 2011 Report Share Posted July 19, 2011 source/lib/sysdep/arch/x86_64/topology.cpp fails to compile due to std::bitset not being defined. So I included <bitset> instead of <set> and it compiled, hopefullyhm, Philip had already fixed this one by adding <bitset>.I think <set> is no longer needed (there's certainly no std::set in there), so replacing <set> should be fine.Unfortunately I can't help with the nasm problem, except to indicate that we're really close to stomping out the last of the asm.I've been discussing this with Philip and the best guess at something GCC-palatable is:#define __cpuid(level, index, a, b, c, d) \ __asm__ ("cpuid\n\t" \ : "=a" (a), "=b" (, "=c" (c), "=d" (d) \ : "0" (level), "2" (index))This would be inserted into static void cpuid #if !HAVE_CPUIDEX, replacing the two asm calls.level is the initial value of regs->eax, index is regs->ecx, and a,b,c,d are the output values that are to be written to regs->eax,ebx etc.Would you like to give that a try?If that compiles despite GCC -fPIC, then we're golden. Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted July 19, 2011 Report Share Posted July 19, 2011 Well this is funny, I ran nasm manually on the command line and then tried building again and it succeeded (using the environment vars from the above error message). I wonder if there's something it doesn't like about the format of that string, maybe extra whitespace somewhere? Or more likely something in the environment that breaks it but what...hm, Philip had already fixed this one by adding <bitset>.I think <set> is no longer needed (there's certainly no std::set in there), so replacing <set> should be fine.Ah you're right, but somehow that wasn't updated even though I have the latest revision O.oUnfortunately I can't help with the nasm problem, except to indicate that we're really close to stomping out the last of the asm.I've been discussing this with Philip and the best guess at something GCC-palatable is:#define __cpuid(level, index, a, b, c, d) \ __asm__ ("cpuid\n\t" \ : "=a" (a), "=b" (, "=c" (c), "=d" (d) \ : "0" (level), "2" (index))This would be inserted into static void cpuid #if !HAVE_CPUIDEX, replacing the two asm calls.level is the initial value of regs->eax, index is regs->ecx, and a,b,c,d are the output values that are to be written to regs->eax,ebx etc.Would you like to give that a try?If that compiles despite GCC -fPIC, then we're golden.Umm I'll need a while to digest this, but sure I'll try it Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted July 19, 2011 Report Share Posted July 19, 2011 Like this? If so, it did compile.static void cpuid(x86_x64_CpuidRegs* regs){#if HAVE_CPUIDEX cassert(sizeof(regs->eax) == sizeof(int)); cassert(sizeof(*regs) == 4*sizeof(int)); __cpuidex((int*)regs, regs->eax, regs->ecx);#else #define __cpuid(level, index, a, b, c, d) \ __asm__ ("cpuid\n\t" \ : "=a" (a), "=b" (, "=c" ©, "=d" (d) \ : "0" (level), "2" (index))#endif} Quote Link to comment Share on other sites More sharing options...
Yves Posted July 19, 2011 Author Report Share Posted July 19, 2011 (edited) The nasm-problem is a known issue and should be documented in the build instructions.XCode ships with an older version of nasm which does not support the macho64 flag.I've solved it on my system by replacing the nasm-binary of Xcode with a symbolic link to the newer one installed via macports.I'm not sure if that's a good solution though.EDIT:I can't reproduce ticket # 903.When I change something, it rebuilds the file. Did somebody already fix it?Ah I see, It's only when running make scriptinterface. It rebuilds properly if you just run make. Edited July 19, 2011 by Yves Quote Link to comment Share on other sites More sharing options...
janwas Posted July 19, 2011 Report Share Posted July 19, 2011 Like this? If so, it did compile.We still need to add the actual macro invocation.I'd suggest replacing the HAVE_CPUIDEX block with#if defined(_MSC_FULL_VER) && _MSC_FULL_VER >= 150030729// VC10+ and VC9 SP1: __cpuidex is already available#elif GCC_VERSION# define __cpuidex(regsArray, level, index)\ __asm__ ("cpuid\n\t"\ : "=a" (regsArray[0]), "=b" (regsArray[1]), "=c" (regsArray[2]), "=d" (regsArray[3])\ : "0" (level), "2" (index))#else# error "compiler not supported"#endifNow cpuid() can just invoke __cpuidex without the need for any additional #if faff.Does that work? *drumroll* Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted July 19, 2011 Report Share Posted July 19, 2011 Like this?Not with the capital B and copyright symbol like that I can't reproduce ticket # 903.When I change something, it rebuilds the file. Did somebody already fix it?Ah I see, It's only when running make scriptinterface. It rebuilds properly if you just run make.If I add a #error then run "make -k", it only recompiles (and fails for) mocks_*.cpp and status.cpp, it doesn't try rebuilding the .gch files or anything that depends on them (which it should). Quote Link to comment Share on other sites More sharing options...
Yves Posted July 19, 2011 Author Report Share Posted July 19, 2011 (edited) If I add a #error then run "make -k", it only recompiles (and fails for) mocks_*.cpp and status.cpp, it doesn't try rebuilding the .gch files or anything that depends on them (which it should).Yes I've found the problem and I'm fixing it.EDIT:A patch is attached.Please test it because I didn't have much time for tests.It fixes ticket #903 and adds a command to clean-workspaces.sh for cleaning the premake4 environment.For testing don't forget to run clean-workspaces.sh.Question: Why do you even have a precompiled.cpp file? Shouldn't precompiled.h be sufficient?patch_pch_clean-workspaces.txt Edited July 19, 2011 by Yves Quote Link to comment Share on other sites More sharing options...
Yves Posted July 19, 2011 Author Report Share Posted July 19, 2011 (edited) I'm exploring the xcode support (on 10.6.6 OS X). Interesting notes so far:...It won't compile with PCH enabled because there's a relative path issue - it can't find precompiled.h so the build fails...Changing the type of pchheader from "string" to "path" in api.lua fixes the problem.I'm wondering why premake uses "path" for pchsource and "string" for pchheader.I'm going to integrate this change into the patch from the last post and add it as an attachment to this post.EDIT: Done, the new patch is up.patch_pch_clean-workspaces_v2.txt Edited July 19, 2011 by Yves Quote Link to comment Share on other sites More sharing options...
Ykkrosh Posted July 19, 2011 Report Share Posted July 19, 2011 Why do you even have a precompiled.cpp file? Shouldn't precompiled.h be sufficient?I think precompiled.cpp is needed when compiling with MSVC (since that's what generates the PCH file), but not needed with GCC (since the PCH is generated directly from the .h), so preferably the .cpp should be ignored when using GCC. Quote Link to comment Share on other sites More sharing options...
Yves Posted July 19, 2011 Author Report Share Posted July 19, 2011 I think precompiled.cpp is needed when compiling with MSVC (since that's what generates the PCH file), but not needed with GCC (since the PCH is generated directly from the .h), so preferably the .cpp should be ignored when using GCC.Well then my patch probably won't work on Windows.Changing pchheader from string to path also made some problems on linux. It looks like there's more testing and more work required... Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted July 19, 2011 Report Share Posted July 19, 2011 Honestly, I find it quite a success that the game could be compiled successfully in XCode with just those two changes: build without PCH and manually run nasm!The nasm-problem is a known issue and should be documented in the build instructions.XCode ships with an older version of nasm which does not support the macho64 flag.I've solved it on my system by replacing the nasm-binary of Xcode with a symbolic link to the newer one installed via macports.I'm not sure if that's a good solution thoughThat makes sense because the 64-bit OS X kernel is fairly new, surely they have fixed this for XCode 4? I could buy it from the App Store and see what fun awaits... I wouldn't call replacing XCode's binaries a good solution, maybe there's some setting or path variable we could override to force the newer MacPort nasm, assuming we still need it Quote Link to comment Share on other sites More sharing options...
Yves Posted July 19, 2011 Author Report Share Posted July 19, 2011 Honestly, I find it quite a success that the game could be compiled successfully in XCode with just those two changes: build without PCH and manually run nasm!Thank you!I could buy it from the App Store and see what fun awaits...Would be interesting to know. It only cost about 5$ if I remember correctly.I would have done it if I had a "real" mac .Ok I hope this is the last and successful try, version 3 of the patch.It's quickly tested on Linux, Mac and Windows... if I wasn't too tired and made mistakes .Further testing appreciated!patch_pch_clean-workspaces_v3.txt Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted July 19, 2011 Report Share Posted July 19, 2011 Now cpuid() can just invoke __cpuidex without the need for any additional #if faff.Does that work? *drumroll*Edit: Philip helped me with some things and it works now! Attaching system_info.txt to verify it does whatever it needs to do.system_info.txtAnd finally the patch for these changes:cpuid-patch.patch Quote Link to comment Share on other sites More sharing options...
historic_bruno Posted July 20, 2011 Report Share Posted July 20, 2011 Ok I hope this is the last and successful try, version 3 of the patch.It's quickly tested on Linux, Mac and Windows... if I wasn't too tired and made mistakes .Further testing appreciated!Tested your patch on OS X, both gcc and xcode3 projects are working with PCH now That leaves the xcode3 test project, which fails to build:/Users/ben/0ad/build/workspaces/xcode3/obj/test_Release/test.build/Script-9607AE1010C857E500CD1376.sh: line 58: ../../build/bin/cxxtestgen.pl: No such file or directory Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.