[mapserver-users] Error in Mapscript/PHP for MS 3.5 ( redux)

Bryan Tolka btolka at geointeractive.biz
Thu Jul 25 13:43:23 EDT 2002


Hello Greg,
Remove one of the gcc from the makefile. Like this.


Here is the makefile that it is generating:
 > CC =     gcc -I. -I.. -fPIC
 > LD =     gcc -shared -L/usr/local/lib -rdynamic
 > CFLAGS = -O2  -Wall -DCOMPILE_DL=1 -DPHP4
 > RUNPATHS=


Bryan Tolka
West Virginia University







Greg Mader wrote:
>  Hi all,
> Platform is RH 7.3 on a dual PIII server.
> I am having a problem that has been addressed before, but I cannot find the
> right fix:
> 
> cd mapscript/php3; make; cd ../..
> make[1]: Entering directory `/home/gmader/mapserver_3.5/mapscript/php3'
> gcc  gcc -I. -I.. -fPIC -O2  -Wall -DCOMPILE_DL=1 -DPHP4 -DUSE_EPPL
> -DUSE_TIFF   -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DUSE_JPEG
> -I/home/gmader/mapserver_3.5         -I/usr/include
> -I/usr/local/include/php/main -I/usr/local/include/php/main/dl
> -I/usr/local/include/php/main/main -I/usr/local/include/php/main/Zend
> -I/usr/local/include/php/main/include -I/usr/local/include/php/main/TSRM  -c
> -o php_mapscript_util.o php_mapscript_util.c
> gcc: cannot specify -o with -c or -S and multiple compilations
> make[1]: *** [php_mapscript_util.o] Error 1
> 
> 
> Here is the makefile that it is generating:
> CC =     gcc  gcc -I. -I.. -fPIC
> LD =     gcc -shared -L/usr/local/lib -rdynamic
> CFLAGS = -O2  -Wall -DCOMPILE_DL=1 -DPHP4
> RUNPATHS= 
> 
> #
> # Set PHP_SRC_DIR to point to the root of the PHP source tree
> #
> PHP_SRC_DIR = /usr/local/include/php/main
> 
> PHP_INC = -I$(PHP_SRC_DIR) -I$(PHP_SRC_DIR)/dl -I$(PHP_SRC_DIR)/main \
> 	  -I$(PHP_SRC_DIR)/Zend -I$(PHP_SRC_DIR)/include \
> 	  -I$(PHP_SRC_DIR)/TSRM 
> 
> #
> # Set MapServer extensions parameters.  See main MapServer Makefile for 
> # more details... 
> # Common defaults are:
> # MS_DEFINE = -DUSE_TTF -DUSE_TIFF -DUSE_EPPL -DUSE_GD_1_2
> # MS_INCLUDE = -I../.. -I../../gd-1.2 -I../../gdft
> # MS_LIBS = -L../.. -lmap -L../../gdft -lgdft -ltiff -lttf -L../../gd-1.2
> -lgd
> #
> MS_DEFINE =        -DUSE_EPPL -DUSE_TIFF   -DUSE_GD_PNG -DUSE_GD_JPEG
> -DUSE_GD_WBMP -DUSE_GD_FT -DUSE_JPEG 
> MS_INC =    -I/home/gmader/mapserver_3.5         -I/usr/include  
> MS_STATIC =   
> MS_LIBS =   $(RUNPATHS) -L/home/gmader/mapserver_3.5 -lmap       -ltiff
> -ljpeg -lfreetype -lpng -lz  -lgd -L/usr/lib -lgd -ljpeg -lfreetype -lpng
> -lz -ljpeg   -lm $(MS_STATIC)
> 
> 
> #
> # The rest of the file should not have to be edited...
> #
> 
> CFLAGS := $(CFLAGS) $(MS_DEFINE) $(MS_INC) $(PHP_INC)
> 
> all: php_mapscript.so
> 
> PHPMS_OBJS =  php_mapscript_util.o php_mapscript.o mapscript_i.o
> 
> PHPPROJ_OBJS = php_mapscript_util.o php_proj.o
> 
> 
> php_mapscript.so: $(PHPMS_OBJS) ../../libmap.a
> 	$(LD) -o $@ $(PHPMS_OBJS) $(MS_LIBS)
> 
> php_proj.so:  $(PHPPROJ_OBJS)
> 	$(LD) -o $@ $(PHPPROJ_OBJS) $(MS_LIBS)
> 
> %.o: %.c php_mapscript_util.h php_mapscript.h
> 	$(CC) $(CFLAGS) -c -o $@ $<
> 
> 
> clean:
> 	-rm -f *.so *.o perl.out
> 
> 
> Thanks,
> 
> Greg Mader
> 
> 



-- 
Bryan Tolka
Geo Interactive Associates Inc.
(304) 319-1488
btolka at geointeractive.biz





More information about the mapserver-users mailing list