GD install problems

GD install problems

am 27.08.2007 21:37:41 von simulant

Environment:
AIX 5.2
perl 5.8.2
gcc 3.3.2
libgd 2.0.33
libpng 1.2.8
zlib - 1.2.3

Trying to install GD 2.35 on AIX 5.2 and receiving the following error
while running make:

cc_r -c -I/usr/local/pkgs/gd.2.0.33/include -I/usr/include -I/
usr/include/gd -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -
qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -
q32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"2.35\" -DXS_VERSION=
\"2.35\" "-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" -
DHAVE_PNG GD.c
/bin/sh: cc_r: not found.
make: 1254-004 The error code from the last command is 127.

Now I know the problem here is that I am not running cc_r ... I'm only
running gcc. But is there a way around this without having to put cc_r
on the server? Is it possible to either bypass this cc_r requirement
or get it to work with gcc somehow?

Re: GD install problems

am 28.08.2007 01:40:17 von Ben Morrow

Quoth simulant :
> Environment:
> AIX 5.2
> perl 5.8.2
> gcc 3.3.2
> libgd 2.0.33
> libpng 1.2.8
> zlib - 1.2.3
>
> Trying to install GD 2.35 on AIX 5.2 and receiving the following error
> while running make:
>
> cc_r -c -I/usr/local/pkgs/gd.2.0.33/include -I/usr/include -I/
> usr/include/gd -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -
> qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -
> q32 -D_LARGE_FILES -qlonglong -O -DVERSION=\"2.35\" -DXS_VERSION=
> \"2.35\" "-I/usr/opt/perl5/lib/5.8.2/aix-thread-multi/CORE" -
> DHAVE_PNG GD.c
> /bin/sh: cc_r: not found.
> make: 1254-004 The error code from the last command is 127.
>
> Now I know the problem here is that I am not running cc_r ... I'm only
> running gcc. But is there a way around this without having to put cc_r
> on the server? Is it possible to either bypass this cc_r requirement
> or get it to work with gcc somehow?

In general you have to build Perl extensions with the same compiler you
used to build perl. If you installed perl from a binary package, and it
was built with a compiler you do not have and cannot install, you will
need to either install GD from the same source (if your package supplier
provides it) or rebuild perl yourself from source with gcc. (If you
*did* build perl yourself, then where has cc_r vanished to since then?)

It *may* be possible to bodge Config.pm to make gcc work (this is
commonly done with ActivePerl on Win32, which is built with a non-free
compiler), but it is rather difficult to get it right. A lot of the
options interact in rather confusing ways.

Ben

--
If you put all the prophets, | You'd have so much more reason
Mystics and saints | Than ever was born
In one room together, | Out of all of the conflicts of time.
ben@morrow.me.uk The Levellers, 'Believers'

Re: GD install problems

am 28.08.2007 10:10:11 von Sisyphus

"simulant" wrote in message
news:1188243461.220512.231020@22g2000hsm.googlegroups.com...
..
..
>Is it possible to either bypass this cc_r requirement
> or get it to work with gcc somehow?

It's fairly simple to specify gcc as the compiler. Instead of 'perl
Makefile.PL', run 'perl Makefile.PL CC=gcc'.

But, as Ben has mentioned, it probably won't be that easy. There will likely
be additional changes to %Config that need to be made.

Cheers,
Rob

Re: GD install problems

am 29.08.2007 00:11:10 von simulant

> It's fairly simple to specify gcc as the compiler. Instead of 'perl
> Makefile.PL', run 'perl Makefile.PL CC=gcc'.
>
> But, as Ben has mentioned, it probably won't be that easy. There will likely
> be additional changes to %Config that need to be made.
>

Yeah, just tried the CC=gcc, and some of the options aren't compatible
with gcc:

gcc: unrecognized option `-qmaxmem=16384'
gcc: unrecognized option `-qnoansialias'
gcc: unrecognized option `-q32'
gcc: unrecognized option `-qlonglong'

Regarding the compiler that was used to build Perl on this server, it
was cc_r according to 'perl -V':
Compiler:
cc='cc_r', ccflags ='-D_ALL_SOURCE -D_ANSI_C_SOURCE -
D_POSIX_SOURCE -qmaxmem=16384 -qnoansialias -DUSE_NATIVE_DLOPEN -
DNEED_PTHREAD_INIT -q32 -D_LARGE_FILES -qlonglong',

Thanks for the responses.