Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Mar 2004 19:24:09 +0100
From:      Oliver Eikemeier <eikemeier@fillmore-labs.com>
To:        Patrick Dung <patrick_dkt@yahoo.com.hk>, Patrick Dung <dkt@mail.hongkong.com>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: pdftk compiling problems on FreeBSD
Message-ID:  <405897C9.2040703@fillmore-labs.com>
In-Reply-To: <405884E6.6060309@AccessPDF.com>
References:  <20040317131134.95781.qmail@web41903.mail.yahoo.com> <405884E6.6060309@AccessPDF.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Sid Steward wrote:

> Patrick-
> 
> Thank you for your work. I'll add your FreeBSD Makefile and notes to the
> next release of pdftk.
> 
> Thanks for the suggestions, too.  I'll work them in.
> 
> Sid
> 
> Patrick Dung wrote:
> 
>>...
>>
>>FreeBSD 4.9 uses gcc 2.95.4 as system compiler.
>>So I install the gcc33 inorder to use the gcj.
>># pkgadd -r gcc33
>># cd /usr/local/bin/gcj33
>># ln -s gcj33 gcj
>># ln -s gcjh33 gcjh
>>
>>Changes to Makefile.Base :
>>Change g++ to g++33
>>
>>Create Makefile.FreeBSD :
>># general-purpose options
>>CC_OPTS= -lgcj -O2 -I/usr/local/include -L/usr/local/lib -pthread
> 
> -liconv -lz
> 
>># Not related, only g++ is used?
>>CC = gcc33
>># Does not work as expected (I have to change g++ to g++33 in
> 
> Makefile.Base)
> 
>>CXX = g++33
>>#
>>include Makefile.Base
>>
>>If -pthread is not added, it will have problem when compiling with the
> 
> gcc3.3.x compiler.
> 
>>Do the 'gmake -f Makefile.FreeBSD' and it compiles cleanly.
>>And the program works fine.

For a port you would use

  USE_GCC=3.3

which will install gcc and set CC=gcc33 CXX=g++33 automatically. Also

  USE_GMAKE

tells the port to use gmake for building. If you you Makefile has a
non-standard name, use MAKEFILE=Makefile.FreeBSD (actually a bug, it
should be MAKE_FILE). -pthread should be PTHREAD_CFLAGS and PTHREAD_LIBS.

Some more variables can be found in /usr/ports/Mk/bsd.port.mk.

Regards
    Oliver



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?405897C9.2040703>