Re: Perl isn't compiling and other random questions

Stuart Small <[email protected]>
Newsgroups gmane.linux.uclinux.devel
Message-ID <CADQrjHDRDFezWhY9cU6jNa9QP2OxduiGAoHZC9CE0iXqqdrAcA@mail.gmail.com>
I'm guessing you are on a MMU-less system?  We had tried to get perl to
work on ours by a simple find and replace fork w vfork but we ran into
issues.  This was a few years back, but if I remember right anytime we'd
pass something off to the shell it would generate a segmentation fault.

For us we were just playing around, so didn't dig too deep trying to get it
running on our system.

On Tue, Aug 28, 2012 at 11:26 AM, Mark Bishop <[email protected]> wrote:

> I'm getting errors building perl from the SVN head.  Should I just move
> the offending line from fork() to vfork() and be done with it or is this
> something bigger?  My goal is to use perl for some simple CGI web pages
> from boa.  Would python be a better option?  (However, I have no experience
> with python.)  I'm not sure if miniperl has everything I need until I try
> it.
>
> mark@linux-hez9:~/new_image/**uclinux-dist-ipc> make user/perl_only
> make[1]: Entering directory `/home/mark/new_image/uclinux-**dist-ipc/user'
> touch perl/.sgbuilt_user && make -C perl -j1
> make[2]: Entering directory `/home/mark/new_image/uclinux-**
> dist-ipc/user/perl'
> bfin-linux-uclibc-gcc -mcpu=bf548-0.2 -o miniperl \
>             miniperlmain.o opmini.o libperl.a -lnsl -ldl -lm -lcrypt
> -lutil -lc
> libperl.a(util.o): In function `Perl_my_fork':
> /home/mark/new_image/uclinux-**dist-ipc/user/perl/util.c:**2360:
> undefined reference to `_fork'
> /home/mark/new_image/uclinux-**dist-ipc/user/perl/util.c:**2360:
> undefined reference to `_fork'
> /home/mark/new_image/uclinux-**dist-ipc/user/perl/util.c:**2360:
> undefined reference to `_fork'
> collect2: ld returned 1 exit status
> make[2]: *** [miniperl] Error 1
> make[2]: Leaving directory `/home/mark/new_image/uclinux-**
> dist-ipc/user/perl'
> make[1]: *** [perl_only] Error 2
> make[1]: Leaving directory `/home/mark/new_image/uclinux-**dist-ipc/user'
> make: *** [user/perl_only] Error 2
> mark@linux-hez9:~/new_image/**uclinux-dist-ipc>
>
> Offending code in util.c:
>
> Pid_t
> Perl_my_fork(void)
> {
> #if defined(HAS_FORK)
>     Pid_t pid;
> #if (defined(USE_5005THREADS) || defined(USE_ITHREADS)) &&
> !defined(HAS_PTHREAD_ATFORK)
>     atfork_lock();
>     pid = fork();
>     atfork_unlock();
> #else
>     /* atfork_lock() and atfork_unlock() are installed as pthread_atfork()
>      * handlers elsewhere in the code */
>     pid = fork();                            <<<------   HERE
> #endif
>     return pid;
> #else
>     /* this "canna happen" since nothing should be calling here if
> !HAS_FORK */
>     Perl_croak_nocontext("fork() not available");
>     return 0;
> #endif /* HAS_FORK */
> }
> ______________________________**_________________
> uClinux-dev mailing list
> [email protected]
> http://mailman.uclinux.org/**mailman/listinfo/uclinux-dev<http://mailman.uclinux.org/mailman/listinfo/uclinux-dev>
> This message was resent by [email protected]
> To unsubscribe see:
> http://mailman.uclinux.org/**mailman/options/uclinux-dev<http://mailman.uclinux.org/mailman/options/uclinux-dev>
>

_______________________________________________
uClinux-dev mailing list
[email protected]
http://mailman.uclinux.org/mailman/listinfo/uclinux-dev
This message was resent by [email protected]
To unsubscribe see:
http://mailman.uclinux.org/mailman/options/uclinux-dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.