Beefy Boxes and Bandwidth Generously Provided by pair Networks Joe
Do you know where your variables are?
 
PerlMonks  

building perl

by cmac (Monk)
on Dec 17, 2008 at 05:30 UTC ( #730833=perlquestion: print w/ replies, xml ) Need Help??
cmac has asked for the wisdom of the Perl Monks concerning the following question:

1. If I build perl to an x86 arch higher than i386, will the resultant perl be willing to use modules in a directory like /usr/local/lib/perl5/vendor_perl/5.8.7/i386-freebsd, if I say that it should be included in @INC ??

This contains things from my hosting provider, for which I don't have access to source. On the face of it, using modules compiled for a predecessor arch should be OK...

2. Does anyone know of a utility program that discovers and displays the x86 architecture of a machine that it's run on? The tech support people at my hosting provider have a hard time with Qs like "what processor is my site running on?"

3. I want to build a perl with setuid capability. Can I answer "Does your kernel have *secure* setuid scripts?" with "yes" for freeBSD-6.3?

Thanks for being there,
cmac
www.animalhead.com

Comment on building perl
Re: building perl
by diotalevi (Canon) on Dec 17, 2008 at 07:11 UTC

    In general, perl strives to have a static binary interface. If you're using another perl 5.8.8 or 5.8.9, it should be able to use things compiled for perl 5.8.7. I wouldn't assume this would follow for things compiled to a different processor spec. I expect you'd find out immediately if it /didn't/ work so it won't hurt you to just try for i686 and see if it fails when loading something from i386.

    As for what CPU you're running, there's the uname program and the /proc directory. I don't know whether FreeBSD automatically mounts /proc or not.

    ⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊

Re: building perl
by marto (Chancellor) on Dec 17, 2008 at 09:16 UTC

    Regards discovering CPU information, x86info may be available on your system.

    You may want to consider installing Perl to a different path (e.g. /opt/appname/perl), that way you can avoid any issues when messing with Perl that your OS may rely on for system tasks. See INSTALL and README.freebsd for futher information.

    Hope this helps,

    Martin

Re: building perl
by jimX11 (Friar) on Dec 17, 2008 at 13:24 UTC
    dmesg lists cpu info. On FreeBSD, "sysctl -a" does also.
    rocky# dmesg | head
    Copyright (c) 1992-2008 The FreeBSD Project.
    Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
            The Regents of the University of California. All rights reserved.
    FreeBSD is a registered trademark of The FreeBSD Foundation.
    FreeBSD 7.0-RELEASE-p6 #1: Tue Dec  2 09:02:01 EST 2008
        root@localhost:/usr/obj/usr/src/sys/ROCKY
    Timecounter "i8254" frequency 1193182 Hz quality 0
    CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 5200+ (2605.45-MHz 686-class CPU)
      Origin = "AuthenticAMD"  Id = 0x40f32  Stepping = 2
      Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://730833]
Approved by ikegami
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (8)
As of 2014-04-25 08:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (585 votes), past polls