View Full Version : compilation problems on osx
danaronson
2007-05-03, 15:43
This is on a jive checked out yesterday. Any ideas?
--dan
Dan-Aronsons-Computer:~/projects/jive/src/pkg danaronson$ sudo gcc_select
Password:
Current default compiler:
gcc version 4.0.0 20041026 (Apple Computer, Inc. build 4061)
Dan-Aronsons-Computer:~/projects/jive/src/pkg danaronson$ make -f Makefile.osx
cd SDL-1.2.11; make && make install
/bin/sh ./libtool --mode=compile gcc -I/Users/danaronson/projects/jive//build/osx/include -I/Users/danaronson/projects/jive//build/osx/include/SDL -I/opt/local/include -g -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -faltivec -force_cpusubtype_ALL -fpascal-strings -c ./src/SDL.c -o build/SDL.lo
gcc -I/Users/danaronson/projects/jive//build/osx/include -I/Users/danaronson/projects/jive//build/osx/include/SDL -I/opt/local/include -g -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -faltivec -force_cpusubtype_ALL -fpascal-strings -c ./src/SDL.c -fno-common -DPIC -o build/.libs/SDL.o
cc1: error: unrecognized command line option "-fpascal-strings"
make[1]: *** [build/SDL.lo] Error 1
make: *** [sdl] Error 2
Intel or PPC? At some point we got issues with 4.0 on PPC so switched to 3.3 (and never changed).
On macIntel I am using gcc 4.0.1 (build 5363), i.e. newer version of XCode...
Anything in the SDL forums? We're just compiling it, I don't think we changed anything in there.
HTH
Fred
danaronson
2007-05-03, 17:15
PPC, I'll try GCC 3 series... Can the rest of the stuff be compiled on 3? Or are you interested in getting it to work with 4 on PPC?
On PPC, 10.4.9, using:
[fred@imac:~]$ gcc_select
Current default compiler:
gcc version 3.3 20030304 (Apple Computer, Inc. build 1819)
The whole thing compiles fine.
Supporting 4.0 on PPC is not a current project priority. We'll gladly accept patches however :)
Fred
As I'm encountering problems on OS X as well, here are my details (and bare in mind I've been a Mac user for three days :-)):
OS X 10.4 Intel
gcc 4.0.1
Darwin Ports 1.4
Did a clean checkout, installed the needed libraries (copy/pasted the command from the readme file). Run "make -f Makefile.osx" and got the following result:
test -z "/Users/mh/Documents//build/osx/include/SDL" || /Users/mh/Documents/workspace/Jive/SDL_image-1.2.5/install-sh -d "/Users/mh/Documents//build/osx/include/SDL"
/usr/bin/install -c -m 644 'SDL_image.h' '/Users/mh/Documents//build/osx/include/SDL/SDL_image.h'
cd SDL_ttf-2.0.8; SDL_CONFIG=/Users/mh/Documents//build/osx/bin/sdl-config ./configure --prefix=/Users/mh/Documents//build/osx
checking build system type... i686-apple-darwin8.9.1
checking host system type... i686-apple-darwin8.9.1
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -p
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... no
checking for fort... no
checking for xlf95... no
checking for ifc... no
checking for efc... no
checking for pgf95... no
checking for lf95... no
checking for gfortran... no
checking whether we are using the GNU Fortran 77 compiler... no
checking whether accepts -g... no
checking the maximum length of command line arguments... 196608
checking command to parse /usr/bin/nm -p output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common
checking if gcc PIC flag -fno-common works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin8.9.1 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by g++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... no
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fno-common
checking if g++ PIC flag -fno-common works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin8.9.1 dyld
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking whether make sets $(MAKE)... (cached) yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ANSI C... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking for a BSD-compatible install... /usr/bin/install -c
checking for working alloca.h... yes
checking for alloca... yes
checking for freetype-config... no
configure: error:
*** Unable to find FreeType2 library (http://www.freetype.org/)
make: *** [SDL_ttf-2.0.8/Makefile] Error 1
What exactly is the script looking for? I do have a ~/Document/build/osx/include/freetype2 folder.
rtitmuss
2007-05-05, 02:05
As I'm encountering problems on OS X as well, here are my details (and bare in mind I've been a Mac user for three days :-))
You should find a better description of the error in the SDL_ttf-2.0.8/config.log file. What's that say?
What exactly are you looking for? I can't see anything freetype related besides that simple error message.
rtitmuss
2007-05-05, 02:37
So it can't find the file freetype-config, this should have been installed in .../build/osx/bin earlier in the build. Can you find it?
You could try to rebuild all the packages:
make -f Makefile.osx clean
make -f Makefile.osx
I think freetype should be the first package built.
So it can't find the file freetype-config, this should have been installed in .../build/osx/bin earlier in the build. Can you find it?
Yep, it's there.
You could try to rebuild all the packages:
make -f Makefile.osx clean
make -f Makefile.osx
I think freetype should be the first package built.
I've even removed the Jive and build directories and started from scratch. No change.
I don't have to run "sudo make", do I?
Heh, on my system it gets freetype from /opt..., that is, from DarwinPorts not from the distribution. Oooops, the perils of ./configure nosing around to find stuff.
I am fixing it so that we use our freetype. This should solve your issue Michael...
Fred
> Done, r34
Excellent! Thanks a lot!
Now let's debug that MAC address issue...
--
Michael
-----------------------------------------------------------------
http://www.herger.net/SlimCD - your SlimServer on a CD
http://www.herger.net/slim - AlbumReview, Biography, MusicInfoSCR
osx 10.3.9, gcc 3.3 (expected to work at all?)
I managed to get the ports installed, after also updating gperf.
However, the compile now fails with the following:
ranlib liblua.a
cc -I/Users/fishbone/jive/jive//build/osx/include -I/Users/fishbone/jive/jive//build/osx/include/SDL -I/opt/local/include -g -DLUA_USE_MACOSX -DLUA_USE_READLINE -c -o lua.o lua.c
In file included from lua.h:16,
from lua.c:15:
luaconf.h:309:31: readline/readline.h: No such file or directory
luaconf.h:310:30: readline/history.h: No such file or directory
lua.c: In function `pushline':
lua.c:180: warning: assignment makes pointer from integer without a cast
make[3]: *** [lua.o] Error 1
make[2]: *** [macosx] Error 2
make[1]: *** [macosx] Error 2
make: *** [lua] Error 2
tips? useless distractions? free upgrades?
-kdf
Lua looks for readline which is not available below 10.4. So technically speaking it's not supported :)
You can probably make it work if you edit lua-5.1.1/src/Makefile
# use this on Mac OS X 10.4
$(MAKE) all MYCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE" MYLIBS="-lreadline -lpthread" OSXPREFIX='export MACOSX_DEPLOYMENT_TARGET="10.3"' MYTHREADLDFLAGS="-bundle -undefined dynamic_lookup"
into
# use this on Mac OS X 10.3
$(MAKE) all MYCFLAGS="-DLUA_USE_MACOSX" MYLIBS="-lpthread" OSXPREFIX='export MACOSX_DEPLOYMENT_TARGET="10.3"' MYTHREADLDFLAGS="-bundle -undefined dynamic_lookup"
(Basically remove anything that mentions readline)
HTH
Fred
On 9-May-07, at 12:24 AM, Fred wrote:
>
> Lua looks for readline which is not available below 10.4. So
> technically
> speaking it's not supported :)
>
> You can probably make it work if you edit lua-5.1.1/src/Makefile
>
>
actually, it was just as simple as commenting out the line below the
use this for 10.4, and un-commenting the simpler line above that made
no reference to readline.
works like a charm now.
cheers,
kdf
Index: Makefile
================================================== =================
--- Makefile (revision 36)
+++ Makefile (working copy)
@@ -106,9 +106,9 @@
$(MAKE) all MYCFLAGS="-O2 -Wall -pthread -fpic -DLUA_USE_LINUX"
MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses -lpthread"
MYTHREADLDFLAGS="-O -shared -fpic" OSXPREFIX="pwd"
macosx:
-# $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX
+ $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX
# use this on Mac OS X 10.4
- $(MAKE) all MYCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE"
MYLIBS="-lreadline -lpthread" OSXPREFIX='export
MACOSX_DEPLOYMENT_TARGET="10.3"' MYTHREADLDFLAGS="-bundle -undefined
dynamic_lookup"
+# $(MAKE) all MYCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE"
MYLIBS="-lreadline -lpthread" OSXPREFIX='export
MACOSX_DEPLOYMENT_TARGET="10.3"' MYTHREADLDFLAGS="-bundle -undefined
dynamic_lookup"
# $(OSXPREFIX); $(CC) -o $@ $(MYTHREADLDFLAGS) $(LUATHREAD_O)
Hm. I had no problem with building on 10.4.
It's not unreasonable to assume 10.4 in the build script (at least
until 10.5 comes out. :)
-dean
On May 9, 2007, at 12:52 AM, kdf wrote:
>
> On 9-May-07, at 12:24 AM, Fred wrote:
>
>>
>> Lua looks for readline which is not available below 10.4. So
>> technically
>> speaking it's not supported :)
>>
>> You can probably make it work if you edit lua-5.1.1/src/Makefile
>>
>>
> actually, it was just as simple as commenting out the line below the
> use this for 10.4, and un-commenting the simpler line above that made
> no reference to readline.
> works like a charm now.
> cheers,
> kdf
>
>
> Index: Makefile
> ================================================== =================
> --- Makefile (revision 36)
> +++ Makefile (working copy)
> @@ -106,9 +106,9 @@
> $(MAKE) all MYCFLAGS="-O2 -Wall -pthread -fpic -
> DLUA_USE_LINUX"
> MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses -lpthread"
> MYTHREADLDFLAGS="-O -shared -fpic" OSXPREFIX="pwd"
>
> macosx:
> -# $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX
> + $(MAKE) all MYCFLAGS=-DLUA_USE_MACOSX
> # use this on Mac OS X 10.4
> - $(MAKE) all MYCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE"
> MYLIBS="-lreadline -lpthread" OSXPREFIX='export
> MACOSX_DEPLOYMENT_TARGET="10.3"' MYTHREADLDFLAGS="-bundle -undefined
> dynamic_lookup"
> +# $(MAKE) all MYCFLAGS="-DLUA_USE_MACOSX -DLUA_USE_READLINE"
> MYLIBS="-lreadline -lpthread" OSXPREFIX='export
> MACOSX_DEPLOYMENT_TARGET="10.3"' MYTHREADLDFLAGS="-bundle -undefined
> dynamic_lookup"
>
> # $(OSXPREFIX); $(CC) -o $@ $(MYTHREADLDFLAGS) $(LUATHREAD_O)
>
>
>
On 9-May-07, at 7:33 AM, dean blackketter wrote:
> Hm. I had no problem with building on 10.4.
>
some of us don't have 10.4 :)
> It's not unreasonable to assume 10.4 in the build script (at least
> until 10.5 comes out. :)
>
simple edit, so something that can easily be found here now or on the
wiki ...at some point or another.
-kdf
Trying to build OS X version. I have gcc 4.01 running on an Intel Mac with 10.4.1. I've installed the libraries the README.osx listed. ($ sudo port install tiff libpng jpeg expat gettext)
I get these errors at the end the build:
/var/tmp//ccxlKOBW.s:142:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:313:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:502:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:670:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:841:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:1023:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:1189:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:1368:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:1549:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:1702:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:1854:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:2007:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:2152:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:2315:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:2536:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:2727:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:2890:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:3113:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:3291:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:3475:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:3490:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:3678:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:3876:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:4059:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:4237:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:4252:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:4444:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:4618:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:4824:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:5074:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:5191:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:5361:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:5558:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:5854:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:5963:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:6133:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:6334:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:6635:Alignment too large: 15. assumed.
/var/tmp//ccxlKOBW.s:6784:Alignment too large: 15. assumed.
make[1]: *** [SDL_imageFilter.lo] Error 1
make: *** [sdl-gfx] Error 2
Any ideas let me know. Thanks!
I have the warnings here, but it compiles. I think we need the stuff surrounding the errors you posted.
Try going into sdl-gfx, make distclean, then cd .., make -f Makefile.osx sdl-gfx...
HTH
Fred
I am also having the exact same problem. Fresh checkout today, all libs installed from macports, gcc 4.0.1:
gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"SDL_gfx\" -DVERSION=\"2.0.15\" -DBUILD_DLL -I. -I. -I/Users/andy/dev/Slim/jive/jive//build/osx/include -I/Users/andy/dev/Slim/jive/jive//build/osx/include/SDL -I/opt/local/include -g -DUSE_MMX -I/Users/andy/dev/Slim/jive/jive//build/osx/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE -MT SDL_imageFilter.lo -MD -MP -MF .deps/SDL_imageFilter.Tpo -c SDL_imageFilter.c -o SDL_imageFilter.o
/var/tmp//ccXds3ft.s:142:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:313:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:502:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:670:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:841:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:1023:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:1189:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:1368:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:1549:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:1702:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:1854:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:2007:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:2152:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:2315:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:2536:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:2727:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:2890:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:3113:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:3291:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:3475:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:3490:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:3678:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:3876:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:4059:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:4237:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:4252:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:4444:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:4618:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:4824:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:5074:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:5191:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:5361:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:5558:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:5854:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:5963:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:6133:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:6334:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:6635:Alignment too large: 15. assumed.
/var/tmp//ccXds3ft.s:6784:Alignment too large: 15. assumed.
make[1]: *** [SDL_imageFilter.lo] Error 1
make: *** [sdl-gfx] Error 2
Doing what you suggested Fred, the same error happens.
Aha, I solved the problem by upgrading to xcode 2.4.1 (I had 2.2.1).
Powered by vBulletin® Version 4.1.12 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.