GD install problems

S

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?
 
B

Ben Morrow

Quoth simulant said:
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
 
S

Sisyphus

..
..
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
 
S

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,586
Members
45,087
Latest member
JeremyMedl

Latest Threads

Top