freetype
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Freetype] linking libz.a - problems building freetype2 on solaris 7


From: David Turner
Subject: Re: [Freetype] linking libz.a - problems building freetype2 on solaris 7
Date: Fri, 06 Aug 2004 08:00:35 +0200
User-agent: Mozilla Thunderbird 0.5 (Windows/20040207)

Hello,

it seems you're trying to generate a DLL (shared object on Unix)
using a static library (libz.a). This cannot work, since you need
the shared version of zlib (i.e. libz.so) to do that...

Hope this helps,

- David Turner
- The FreeType Project  (www.freetype.org)


Veeresh Khanorkar wrote:
Please recollect I had send a mail with Subj: Compiling problem: Freetype2 on Solaris. I described about problem compiling freetype 2 on solaris. My compilation also resulted in same kind error as shown here. I will as well like to fix the problem.

Thanks
-Veeresh
Paul Tregoing wrote:

Hi there,

I cannot seem to compile freetype 2 on solaris 7 due to a problem with linking in my system zlib (/usr/local/lib/libz.a). This is the output from ./configure

root# ./configure --prefix=/apache/modules/freetype/2.1.9
cd builds/unix; ./configure --prefix=/apache/modules/freetype/2.1.9
checking build system type... sparc-sun-solaris2.7
checking host system type... sparc-sun-solaris2.7
checking target system type... sparc-sun-solaris2.7
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 how to run the C preprocessor... gcc -E
checking for rm... rm -f
checking for rmdir... rmdir
checking for a BSD-compatible install... ./install-sh -c
checking for grep that handles long lines...
checking for egrep... /usr/gnutools-SunOS-5.7/1.0/bin/egrep
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... no
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for unistd.h... (cached) yes
checking for an ANSI C-conforming const... yes
checking for int... yes
checking size of int... 4
checking for long... yes
checking size of long... 4
checking for stdlib.h... (cached) yes
checking for unistd.h... (cached) yes
checking for getpagesize... yes
checking for working mmap... yes
checking whether munmap is declared... yes
checking for munmap's first parameter type... char *
checking for memcpy... yes
checking for memmove... yes
checking for gzsetparams in -lz... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for a sed that does not truncate output... /usr/xpg4/bin/sed
checking for ld used by gcc... /usr/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking for /usr/ccs/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/ccs/bin/nm -p
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
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 how to run the C++ preprocessor... g++ -E
checking for g77... g77
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether g77 accepts -g... yes
checking the maximum length of command line arguments... 262144
checking command to parse /usr/ccs/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 static flag  works... yes
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... solaris2.7 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
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/ccs/bin/ld
checking if the linker (/usr/ccs/bin/ld) is GNU ld... no
checking whether the g++ linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking for g++ option to produce PIC... -fPIC
checking if g++ PIC flag -fPIC works... yes
checking if g++ supports -c -o file.o... yes
checking whether the g++ linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.7 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for g77 option to produce PIC... -fPIC
checking if g77 PIC flag -fPIC works... yes
checking if g77 supports -c -o file.o... yes
checking whether the g77 linker (/usr/ccs/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... solaris2.7 ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... no
configure: creating ./config.status
config.status: creating unix-cc.mk
config.status: creating unix-def.mk
config.status: creating freetype-config
config.status: creating freetype2.pc
config.status: creating ftconfig.h

FreeType build system -- automatic system detection

The following settings are used:

 platform                    unix
 compiler                    cc
 configuration directory     ./builds/unix
 configuration rules         ./builds/unix/unix.mk

If this does not correspond to your system or settings please remove the file
`config.mk' from this directory then read the INSTALL file for help.

Otherwise, simply type `make' again to build the library,
or `make refdoc' to build the API reference (the latter needs python).

make: Nothing to be done for `unix'.

#-----------------------------------------------------------------------------

The output from make (GNU make 3.80) gives me a fatal error when compiling the libfreetype.so library...

gcc -shared -Wl,-h -Wl,libfreetype.so.6 -o /freetype-2.1.9/objs/.libs/libfreetype.so.6.3.7 /freetype-2.1.9/objs/.libs/ftsystem.o /freetype-2.1.9/objs/.libs/ftdebug.o /freetype-2.1.9/objs/.libs/ftinit.o /freetype-2.1.9/objs/.libs/ftbase.o/freetype-2.1.9/objs/.libs/ftbbox.o /freetype-2.1.9/objs/.libs/ftbdf.o /freetype-2.1.9/objs/.libs/ftglyph.o /freetype-2.1.9/objs/.libs/ftmm.o /freetype-2.1.9/objs/.libs/ftpfr.o /freetype-2.1.9/objs/.libs/ftstroke.o /freetype-2.1.9/objs/.libs/fttype1.o /freetype-2.1.9/objs/.libs/ftwinfnt.o /freetype-2.1.9/objs/.libs/ftxf86.o /freetype-2.1.9/objs/.libs/autohint.o /freetype-2.1.9/objs/.libs/bdf.o /freetype-2.1.9/objs/.libs/ftcache.o /freetype-2.1.9/objs/.libs/cff.o /freetype-2.1.9/objs/.libs/type1cid.o /freetype-2.1.9/objs/.libs/ftgzip.o /freetype-2.1.9/objs/.libs/ftlzw.o /freetype-2.1.9/objs/.libs/pcf.o /freetype-2.1.9/objs/.libs/pfr.o /freetype-2.1.9/objs/.libs/psaux.o /freetype-2.1.9/objs/.libs/pshinter.o /freetype-2.1.9/objs/.libs/psnames.o /freetype-2.1.9/objs/.libs/raster.o /freetype-2.1.9/objs/.libs/sfnt.o /freetype-2.1.9/objs/.libs/smooth.o /freetype-2.1.9/objs/.libs/truetype.o /freetype-2.1.9/objs/.libs/type1.o /freetype-2.1.9/objs/.libs/type42.o /freetype-2.1.9/objs/.libs/winfnt.o -lz -lc
Text relocation remains                         referenced
   against symbol                  offset      in file
<unknown> 0x18e0 /usr/local/lib/libz.a(inflate.o)
...
<lots of relocation remains messages> (referenced in) /usr/local/lib/libz.a
...
<unknown> 0x8 /usr/local/lib/libz.a(zutil.o) z_errmsg 0x1c /usr/local/lib/libz.a(zutil.o) z_errmsg 0x20 /usr/local/lib/libz.a(zutil.o) ld: fatal: relocations remain against allocatable but non-writable sections
collect2: ld returned 1 exit status
make: *** [/freetype-2.1.9/objs/libfreetype.la] Error 1

#--------------------------------------------------------------------------------

I made sure that ../include/freetype/config/ftoption.h had system zlib commented out: "/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */" but libfreetype.so seems to be linking in the system zlib... I'm confused! Any help greatly appreciated...

Thanks

Paul

_______________________________________________
Freetype mailing list
address@hidden
http://www.freetype.org/mailman/listinfo/freetype




_______________________________________________
Freetype mailing list
address@hidden
http://www.freetype.org/mailman/listinfo/freetype





reply via email to

[Prev in Thread] Current Thread [Next in Thread]