Problems Building 0.5.1.r1 on Mac OS 10.9

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).
Post Reply
daviewales
Atmospheric Pilot
Atmospheric Pilot
Posts: 1
Joined: Thu Apr 17, 2014 5:58 pm

Problems Building 0.5.1.r1 on Mac OS 10.9

Post by daviewales »

I'm trying to build 0.5.1.r1 on Mac OS 10.9. I'm using CMAKE, because it can find all the required libraries. I'm using gcc, rather than clang, because it sometimes helps things build when they don't want to.

cmake completes without error. However, make fails with the following error:

Code: Select all

/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/cmd/collide2/opcodetypes.h:177: error: conflicting declaration ‘typedef int64 intmax_t’
/usr/include/_types/_intmax_t.h:32: error: ‘intmax_t’ has a previous declaration as ‘typedef long int intmax_t’
Does anyone have any ideas?


This is the complete build log:

Code: Select all

vegastrike-src-0.5.1.r1$ mkdir build
vegastrike-src-0.5.1.r1$ cd build
build$ cmake ..
-- The C compiler identification is GNU 4.2.1
-- The CXX compiler identification is GNU 4.2.1
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler: /usr/bin/gcc-4.2
-- Check for working C compiler: /usr/bin/gcc-4.2 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Checking whether CXX compiler has -isysroot
-- Checking whether CXX compiler has -isysroot - yes
-- Checking whether CXX compiler supports OSX deployment target flag
-- Checking whether CXX compiler supports OSX deployment target flag - yes
-- Check for working CXX compiler: /usr/bin/g++-4.2
-- Check for working CXX compiler: /usr/bin/g++-4.2 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Found PythonLibs: /usr/lib/libpython2.7.dylib (found version "2.7.5") 
++ Using Internal Boost
-- Found OpenGL: /System/Library/Frameworks/OpenGL.framework  
++ OpenGL found : /System/Library/Frameworks/AGL.framework;/System/Library/Frameworks/OpenGL.framework
-- Found GLUT: -framework GLUT  
++ GLUT found : -framework GLUT;-framework Cocoa
-- Found OpenAL: /System/Library/Frameworks/OpenAL.framework  
++ Found OpenAL
-- Found SDL: /Library/Frameworks/SDL.framework;-framework Cocoa (found version "1.2.15") 
++ SDL Found
-- Found Vorbis: /usr/local/lib/libvorbis.dylib;/usr/local/lib/libvorbisfile.dylib;/usr/local/lib/libogg.dylib
-- Found JPEG: /usr/local/lib/libjpeg.dylib  
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.28") 
-- checking for module 'libpng'
--   found libpng, version 1.5.17
-- Found PNG: /usr/local/lib/libpng.dylib
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.5") 
-- Found EXPAT: /usr/local/lib/libexpat.dylib (found version "2.1.0") 
-- Found Math: /usr/lib/libm.dylib
-- checking for module 'libavcodec'
--   found libavcodec, version 55.52.102
-- checking for module 'libavformat'
--   found libavformat, version 55.33.100
-- checking for module 'libavutil'
--   found libavutil, version 52.66.100
-- checking for module 'libswscale'
--   found libswscale, version 2.5.102
-- Found FFmpeg: /usr/local/lib/libavcodec.dylib;/usr/local/lib/libavformat.dylib;/usr/local/lib/libavutil.dylib;swscale
++ FFmpeg's libswscale found.
-- checking for module 'OGRE>=1.2.0'
--   package 'OGRE>=1.2.0' not found
-- Ogre not found
-- Ogre Not Found: compiling without
-- Looking for wchar.h
-- Looking for wchar.h - found
-- Looking for float.h
-- Looking for float.h - found
-- Looking for wctype.h
-- Looking for wctype.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for zlib.h
-- Looking for zlib.h - found
-- Looking for math.h
-- Looking for math.h - found
-- Looking for C++ include tr1/unordered_map
-- Looking for C++ include tr1/unordered_map - found
-- Looking for gettimeofday
-- Looking for gettimeofday - found
-- Looking for isnan
-- Looking for isnan - found
-- Looking for finite
-- Looking for finite - found
-- Looking for sys/stat.h
-- Looking for sys/stat.h - found
-- Looking for lstat
-- Looking for lstat - found
-- Looking for GLX_ARB_get_proc_address
-- Looking for GLX_ARB_get_proc_address - not found
-- checking for module 'gtk+-2.0'
--   found gtk+-2.0, version 2.24.23
-- checking for module 'glib-2.0'
--   found glib-2.0, version 2.40.0
-- checking for module 'gmodule-2.0'
--   found gmodule-2.0, version 2.40.0
-- checking for module 'gdk-2.0'
--   found gdk-2.0, version 2.24.23
-- checking for module 'pango'
--   found pango, version 1.36.3
-- checking for module 'cairo'
--   found cairo, version 1.12.14
-- checking for module 'atk'
--   found atk, version 2.12.0
-- checking for module 'gdk-pixbuf-2.0'
--   found gdk-pixbuf-2.0, version 2.30.7
-- Found GTK2: /usr/local/lib/libgtk-x11-2.0.dylib;/usr/local/lib/libgdk-x11-2.0.dylib;/usr/local/lib/libgdk_pixbuf-2.0.dylib;/usr/local/lib/libgmodule-2.0.dylib;/usr/local/lib/libgthread-2.0.dylib;/usr/local/lib/libgobject-2.0.dylib;/usr/local/lib/libpango-1.0.dylib;/usr/local/lib/libpangocairo-1.0.dylib;/usr/local/lib/libatk-1.0.dylib
-- Compiling mesh_tool without OgreMesh support: Ogre not found
Default build type is Release, no cpu opts enabled. 
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/dwales/Downloads/vegastrike-src-0.5.1.r1/build
build$ make
Scanning dependencies of target OPcollide
[  0%] Building CXX object CMakeFiles/OPcollide.dir/src/cmd/collide2/Ice/IceAABB.o
In file included from /Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/cmd/collide2/Stdafx.h:20,
                 from /Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/cmd/collide2/Ice/Stdafx.h:1,
                 from /Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/cmd/collide2/Ice/IceAABB.cpp:21:
/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/cmd/collide2/opcodetypes.h:177: error: conflicting declaration ‘typedef int64 intmax_t’
/usr/include/_types/_intmax_t.h:32: error: ‘intmax_t’ has a previous declaration as ‘typedef long int intmax_t’
/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/cmd/collide2/opcodetypes.h:179: error: conflicting declaration ‘typedef uint64 uintmax_t’
/usr/include/_types/_uintmax_t.h:32: error: ‘uintmax_t’ has a previous declaration as ‘typedef long unsigned int uintmax_t’
In file included from /Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/gfx/vec.h:18,
                 from /Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/gfx/quaternion.h:4,
                 from /Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/cmd/collide2/opcodesysdef.h:28,
                 from /Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/cmd/collide2/Stdafx.h:21,
                 from /Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/cmd/collide2/Ice/Stdafx.h:1,
                 from /Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/cmd/collide2/Ice/IceAABB.cpp:21:
/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/endianness.h: In function ‘float VSSwapHostFloatToLittle(float)’:
/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/endianness.h:74: warning: ‘NXSwapHostLongToLittle’ is deprecated (declared at /usr/include/architecture/byte_order.h:349)
/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/endianness.h:74: warning: ‘NXSwapHostLongToLittle’ is deprecated (declared at /usr/include/architecture/byte_order.h:349)
/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/endianness.h: In function ‘unsigned int VSSwapHostIntToLittle(unsigned int)’:
/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/endianness.h:85: warning: ‘NXSwapHostLongToLittle’ is deprecated (declared at /usr/include/architecture/byte_order.h:349)
/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/endianness.h:85: warning: ‘NXSwapHostLongToLittle’ is deprecated (declared at /usr/include/architecture/byte_order.h:349)
/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/endianness.h: In function ‘short unsigned int VSSwapHostShortToLittle(short unsigned int)’:
/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/endianness.h:90: warning: ‘NXSwapHostShortToLittle’ is deprecated (declared at /usr/include/architecture/byte_order.h:331)
/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/endianness.h:90: warning: ‘NXSwapHostShortToLittle’ is deprecated (declared at /usr/include/architecture/byte_order.h:331)
/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/endianness.h: In function ‘double DONTUSE__NXSwapBigDoubleToLittleEndian(double)’:
/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/endianness.h:102: warning: ‘NXSwapHostLongToLittle’ is deprecated (declared at /usr/include/architecture/byte_order.h:349)
/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/endianness.h:102: warning: ‘NXSwapHostLongToLittle’ is deprecated (declared at /usr/include/architecture/byte_order.h:349)
/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/endianness.h:103: warning: ‘NXSwapHostLongToLittle’ is deprecated (declared at /usr/include/architecture/byte_order.h:349)
/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/endianness.h:103: warning: ‘NXSwapHostLongToLittle’ is deprecated (declared at /usr/include/architecture/byte_order.h:349)
make[2]: *** [CMakeFiles/OPcollide.dir/src/cmd/collide2/Ice/IceAABB.o] Error 1
make[1]: *** [CMakeFiles/OPcollide.dir/all] Error 2
make: *** [all] Error 2
ezee
Intrepid Venturer
Intrepid Venturer
Posts: 703
Joined: Tue Feb 11, 2014 12:47 am
Location: FRANCE
Contact:

Re: Problems Building 0.5.1.r1 on Mac OS 10.9

Post by ezee »

Hi , and welcome .
I am a windows user , so i can't help you directly ( Klauss will ) .
But you asked for ideas , i have one :
error: conflicting declaration ‘typedef int64 intmax_t’
/usr/include/_types/_intmax_t.h:32: error: ‘intmax_t’ has a previous declaration as ‘typedef long int intmax_t’
int64 and long int are in fact the same .
So if you comment this line in your source ( /src/cmd/collide2/opcodetypes.h:177 ), the typedef should already exists ( it is already defined in /usr/include/_types

And the same apply for the
error: conflicting declaration ‘typedef uint64 uintmax_t’
/usr/include/_types/_uintmax_t.h:32: error: ‘uintmax_t’ has a previous declaration as ‘typedef long unsigned int uintmax_t’
that is not the better fix , but that could work .
More about Int64 and long data type :
http://forums.asp.net/t/1278143.aspx?In ... e+the+same+

edit : A better fix :
Look in the src file :
#if !defined(CS_HAVE_INTMAX_T)
/// Greatest-width integer
typedef int64 intmax_t;
/// Greatest-width unsigned integer
typedef uint64 uintmax_t;
#endif
That red line is in case you don't have the typedef already defined .
But it is already defined in your case in usr/ , but not in your source file/ compiler options.

You could manually define CS_HAVE_INTMAX_T in your compiler options ,
or directly in the file ( in top of main.cpp perhaps ?):
#define CS_HAVE_INTMAX_T
But Mac users will have better solutions for you i guess .

Code: Select all

 if (!track.HasWeapons())
            {
                // So what are you going to threaten me with? Exhaustion gas?
                return ThreatLevel::None;
            }
Vegastrike evolved
DEV YOUTUBE CHANNEL
Vegastrike evolved wiki
klauss
Elite
Elite
Posts: 7243
Joined: Mon Apr 18, 2005 2:40 pm
Location: LS87, Buenos Aires, República Argentina

Re: Problems Building 0.5.1.r1 on Mac OS 10.9

Post by klauss »

daviewales wrote:I'm trying to build 0.5.1.r1 on Mac OS 10.9. I'm using CMAKE, because it can find all the required libraries. I'm using gcc, rather than clang, because it sometimes helps things build when they don't want to.

cmake completes without error. However, make fails with the following error:

Code: Select all

/Users/dwales/Downloads/vegastrike-src-0.5.1.r1/src/cmd/collide2/opcodetypes.h:177: error: conflicting declaration[/quote]

Not much to go on there. But I'll get to "inherit" a mac for playing with it soon, so maybe I'll give it a try myself.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
Post Reply