Operating System - HP-UX
1820707 Members
2629 Online
109627 Solutions
New Discussion юеВ

Re: Error while installing IO::TTY perl module

 
sajjad_84
Advisor

Error while installing IO::TTY perl module

Hello All,

IтАЩve been trying to install the IO-TTy-1.02 module on my HP-UX system.

The problem is when I run the Makefile.PL, this error is displayed.

ERROR: cannot run the configured compiler 'gcc'
(see conf/compilerok.log). Please fix this by adjusting perls Config.pm, creating a symlink to the right location or maybe by just adding it to your PATH. You could also build perl yourself.

When I run the perl тАУV:cc command the output it shows is тАЬcc=gccтАЭ.
After running the Makefile.PL this error is displayed in the log compilerok.log
sh: gcc: not found.
But then when I changed the location of CC (using the export command, export CC=/usr/bin/cc).
The log file showed this error
sh: mor: not found.





32 REPLIES 32
Dennis Handly
Acclaimed Contributor

Re: Error while installing IO::TTY perl module

What OS and architecture are you on?

>CC=/usr/bin/cc

It isn't likely this will compile perl on PA.

>sh: mor: not found.

Have you looked for "mor"? I would expect this only on the terminal when you mistype more but not from perl.
sajjad_84
Advisor

Re: Error while installing IO::TTY perl module

Hello Dennis,

The Architecture is PA-RISC, and OS is HP-UNIX 11.11.

Yes i tried looking for mor, but couldn't find it.

And there is no gcc aswell.

Suraj K Sankari
Honored Contributor

Re: Error while installing IO::TTY perl module

Hi,

reinstall gcc and try.

Suraj
Dennis Handly
Acclaimed Contributor

Re: Error while installing IO::TTY perl module

>And there is no gcc as well.

You can download gcc from here:
http://www.hp.com/go/gcc
sajjad_84
Advisor

Re: Error while installing IO::TTY perl module

About this GCC, does it depend on the perl version i'm using, or i can use gcc with any version of perl.

Since its a compiler, i suppose it won't affect in anyway with the scripts that are already running?

James R. Ferguson
Acclaimed Contributor

Re: Error while installing IO::TTY perl module

Hi:

> About this GCC, does it depend on the perl version i'm using, or i can use gcc with any version of perl.

Since your Perl was compiled with 'gcc' you will "need" to use 'gcc' for any module compilation that is required when adding new modules. You were correct in assessing with 'perl -V:cc'.

> Since its a compiler, i suppose it won't affect in anyway with the scripts that are already running?

Correct.

Regards!

...JRF...
sajjad_84
Advisor

Re: Error while installing IO::TTY perl module

Should the gcc be a problem because when installing other modules, such as net:ssh or net:telnet, i don't receive this error.

So according to you all, I should try re-installing the gcc?
Dennis Handly
Acclaimed Contributor

Re: Error while installing IO::TTY perl module

>I should try re-installing the gcc?

I thought you said you didn't have gcc? Or did you just not have it in your PATH?
If the former, you need to install gcc.
James R. Ferguson
Acclaimed Contributor

Re: Error while installing IO::TTY perl module

Hi (again):

> Should the gcc be a problem because when installing other modules, such as net:ssh or net:telnet, i don't receive this error.

You're making a fallacious assumption, namely that all Perl modules require compilation. That is NOT true. Many modules do not need compilation.

Compilation will be required if the module contains files with files with a suffix of '.xs', '.c', '.h', '.y', '.cc', '.cxx', or '.C'.

Regards!

...JRF...

sajjad_84
Advisor

Re: Error while installing IO::TTY perl module

Hello,

I've installed gcc, but still I'm getting the same error.
sh :gcc not found
Dennis Handly
Acclaimed Contributor

Re: Error while installing IO::TTY perl module

>I've installed gcc, but still I'm getting the same error.

Is gcc in your PATH?
If you are using a real shell, what does "whence gcc" show?
sajjad_84
Advisor

Re: Error while installing IO::TTY perl module

whence gcc gives no output.

So now how to set it in the PATH.


James R. Ferguson
Acclaimed Contributor

Re: Error while installing IO::TTY perl module

Hi (again):

> whence gcc gives no output. So now how to set it in the PATH.

In all likelihood your 'gcc' has been installed in '/usr/local/bin' which isn't in your PATH. You can remedy this in your '${HOME}/.profile'.

In the '.profile' you should have a line like:

# PATH=/usr/sbin:$PATH:/sbin:/root

Add the 'gcc' path there, like:

# PATH=/usr/sbin:$PATH:/sbin:/usr/local/bin:/root

Regards!

...JRF...
Dennis Handly
Acclaimed Contributor

Re: Error while installing IO::TTY perl module

>So now how to set it in the PATH?

This is shell programming 101. If you don't know how to do this, you should be condemned to type in absolute paths. ;-)

In addition to what JRF said about $PATH, there is a file with all installed software and you might be able to use that file too:
PATH=$PATH:$(< /etc/PATH)
sajjad_84
Advisor

Re: Error while installing IO::TTY perl module

lol Dennis, I already consider myself condemned. I've been working TeMIP for so long, that I only checked .temip_config for the path variable and forgot that there ever existed a .profile file.

I'll set the path and let you all know.

sajjad_84
Advisor

Re: Error while installing IO::TTY perl module

*sigh* just when I though every thing was going A-OK. I get this error when I tun the 'make test' command. (see the attachment).





Dennis Handly
Acclaimed Contributor

Re: Error while installing IO::TTY perl module

>I get this error when I tun the 'make test' command.
/usr/lib/dld.sl: Bad magic number for shared library: /data/perl_modules/IO-Tty-1.08/blib/arch/auto/IO/Tty/Tty.sl
/usr/lib/dld.sl: Exec format error

This may indicate mixing 32 vs 64 bit?
Use "file /data/perl_modules/IO-Tty-1.08/blib/arch/auto/IO/Tty/Tty.sl" to check.
sajjad_84
Advisor

Re: Error while installing IO::TTY perl module

Here is the output
/data/perl_modules/IO-Tty-1.08/blib/arch/auto/IO/Tty/Tty.sl: ELF-64 shared object file - PA-RISC 2.0 (LP64)
Dennis Handly
Acclaimed Contributor

Re: Error while installing IO::TTY perl module

>Here is the output
.../Tty.sl: ELF-64 shared object file - PA-RISC 2.0 (LP64)

Your original message:
/usr/lib/dld.sl: Bad magic number for shared library:

This is the 32 bit dld.sl.
The output from the shlib, shows it is a 64 bit shlib. And you can't mix and match.

So, what was the part you just built?
You would need to compile it in the other mode.
The URL I provided provides both 32 and 64 bit gcc compilers.
(For Integrity, only one is needed to do both.)
sajjad_84
Advisor

Re: Error while installing IO::TTY perl module

Hello,

I did download the 64 bit build for gcc.
This is the file downloaded.
gcc-hppa64-4.4.0-1.depot
Dennis Handly
Acclaimed Contributor

Re: Error while installing IO::TTY perl module

>I did download the 64 bit build for gcc.

What did you compile with it?
Your "make test" seemed to be using a 32 bit perl.
sajjad_84
Advisor

Re: Error while installing IO::TTY perl module

I'm using the same installed compiler. How to check if the compiler is 64 bit or not?
Dennis Handly
Acclaimed Contributor

Re: Error while installing IO::TTY perl module

>How to check if the compiler is 64 bit or not?

You can use file(1) on an object file:
file foo.o
sajjad_84
Advisor

Re: Error while installing IO::TTY perl module

this is what get

root@tpptcl01 # file efsbmp.o
efsbmp.o: PA-RISC1.1 relocatable object