vani has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
I am trying to compile perl 5.8.7 on solaris 2.9 using gcc 3.2 and gnu's ld. While compiling some of the dynamic linking libraries, the compile process hangs. This does not happen for all the libraries. Looks like miniperl hangs trying to create the Makefile from Makefile.PL for some of them.

I manually removed about 10 troublesome libraries from the dynamic_ext variable in the Makefile and the compilation continued. But ofcourse the make test cmd fails.

Since it happens only for certain libraries for e.g . ext/B, ext/PPPort, IO,Storable, etc. i am not able to figure out the real problem.

I tried to create the Makefile directly from within the the specific directory. But, now the miniperl command works fine from withing for certain directories (of the troublesome one) and not within a few others.

I really don't know what is happening here. I have tried everything that i can think of and have no clue where to look next. Any help is highly appreciated.
perl v 5.8.7
gcc 3.2
solaris 2.9
ld -2.16 (gnu)
as -2.16 (gnu)

Please let me know if you need any other information to help me out.
Thanks in advance,
Vani

Replies are listed 'Best First'.
Re: miniperl hangs during perl compilation
by Moron (Curate) on Nov 17, 2005 at 12:18 UTC
    By definition, gnu's not unix. Solaris is a BSD variant that does fall under the unix category and one has to take care not to assume universal compatibility between the two.

    The latest version of Perl that is compatible with your platform seems to be 5.8.5. And a more appropriate distro with instructions can be found at http://www.sunfreeware.com

    -M

    Free your mind

      I initially tried compiling 5.8.5 from sunfreeware.com. I faced the same problem.So i decided may be i should try the latest stable one from perl.org. Now i have the same problem on both.

      I need to compile perl and a few other utilities for my need on a separate mount point.Ultimately I have to move the tar ball of the mount pt to another machine (same config -arch,OS,etc)cause i don't have enough space on it.

        I looked at what's actually installed on our (large number of) SunOS 5.9 systems and only Perl 5.6.1 is on them - I think, also based on past experience, that current version numbers under Solaris tend to be somewhat behind Windows and Linux.

        -M

        Free your mind

      I am running the latest Perl on Solaris 8, 9, and 10. Solaris, btw, is NOT a BSD variant anymore. It has been a System V variant for many, many years now.

      That said, vani, you have to get us alot more detail. Can you run a truss and see what's going on? I've never had a Perl built fail on me ever and I've been using Perl on Solaris for almost a decade. Maybe an experienced Sysadmin who has access to your system can help you out.

        I am using GNU's Make. I ran truss on "make" at the parent directory level. Am just adding the last section
        Making B (dynamic) Inside B::Makefile.PL before WriteMakefile call wait() (sleeping...)
        I ran truss from within the B directory and here's the output. It's pretty big, so am adding some sections that i think are relevant. Please let me know if you need other sections and i will provide them. It looks like it is trying to find Util.pm file Then i find it is doing lstat calls on pretty much the entire filesystem. And some of the directories are NFS mounted, and goes to sleep on one such directory.
        3890 open64("/local/lib/perl5/site_perl/5.8.7/sun4-solaris/Scalar/ +Util.pm", O _RDONLY) Err#2 ENOENT 3891 stat64("/local/lib/perl5/site_perl/5.8.7/Scalar/Util.pmc", 0xF +FBFF8D0) E rr#2 ENOENT 3892 open64("/local/lib/perl5/site_perl/5.8.7/Scalar/Util.pm", O_RD +ONLY) Err# 2 ENOENT 3893 stat64("/local/lib/perl5/site_perl/Scalar/Util.pmc", 0xFFBFF8D +0) Err#2 E NOENT 3894 open64("/local/lib/perl5/site_perl/Scalar/Util.pm", O_RDONLY) +Err#2 ENOE NT 3895 stat64("./Scalar/Util.pmc", 0xFFBFF8D0) Err#2 ENOENT 3896 open64("./Scalar/Util.pm", O_RDONLY) Err#2 ENOENT 3897 getcontext(0xFFBFF758) 3898 setcontext(0xFFBFF758) 3899 stat64(".", 0x0011AE90) = 0 3900 open("./..", O_RDONLY|O_NDELAY|O_LARGEFILE) = 3 3901 fstat64(3, 0xFFBFF9A0) = 0 3902 fcntl(3, F_SETFD, 0x00000001) = 0 3903 stat64("./..", 0x0011AE90) = 0 3904 getdents64(3, 0x003BE488, 8192) = 1072 3963 lstat64("./../../epoc", 0x0011AE90) = 0 3964 lstat64("./../../ext", 0x0011AE90) = 0 3965 close(3) = 0 3966 open("./../../..", O_RDONLY|O_NDELAY|O_LARGEFILE) = 3 3967 fstat64(3, 0xFFBFF9A0) = 0 3968 fcntl(3, F_SETFD, 0x00000001) = 0 3969 stat64("./../../..", 0x0011AE90) = 0 3970 getdents64(3, 0x003BE488, 8192) = 1432 3971 lstat64("./../../../.", 0x0011AE90) ...

        I was under the impression that /local/lib/perl5/site_perl/5.8.7/sun4-solaris/ was the path where perl would install these *.pm files for the actual perl that i build. Am i making myself clear?! Could someone explain what's happening here?!!

        I am not sure what information you need , but here's some that i thought you would need. @INC for miniperl

        ./miniperl "-I./lib" -e 'print "@INC\n"' ./lib /local/lib/perl5/5.8.7/sun4-solaris /local/lib/perl5/5.8.7 /loca +l/lib/perl5/site_perl/5.8.7/sun4-solaris /local/lib/perl5/site_perl/5 +.8.7 /local/lib/perl5/site_perl .

        Here's where i have Util.pm

        /local/src/perl-5.8.7/ext/List/Util/lib/List/Util.pm /local/src/perl-5.8.7/ext/List/Util/lib/Scalar/Util.pm /local/src/perl-5.8.7/lib/CGI/Util.pm /local/src/perl-5.8.7/lib/Hash/Util.pm
        Can someone help me? Do you need more info to help me out?
        Thanks

        Vani
Re: miniperl hangs during perl compilation
by jonix (Friar) on Nov 16, 2005 at 22:30 UTC
    Hi Vani,
    I think some more information really could be helpful. Beeing no solaris monk myself, I think some more general things are still required to be known before anyone can make more than a strong guess regarding your issue:
    • Which hardware platform do you use?
    • Could the available amount of memory (RAM) become an issue?
    • When the compile hangs, how does that manifest?
    • Are there any error messages or warnings in the compile logs? Please show them if so.
    • Does only the compile hang?
    Cheers,
    jonix
      Here's some more info

      Which hardware platform do you use?
      # uname -a
      SunOS losan048 5.9 Generic_112233-07 sun4us sparc FJSV,GPUS
      Could the available amount of memory (RAM) become an issue?

      I don't know how to find out if memory is an issue (atleast for the libraries where i cam not able to create the Makefile even when i give the miniperl command from within that directory). But i was certainly able to create the make file and compile some of the libraries from within their directories.
      If someone could tell me how to find this out, i can try it.

      When the compile hangs, how does that manifest? Are there any error messages or warnings in the compile logs? Please show them if so. Does only the compile hang?
      No error message what-so-ever. It just stays there...here's a snippet

      make[1]: Leaving directory `/local/src/perl-5.8.7/x2p'<br> Making B (dynamic)
      But as i said earlier, If i remove the entries from the list of libraries in the dynamic_ext variable in the Makefile. Make completes.
      But again "make test" and "make install" fails with a lot of errors. Am just adding the last section of the make install cmd output.
      The list of libraries that cause an issue in creating the Makefile with miniperl,
      (i say pass/fail next to each,
      pass - i can create the make file and do a make from within that directory
      fail - just hangs no matter from where i try to run the miniperl command)

      Please let me know if you need some more information.
      BTW, it's not NFS. It's local.

      Any suggestion? Thanks,
      Vani

Re: miniperl hangs during perl compilation
by bluto (Curate) on Nov 16, 2005 at 22:28 UTC
    Here's a long shot: Are you building into an NFS mounted filesystem? If so, try using a local filesystem instead.
Re: miniperl hangs during perl compilation
by bluto (Curate) on Nov 17, 2005 at 00:23 UTC
    I'm not batting very well today so YMMV, but in the solaris notes for 5.8.5 there's this paragraph about using GNU 'as' and 'ld'...

    If you decide to ignore this advice and use the GNU versions anyway, then be sure that they are relatively recent. Versions newer than 2.7 are apparently new enough. Older versions may have trouble with dynamic loading.

      My colleague at work had compiled perl 5.8.1 with gcc 3.2 and gnu tools. So, i did ask him for suggestions too. But, he never faced any problem like this. So I need some help here.