Technical support > Mac

2.3 dev version for mac question

<< < (6/11) > >>

stevenjackson:
Also i'm using leopard.

Destructavator, if you give me the details somehow then i'll get a copy up there.

Steve

doc.torr:
That'd be great, guys!

Also, congrats, Steve!

Any help you can give on setting up my env good would be warmly appreciated. I figure there's no point trying to contribute further to the project if I can't compile good.

Steve, what sort of directories do you reckon I should include? What's the difference between the CPPFLAGS and LDFLAGS? I can't find any man ref.
Should they be exported to PATH instead? Further, 'make' still gives grief re. lack of jpeglib.h even though it's sitting right in the /usr/include/

um..

something like this

192-168-1-153:~ wesblack$ cd ufoai/trunk
192-168-1-153:~/ufoai/trunk wesblack$ ls
CONTRIBUTORS      config.guess      contrib
COPYING         config.h      debian
INSTALL         config.h.in      debug-darwin-i386
Makefile      config.log      install-sh
Makefile.in      config.status      radiant
README         config.sub      src
base         configure
build         configure.ac
192-168-1-153:~/ufoai/trunk wesblack$ make -p
# GNU Make 3.81
# Copyright (C) 2006  Free Software Foundation, Inc.
# This is free software; see the source for copying conditions.
# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.

# This program built for powerpc-apple-darwin9.0
 * [UFO] src/client/renderer/r_image.c
src/client/renderer/r_image.c:32:21: error: jpeglib.h: No such file or directory
src/client/renderer/r_image.c:33:17: error: png.h: No such file or directory
src/client/renderer/r_image.c:138: error: syntax error before ‘*’ token
src/client/renderer/r_image.c: In function ‘PngReadFunc’:
src/client/renderer/r_image.c:140: warning: implicit declaration of function ‘png_get_io_ptr’
src/client/renderer/r_image.c:140: error: ‘Png’ undeclared (first use in this function)
src/client/renderer/r_image.c:140: error: (Each undeclared identifier is reported only once
src/client/renderer/r_image.c:140: error: for each function it appears in.)
src/client/renderer/r_image.c:141: error: ‘buf’ undeclared (first use in this function)
src/client/renderer/r_image.c:141: error: ‘size’ undeclared (first use in this function)
src/client/renderer/r_image.c: In function ‘R_LoadPNG’:
src/client/renderer/r_image.c:154: error: ‘png_structp’ undeclared (first use in this function)


etc.

Destructavator:

--- Quote from: stevenjackson on December 05, 2008, 03:26:44 am ---Also i'm using leopard.

Destructavator, if you give me the details somehow then i'll get a copy up there.

Steve

--- End quote ---

I'm busy today (Friday), but I'll try to find out by sometime this weekend, hopefully Saturday, and when I do I'll send a PM your way.

doc.torr:
Steve, tried your suggestion re. ./configure, but found it worked a bit better as

./configure CFLAGS="-I/sw/include" CPPFLAGS="-I/sw/include" LDFLAGS="-L/sw/lib -L/usr/local/include"

in that I seemed to get no errors during 'configure', and the makefile seemed to accept the CFLAGS and LDFLAGS
but still no joy with 'make' (many errors reported - I'll spare you the cut 'n paste here. Lots of syntax errors. But possibly a better class of fail.)

also, when I tried (just for fun) replacing CPPFLAGS and/or CFLAGS and/or LDFLAGS (as Steve's instructions) with other directories and re-running configure, not a lot of fun was had, mainly reporting errors during configure, and  'no such file or directory' on subsequent 'make'

mostly looking for jpeglib.h, png.h... mostly...
.


tchristney:
OK, I think we all can admit that the compile for mac wiki page is written for people with at least a little programming experience. One of the issues with providing 2.3 "nightlies" is that you cannot be guaranteed that any particular revision in the SVN trunk will work. Sure, everyone tries hard to make it so, but new features are being added all the time. Keep in mind that chances are anything stevenjackson provides to you will likely be outdated in less than 24 hours.

It seems that the fink instructions need to be modified to make sure that the *-dev versions of all the packages are installed. Also, I'm a little worried by people fiddling around in /usr/* with what appears to be limited knowledge of what they are doing. If you are using fink you should not need to add anything from /usr/local ! Everything from fink is installed in /sw/ precisely so fink doesn't clobber /usr/*! If I were you I would try to return to the original state of /usr/ (/usr/local/ is not important - everything in there is put there by users, not the system). For example, you should not have a /usr/shared/SDL (nor a /usr/share/SDL for that matter - I certainly don't.)

FWIW, I really wanted to get universal binaries working, and when I found out that fink does not support them at all, I switched to MacPorts. MacPorts is not perfect, but it works for me.

About the SDL frameworks: they need to be installed in /Library/Frameworks (I think ~/Library/Frameworks may also work, but I've never tried it.) So you should have folders named /Library/Frameworks/SDL.framework, /Library/Frameworks/SDL_ttf.framework and /Library/Frameworks/SDL_mixer.framework.

CFLAGS/LDFLAGS: these tell make which additional options to pass to the compiler/linker. When you say CFLAGS="-I/sw/include" you are telling the compiler to look inside /sw/include for additional header files (*.h) that it can't find in the default locations (/usr/include and /usr/local/include). Similarly, LDFLAGS="-L/sw/lib" tells the linker to look for libraries in /sw/lib. After that line you can use -ljpeg and the linker will look for libjpeg.dylib in /sw/lib in addition to /usr/lib and /usr/local/lib. Note that /usr/lib and /usr/local/lib are searched by default and should never need to be manually specified to configure! If you are using fink and configure complains about not finding a header file, then the correct package has not been installed successfully. For the record, AFAIK, there should not be a jpeglib.h in /usr/include. Apple does not ship libjpeg (jpeg is supported by Cocoa) and /usr/include is a "system" directory, i.e. it should only contain items that Apple puts there (you should put your own modifications in /usr/local/include)

Hope this helps.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version