[mapserver-users] Compiling gd with freetype2 on Solaris 2.6

Hockaday, John JohnHockaday at auslig.gov.au
Wed Nov 14 01:01:01 EST 2001


Mapservers,

The problem is that /usr/local/lib is not in LD_LIBRARY_PATH.  If I add
/usr/local/lib to the LD_LIBRARY_PATH then the ./mapserv works if I run it
on the command line.  If I run it as a cgi-bin script it doesn't work.  

I have tracked the problem down to our web user, www, which doesn't have a
shell.  I added and exported the LD_LIBRARY_PATH for the www user but it
still doesn't work because the www user doesn't open a shell as itself to
run the mapserv cgi-bin script.

I then added the following lines to our apache web server:
SetEnv LD_LIBRARY_PATH "/usr/local/lib"
PassEnv LD_LIBRARY_PATH

I stopped and started the apache web server and everything started working.

Thanks to all of you who have responded.  Again it has proven to me that
this is one the most responsive lists with the most knowledgable people on a
subject.

Thanks again.

John Hockaday

> -----Original Message-----
> From:	Paul Ramsey [SMTP:pramsey at refractions.net]
> Sent:	Wednesday, November 14, 2001 4:26 PM
> To:	Hockaday, John
> Subject:	Re: [mapserver-users] Compiling gd with freetype2 on Solaris
> 2.6
> 
> Does your LD_LIBRARY_PATH environment variable include /usr/local/lib?
> 
> "Hockaday, John" wrote:
> > 
> > John,
> > 
> > First of all thanks for replying.
> > 
> > Yes I did have a "2" in the ./configure statement.  It just made a
> transpose
> > mistake while putting it into my initial email.
> > 
> > I have had some success by using the gd-1.8.4gif.tar.gz version located
> at
> > "Albatross Consulting" site URL:
> > http://www.rhyme.com.au/gd/
> > and editing the Makefile to include the path to the freetype2 include
> files.
> > IE. /usr/local/include/freetype2 (note the "2" this time)  ;--)
> > 
> > This seems to have worked however after I compile mapserver I get the
> > following error when I run mapserv:
> > 
> > "$ ./mapserv
> > ld.so.1: ./mapserv: fatal: libfreetype.so.6: open failed: No such file
> or
> > directory
> > Killed"
> > 
> > The /usr/local/lib/libfreetype.so.6 file exists.
> > 
> > I've tried adding lots of configuration options to the configure script.
> > ie.
> > 
> > ./configure  --prefix=/usr/local/ --exec-prefix=/usr/local
> --with-freetype
> > --with-proj --with-gd=/usr/local --with-zlib --with-wmsclient
> > 
> > Anyone know what is happening?
> > 
> > Thanks.
> > 
> > John
> > 
> > Thanks for your help.
> > 
> > John
> > 
> > > -----Original Message-----
> > > From: John Carlson [SMTP:carlson14 at llnl.gov]
> > > Sent: Wednesday, November 14, 2001 1:38 PM
> > > To:   Hockaday, John
> > > Subject:      Re: [mapserver-users] Compiling gd with freetype2 on
> Solaris
> > > 2.6
> > >
> > >
> > > >
> > > >I believe that I have successfully compiled freetype-2.0.1 with its
> > > >pre-requisites but when I try to compile gd as follows:
> > > >
> > > >    ./configure --enable-freetype2 --libdir=/usr/local/lib \
> > > >                     --includedir=/usr/local/include \
> > > >
> --x-includes=/usr/local/include/freetype/freetype \
> > >
> > >
> > > Do you need a freetype2 above????
> > >
> > > >                     --x-libraries=/usr/local/lib
> > > >
> > > >I get the following warning:
> > > >
> > > >"...
> > > >checking for X... libraries /usr/local/lib, headers
> > > >/usr/local/include/freetype2/freetype
> > > >checking for main in -lm... (cached) yes
> > > >checking for deflate in -lz... (cached) yes
> > > >checking for png_check_sig in -lpng... (cached) yes
> > > >checking for freetype.h... (cached) no
> > > >configure: warning: libgd will be built without support for FreeType2
> > > fonts
> > > >- no freetype.h.
> > > >checking for FT_Init_FreeType in -lfreetype... (cached) yes
> > > >checking for ANSI C header files... (cached) no
> > > >..."
> > > >
> > > >freetype.h is located in /usr/local/include/freetype2/freetype
> > >
> > >
> > >
> > > You have a 2 here, but not above.
> > >
> > > John
> > >
> > > >but the configuration file seems to ignore that I have
> > > >included this path in the --x-includes option for configure.
> > > >
> > > >Has anyone come across this problem and solved it?  If so can someone
> > > tell
> > > >me what I need to do to get gd to compile with freetype2 with GIF
> > > support?
> > > >
> > > >Thanks in advance for your help.
> > > >
> > > >John Hockaday



More information about the mapserver-users mailing list