Raised This Month: $ Target: $400
 0% 

Compiling SM Ext/MMS using Cygwin


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
CrimsonGT
Veteran Member
Join Date: Oct 2007
Location: Gainesville, FL
Old 11-06-2010 , 06:39   Compiling SM Ext/MMS using Cygwin
Reply With Quote #1

I finally made the switch tonight to Cygwin, and wow, it is just 100 times easier to compile for linux with this setup. I followed this tutorial on the wiki to get setup (http://wiki.alliedmods.net/Cross_Com...amod:Source%29). I am thinking my issue might be that I am using GCC 4.3.4 but the Cross Compile tools from the Wiki look like they are for 3.4.1. The problem I am running into though can be seen in the following log...

Code:
Brett@Brett-PC /cygdrive/c/dev_mms/PlayerManager
$ make ENGINE=orangeboxvalve
if [ "true" = "true" ] && [ "true" = "false" ]; then \
                echo "You must supply one of the following values for ENGINE:";
\
                echo "left4dead2, left4dead, orangeboxvalve, orangebox, or origi
nal"; \
                exit 1; \
        fi
mkdir -p Release.orangeboxvalve/sdk
if [ "true" = "true" ]; then \
                ln -sf /cygdrive/c/dev_mms/hl2sdk-ob-valve/lib/linux/libvstdlib.
so; \
                ln -sf /cygdrive/c/dev_mms/hl2sdk-ob-valve/lib/linux/libtier0.so
; \
        fi
make -f Makefile extension
make[1]: Entering directory `/cygdrive/c/dev_mms/PlayerManager'
if [ "true" = "true" ] && [ "true" = "false" ]; then \
                echo "You must supply one of the following values for ENGINE:";
\
                echo "left4dead2, left4dead, orangeboxvalve, orangebox, or origi
nal"; \
                exit 1; \
        fi
/opt/crosstool/gcc-3.4.1-glibc-2.3.2/i686-unknown-linux-gnu/bin/i686-unknown-lin
ux-gnu-gcc -I/cygdrive/c/dev_mms/hl2sdk-ob-valve/public/game/server -I/cygdrive/
c/dev_mms/steamworks/Open\ Steamworks -I. -Isdk -I/cygdrive/c/dev_mms/sourcemod-
1.3/public -I/cygdrive/c/dev_mms/sourcemod-1.3/public/sourcepawn -I/cygdrive/c/d
ev_mms/sourcemod-1.3/public/extensions -I/cygdrive/c/dev_mms/hl2sdk-ob-valve/pub
lic -I/cygdrive/c/dev_mms/hl2sdk-ob-valve/public/engine -I/cygdrive/c/dev_mms/hl
2sdk-ob-valve/public/game/server -I/cygdrive/c/dev_mms/hl2sdk-ob-valve/public/ti
er0 -I/cygdrive/c/dev_mms/hl2sdk-ob-valve/public/tier1 -I/cygdrive/c/dev_mms/hl2
sdk-ob-valve/game/shared -I/cygdrive/c/dev_mms/hl2sdk-ob-valve/game/server -I/cy
gdrive/c/dev_mms/mmsource-1.8/core -I/cygdrive/c/dev_mms/mmsource-1.8/core/sourc
emm -I/cygdrive/c/dev_mms/mmsource-1.8/core/sourcehook -DSOURCE_ENGINE=4 -DSE_EP
ISODEONE=1 -DSE_DARKMESSIAH=2 -DSE_ORANGEBOX=3 -DSE_ORANGEBOXVALVE=4 -DSE_LEFT4D
EAD=5 -DSE_LEFT4DEAD2=6 -DSE_ALIENSWARM=7 -Dstricmp=strcasecmp -D_stricmp=strcas
ecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -D_snprintf=snprintf -D_vsnp
rintf=vsnprintf -D_alloca=alloca -Dstrcmpi=strcasecmp -Wall -Werror -Wno-switch
-Wno-unused -mfpmath=sse -msse -DSOURCEMOD_BUILD -DHAVE_STDINT_H -m32 -DNDEBUG -
O3 -funroll-loops -pipe -fno-strict-aliasing -D_LINUX -Wno-non-virtual-dtor -fno
-exceptions -fno-rtti -o Release.orangeboxvalve/extension.o -c extension.cpp
In file included from /cygdrive/c/dev_mms/steamworks/Open Steamworks/Steamworks.
h:23,
                 from extension.cpp:54:
/cygdrive/c/dev_mms/steamworks/Open Steamworks/SteamTypes.h:82:4: #error "Steamw
orks requires GCC 4.X (4.2 or 4.4 have been tested)"
In file included from /cygdrive/c/dev_mms/steamworks/Open Steamworks/Steamworks.
h:23,
                 from extension.cpp:54:
/cygdrive/c/dev_mms/steamworks/Open Steamworks/SteamTypes.h:222: warning: conver
ting of negative value `-0x000000002' to `PackageId_t'
/cygdrive/c/dev_mms/steamworks/Open Steamworks/SteamTypes.h:223: warning: conver
ting of negative value `-0x000000003' to `PackageId_t'
extension.cpp: In function `uint64 GetGSSteamId()':
extension.cpp:98: error: `GetModuleHandleA' undeclared (first use this function)

extension.cpp:98: error: (Each undeclared identifier is reported only once for e
ach function it appears in.)
make[1]: *** [Release.orangeboxvalve/extension.o] Error 1
make[1]: Leaving directory `/cygdrive/c/dev_mms/PlayerManager'
make: *** [all] Error 2
I decided to give it a go without the cross compile tools, and I got the error "gcc: error trying to exec 'cc1plus': No such file or directory" which Google says is due to g++ missing, but both are installed.

Here is my current makefile (its set to gcc atm instead of the cross compiler tools)
http://www.ampaste.net/ma312be1

Last edited by CrimsonGT; 11-06-2010 at 06:48.
CrimsonGT is offline
API
Veteran Member
Join Date: May 2006
Old 11-07-2010 , 00:24   Re: Compiling SM Ext/MMS using Cygwin
Reply With Quote #2

Why would it be reporting a version lesser than 4.x if you are using 4.3.4? Maybe you actually are using 3.4...
Quote:
/opt/crosstool/gcc-3.4.1-glibc-2.3.2/....
I would assume that you just have to update gcc.
__________________
API is offline
Send a message via AIM to API
DJ Tsunami
DJ Post Spammer
Join Date: Feb 2008
Location: The Netherlands
Old 11-09-2010 , 16:38   Re: Compiling SM Ext/MMS using Cygwin
Reply With Quote #3

I was also never able to compile with GCC 4 under Cygwin, probably because indeed there are no cross compile tools for it. GCC 3 worked fine though if I pointed CPP to the full path in my Makefile (so not just gcc, but the full path, although I imagine linking gcc to that path would work too).
__________________
Advertisements | REST in Pawn - HTTP client for JSON REST APIs
Please do not PM me with questions. Post in the plugin thread.
DJ Tsunami is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:22.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode