Solaris AGG Compile...

Nolte, Tim Tim.Nolte at IPCSWIRELESSINC.COM
Wed Oct 17 10:32:33 PDT 2007


OK, I'm still struggling here. Here is how I modified my
Makefile.in.SunOS:

	Changed:
		CXX = CC
	To:
		CXX = gcc

	Changed:
		C = cc
	To:
		C = gcc

	Added:
		AR = ar
		LD = ld

	Changed:
		LIB = CC -xar -o
	To:
		LIB = g++ -xar -o

I've also made the change of renaming /usr/ccs/bin/ld to
/usr/ccs/bin/ld-off during the AGG build process. Here is what I'm
getting as output:

cd src; make
make[1]: Entering directory `/usr/local/agg-2.4/src'
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_arc.cpp -o agg_arc.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_arrowhead.cpp -o agg_arrowhead.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_bezier_arc.cpp -o agg_bezier_arc.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_bspline.cpp -o agg_bspline.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_curves.cpp -o agg_curves.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_vcgen_contour.cpp -o agg_vcgen_contour.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_vcgen_dash.cpp -o agg_vcgen_dash.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_vcgen_markers_term.cpp -o agg_vcgen_markers_term.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_vcgen_smooth_poly1.cpp -o agg_vcgen_smooth_poly1.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_vcgen_stroke.cpp -o agg_vcgen_stroke.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_vcgen_bspline.cpp -o agg_vcgen_bspline.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_gsv_text.cpp -o agg_gsv_text.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_image_filters.cpp -o agg_image_filters.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_line_aa_basics.cpp -o agg_line_aa_basics.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_line_profile_aa.cpp -o agg_line_profile_aa.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_rounded_rect.cpp -o agg_rounded_rect.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_sqrt_tables.cpp -o agg_sqrt_tables.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_embedded_raster_fonts.cpp -o agg_embedded_raster_fonts.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_trans_affine.cpp -o agg_trans_affine.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_trans_warp_magnifier.cpp -o agg_trans_warp_magnifier.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_trans_single_path.cpp -o agg_trans_single_path.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_trans_double_path.cpp -o agg_trans_double_path.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_vpgen_clip_polygon.cpp -o agg_vpgen_clip_polygon.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_vpgen_clip_polyline.cpp -o agg_vpgen_clip_polyline.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
agg_vpgen_segmentator.cpp -o agg_vpgen_segmentator.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
ctrl/agg_cbox_ctrl.cpp -o ctrl/agg_cbox_ctrl.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
ctrl/agg_gamma_ctrl.cpp -o ctrl/agg_gamma_ctrl.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
ctrl/agg_gamma_spline.cpp -o ctrl/agg_gamma_spline.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
ctrl/agg_rbox_ctrl.cpp -o ctrl/agg_rbox_ctrl.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
ctrl/agg_slider_ctrl.cpp -o ctrl/agg_slider_ctrl.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
ctrl/agg_spline_ctrl.cpp -o ctrl/agg_spline_ctrl.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
ctrl/agg_scale_ctrl.cpp -o ctrl/agg_scale_ctrl.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
ctrl/agg_polygon_ctrl.cpp -o ctrl/agg_polygon_ctrl.o
g++ -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
ctrl/agg_bezier_ctrl.cpp -o ctrl/agg_bezier_ctrl.o
gcc -c -O3 -I/usr/openwin/include -L/usr/openwin/lib -I../include -L./
../gpc/gpc.c -o ../gpc/gpc.o
g++ -xar -o libagg.a agg_arc.o agg_arrowhead.o agg_bezier_arc.o
agg_bspline.o agg_curves.o agg_vcgen_contour.o agg_vcgen_dash.o
agg_vcgen_markers_term.o agg_vcgen_smooth_poly1.o agg_vcgen_stroke.o
agg_vcgen_bspline.o agg_gsv_text.o agg_image_filters.o
agg_line_aa_basics.o agg_line_profile_aa.o agg_rounded_rect.o
agg_sqrt_tables.o agg_embedded_raster_fonts.o agg_trans_affine.o
agg_trans_warp_magnifier.o agg_trans_single_path.o
agg_trans_double_path.o agg_vpgen_clip_polygon.o
agg_vpgen_clip_polyline.o agg_vpgen_segmentator.o ctrl/agg_cbox_ctrl.o
ctrl/agg_gamma_ctrl.o ctrl/agg_gamma_spline.o ctrl/agg_rbox_ctrl.o
ctrl/agg_slider_ctrl.o ctrl/agg_spline_ctrl.o ctrl/agg_scale_ctrl.o
ctrl/agg_polygon_ctrl.o ctrl/agg_bezier_ctrl.o ../gpc/gpc.o
g++: language ar not recognized
...
g++: language ar not recognized
/usr/local/lib/gcc/i386-pc-solaris2.10/3.4.6/crt1.o: In function
`_start':
crt1.s:(.text+0x5c): undefined reference to `main'
collect2: ld returned 1 exit status
make[1]: *** [all] Error 1
make[1]: Leaving directory `/usr/local/agg-2.4/src'
make: *** [src/libagg.a] Error 2 

Any thoughts, anyone? Thanks.

- Tim

----
Timothy J Nolte - tnolte at ilpcs.com
Associate Network Planning Engineer

iPCS Wireless, Inc.
4717 Broadmoor Ave, Suite G
Kentwood, MI 49512

Office: 616-656-5163
PCS:    616-706-2438
Fax:    616-554-6484
Web: www.ipcswirelessinc.com
-----Original Message-----
From: Trent Erickson [mailto:trente at umn.edu] 
Sent: Tuesday, October 16, 2007 9:45 PM
To: Nolte, Tim
Cc: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: Re: [UMN_MAPSERVER-USERS] Solaris AGG Compile...

The sunfreeware gcc package is compiled with --with-ld=/usr/ccs/bin/ld 
so it can be hard to get around it. (you can see this by running g++ -v)

The sun ld version did not want to compile agg for me. I ended up 
renaming /usr/ccs/bin/ld to /usr/ccs/bin/ld-off   I then put it back 
after the compile. This of course requires root access.

It is not very elegant but it worked. If anyone has any other 
suggestions I'd love to know how to force the proper ld with resorting 
to this. It just plain ignored the makefile and environment settings.

-Trent

Nolte, Tim wrote:
> OK, well here's my setup. I have the following sunfreeware packages
> installed:
>
> 	gcc-3.4.6-sol10-x86-local
> 	make-3.81-sol10-x86-local
> 	automake-1.10-sol10-x86-local
> 	libtool-1.5.24-sol10-x86-local
>
> I've set my PATH environment to use '/usr/local/bin' before
> '/usr/ccs/bin'. And my g++/gcc/make/ar/ld are all GNU when I run
'type'
> on them. I did notice that gcc reports (Configured with: ../configure
> --with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --enable-shared
> --enable-languages=c,c++,f77) so I'm not sure if this would be an
issue.
> Thanks for any other thoughts.
>
> ----
> Timothy J Nolte - tnolte at ilpcs.com
> Associate Network Planning Engineer
>
> iPCS Wireless, Inc.
> 4717 Broadmoor Ave, Suite G
> Kentwood, MI 49512
>
> Office: 616-656-5163
> PCS:    616-706-2438
> Fax:    616-554-6484
> Web: www.ipcswirelessinc.com



More information about the MapServer-users mailing list