01-06-2008, 04:34 PM,
|
|
nomoo
Member
  
|
Posts: 111
Threads: 15
Joined: Mar 2007
|
|
FreeBSD sconscript file
First of all i want to say that i don't know the right way to write freebsd part of sconscript file, i mean that it's a dirty hack..
So freebsd section:
Code: if (sys.platform == 'freebsd5') or (sys.platform == 'freebsd6') or (sys.platform == 'freebsd7'):
LOCALBASE = '/usr/local/'
X11BASE = '/usr/X11R6/'
env = Environment(ENV = os.environ,
CPPPATH = ['#include',LOCALBASE + '/include', LOCALBASE + '/include/AL',X11BASE + '/include', '#bullet-2.64/src'],
LIBPATH = ['.', '#lib', LOCALBASE + '/lib', X11BASE + '/lib', '#bullet-2.64/out/freebsd/optimize/libs'],
LINKFLAGS = ['-pthread','-lintl'],
options = opts)
check_headers = ['GL/gl.h', 'GL/glu.h', 'SDL/SDL.h', 'SDL/SDL_image.h', 'SDL/SDL_net.h', 'SDL/SDL_rotozoom.h','vorbis/vorbisfile.h' ]
CC = 'cc'
CXX = 'gcc'
CXXFLAGS = '-Wall -O2'
And of course you need sdl_gfx, sdl_image, sdl_net,.. installed.
p.s. sorry for my English
|
|
01-08-2008, 06:22 PM,
|
|
nomoo
Member
  
|
Posts: 111
Threads: 15
Joined: Mar 2007
|
|
Huh, i mean 'SConstruct' file.
|
|
01-22-2008, 08:58 AM,
|
|
nomoo
Member
  
|
Posts: 111
Threads: 15
Joined: Mar 2007
|
|
[nomoo@pcbsd /usr/home/nomoo/games/vdrift]$ scons
scons: Reading SConscript files ...
KeyError: 'LOCALBASE':
File "/usr/home/nomoo/games/vdrift/SConstruct", line 47:
LOCALBASE = os.environ['LOCALBASE']
File "/usr/local/lib/python2.5/UserDict.py", line 22:
raise KeyError(key)
mmmmm, did you say scons options?
|
|
01-22-2008, 04:24 PM,
|
|
nomoo
Member
  
|
Posts: 111
Threads: 15
Joined: Mar 2007
|
|
[nomoo@pcbsd ~/]$ env | grep BASE
gives nothing
|
|
01-23-2008, 02:45 PM,
|
|
nomoo
Member
  
|
Posts: 111
Threads: 15
Joined: Mar 2007
|
|
These vars are set when you install something via port, i guess there is something in system's makefiles but i'm not sure. Maybe we should do something like:
if [ "$LOCALBASE" = "" ]; then ... fi ?
offtop: is this only my hard/software trouble (on the rear bumper): http://dump.ru/dumpru_images/861239.jpg ?
|
|
01-24-2008, 01:10 PM,
|
|
nomoo
Member
  
|
Posts: 111
Threads: 15
Joined: Mar 2007
|
|
well, it's almost works
you just have to delete the previous freebsd part between ">>>" and "===", add check for glew like this:
Code: check_headers = ['GL/gl.h', 'GL/glu.h', 'GL/glew.h', 'SDL/SDL.h', 'SDL/SDL_image.h', 'SDL/SDL_net.h', 'SDL/SDL_rotozoom.h', 'vorbis/vorbisfile.h']
But i have new error:
Code: src/binreloc.c: In function `char* EjgI43220352208034_br_find_exe_dir(const char*)':
src/binreloc.c:380: error: invalid conversion from `void*' to `char*'
scons: *** [build/binreloc.o] Error 1
were there any changes?[/code]
|
|
01-26-2008, 05:25 PM,
|
|
thelusiv
Administrator
      
|
Posts: 2,346
Threads: 223
Joined: Jun 2005
|
|
The reason for the >>> and === and <<< parts is that when you make local modifications to a file in SVN, and then changes in the same code are checked in to SVN, and you update your working copy, a conflict is generated. You should be able to see this when you svn up, instead of "U SConstruct" (the U is for "updated") you will see "C SConstruct" (the C is for "conflict"). When there is a conflict Subversion puts your code next to the new code so you can decide which to keep. Thus you can manually resolve the conflict (you should do a "svn resolved SConstruct" once you have resolved it), or you can just delete the file and "svn up" again, and Subversion will restore the version from the server.
As for the BinReloc problem, I don't think you need it on FreeBSD. Try running
Code: scons use_binreloc=0
and see if that clears up the problem for you. Regardless, I don't get this error, this must have something to do with the version of gcc you're using (which version is it?)...or maybe you have some super restrictive default gcc flags?
|
|
02-03-2008, 06:17 PM,
|
|
nomoo
Member
  
|
Posts: 111
Threads: 15
Joined: Mar 2007
|
|
well, it's pretty strange:
scons use_binreloc=0:
Code: g++ -o build/binreloc.o -c -g3 -pthread -D_GNU_SOURCE=1 -D_REENTRANT -Iinclude -I/usr/local/include -I/usr/X11R6/include -Ibullet-2.64/src -I/usr/local/include/SDL -I/usr/local/include src/binreloc.c
src/binreloc.c: In function `char* EjgI43220352208034_br_find_exe_dir(const char*)':
src/binreloc.c:380: error: invalid conversion from `void*' to `char*'
scons: *** [build/binreloc.o] Error 1
gcc --version
gcc (GCC) 3.4.6 [FreeBSD] 20060305
and add 'GL/glew.h' to 'check_headers' part please.
|
|
02-09-2008, 06:55 AM,
|
|
nomoo
Member
  
|
Posts: 111
Threads: 15
Joined: Mar 2007
|
|
so, any ideas to get it working?
|
|
|